修复合并#11号PR代码冲突的问题。

This commit is contained in:
vdpAdmin 2022-08-07 10:03:54 +08:00
parent 9077e828cd
commit 08a0730672

View File

@ -8,9 +8,8 @@
:with-credentials="field.options.withCredentials" :with-credentials="field.options.withCredentials"
:multiple="field.options.multipleSelect" :file-list="fileList" :show-file-list="field.options.showFileList" :multiple="field.options.multipleSelect" :file-list="fileList" :show-file-list="field.options.showFileList"
list-type="picture-card" :class="{'hideUploadDiv': uploadBtnHidden}" list-type="picture-card" :class="{'hideUploadDiv': uploadBtnHidden}"
:limit="field.options.limit" :on-exceed="handlePictureExceed" :on-preview="handlePicturePreview" :limit="field.options.limit" :on-exceed="handlePictureExceed"
:before-upload="beforePictureUpload" :before-upload="beforePictureUpload" :on-preview="handlePictureCardPreview"
:on-preview="handlePictureCardPreview"
:on-success="handlePictureUpload" :on-error="handleUploadError" > :on-success="handlePictureUpload" :on-error="handleUploadError" >
<template #file="{ file }"> <template #file="{ file }">
<el-image <el-image
@ -148,11 +147,6 @@
this.$message.warning( this.i18nt('render.hint.uploadExceed').replace('${uploadLimit}', uploadLimit) ) this.$message.warning( this.i18nt('render.hint.uploadExceed').replace('${uploadLimit}', uploadLimit) )
}, },
handlePicturePreview(file) {
this.previewUrl = file.url
this.showPreviewDialogFlag = true
},
beforePictureUpload(file) { beforePictureUpload(file) {
let fileTypeCheckResult = false let fileTypeCheckResult = false
if (!!this.field.options && !!this.field.options.fileTypes) { if (!!this.field.options && !!this.field.options.fileTypes) {
@ -256,7 +250,6 @@
this.handleBeforeRemove(this.fileList) // #file slot handleBeforeRemove @before-remove @remove this.handleBeforeRemove(this.fileList) // #file slot handleBeforeRemove @before-remove @remove
this.fileList.splice(this.fileList.indexOf(file), 1) // this.fileList.splice(this.fileList.indexOf(file), 1) //
this.updateFieldModelAndEmitDataChangeForRemove(file) this.updateFieldModelAndEmitDataChangeForRemove(file)
// this.fileList = deepClone(fileList //
let fileList = deepClone(this.fileList); // fileList let fileList = deepClone(this.fileList); // fileList
this.uploadBtnHidden = fileList.length >= this.field.options.limit this.uploadBtnHidden = fileList.length >= this.field.options.limit