前端上传图片在浏览器上预览,不调接口,刷新后图片就会没有
<div class="btn">
<button>上传背景图片<input id="fileToUpload"
style="position: absolute; top: 0; bottom: 0; left: 0;right: 0; opacity: 0;"
type="file" accept="image/jpg,image/png" name="fileToUpload"
@change="showImg($event)" multiple /></button>