fix: 1474 待报废上传图片时,若选择超过3张图片,弹出2次提示

This commit is contained in:
binbin_pan 2024-05-06 17:52:21 +08:00
parent e3c493cfaf
commit 2051c7c8d2
1 changed files with 2 additions and 7 deletions

View File

@ -28,7 +28,7 @@
@fileListChange="fileListChange"
></uploadImage> -->
<upload style="width: 350px" :file-list="fileList" :action-url="actionUrl" :limit="3" :multiple="true"
@remove="handleRemove" @preview="handlePreview" @exceed="handleExceed" @before-remove="beforeRemove"
@remove="handleRemove" @preview="handlePreview" @before-remove="beforeRemove"
@success="handleSuccess">
<el-button size="small" type="primary">点击上传</el-button>
</upload>
@ -76,7 +76,7 @@
@fileListChange="fileListChange"
></uploadImage> -->
<upload style="width: 350px" :file-list="fileList" :action-url="actionUrl" :limit="3" :multiple="true"
@remove="handleRemove" @preview="handlePreview" @exceed="handleExceed" @before-remove="beforeRemove"
@remove="handleRemove" @preview="handlePreview" @before-remove="beforeRemove"
@success="handleSuccess">
<el-button size="small" type="primary">点击上传</el-button>
</upload>
@ -176,11 +176,6 @@ export default {
handlePreview(file) {
console.log('file')
},
handleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`
)
},
beforeRemove(file, fileList) {
// return this.$confirm(` ${file.name}`);
},