开发需求:在已上传的图片列表中,点击图片实现上传替换
<template>
<dz-upload
list-type="picture-card"
class="picture-item"
:on-preview="handlePictureCardPreview"
//通过es5的bind,绑定到函数上,就可以实现钩子函数的传参了
:on-success="handleAvatarSuccess.bind(this,index)"
:show-file-list="false"
multiple
>
<img :src="imageUrl" width="100%" height="100%" />
</dz-upload>
</template>
<script>
export default {
data() {
return {
imageUrl: ''<