在使用<el-upload>组件时我们在事件方法传递参数会导致直接触发这个方法,所以我们需要进行修改
例: :on-change="(file) => changeFile(file,item)"
<el-upload :limit="item.doctCamera"
v-model:file-list="FileList"
action=""
:auto-upload="true"
:http-request="manualUpload"
list-type="picture-card"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove"
:on-error="errorFile"
:on-change="(file) => changeFile(file,item)"
:on-success="successFile"
:before-upload="beforeUpload"
>
<el-icon>
<Plus/>
</el-icon>
</el-upload>
<el-dialog v-model="dialogVisible" title="预览">
<img style="width: 100%" w-full :src="dialogImageUrl" alt="Preview Image"/>
</el-dialog>