el-upload编辑的时候,如何实现图片回显?
用如下方法将图片url
添加至fileList
未成功,该如何实现?
this.fileList.push({ "url": imageUrl
})
<el-upload ref="upload"
class="uploadFiles"
:action="uploadUrl"
list-type="picture-card"
:show-file-list="false"
:data="uploadParams"
:file-list="fileList"
:on-preview="handlePictureCardPreview"
:on-progress="uploadProcess"
:on-success="handleSuccess"
:before-upload="beforeAvatarUpload"
:auto-upload="false"
:on-change="change"
:on-remove="handleRemove"
:limit="1"
/>
<div v-if="fileList" style="position:relative">
<div v-show="mask" style="max-width:500px" class="mask" @mouseleave="mask = false" />
<div>
<img style="width:100%" :src="imageUrl">
<i v-show="mask" class="el-icon-delete deleteIcon" @click="clearList" />
</div>
</div>
回答:
已解决.
将返回的图片地址赋值给imageUrl
即可.
以上是 el-upload编辑的时候,如何实现图片回显? 的全部内容, 来源链接: utcz.com/p/935737.html