<input type="file" accept="image/*" @change="changeFile" />
const changeFile= (e) => { let reader = new FileReader() reader.readAsDataURL(e.target.files[0]) reader.onload = (res) => { res.target.result // 赋值到图片src } }