vue方法来写
<img v-if="imageUrl" :src="imageUrl" alt="">
<input @change="logoChange" style="display:none;" type="file" ref="logoFile" accept="image/*">
logoChange(){
let file = this.$refs.logoFile.files[0]
let _this = this;
let read = new FileReader()
read.readAsDataURL(file)
read.onload = function(){
_this.imageUrl = read.result
}
},