fix: 1474 待报废上传图片时,若选择超过3张图片,弹出2次提示
This commit is contained in:
parent
e3c493cfaf
commit
2051c7c8d2
|
|
@ -28,7 +28,7 @@
|
||||||
@fileListChange="fileListChange"
|
@fileListChange="fileListChange"
|
||||||
></uploadImage> -->
|
></uploadImage> -->
|
||||||
<upload style="width: 350px" :file-list="fileList" :action-url="actionUrl" :limit="3" :multiple="true"
|
<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">
|
@success="handleSuccess">
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
</upload>
|
</upload>
|
||||||
|
|
@ -76,7 +76,7 @@
|
||||||
@fileListChange="fileListChange"
|
@fileListChange="fileListChange"
|
||||||
></uploadImage> -->
|
></uploadImage> -->
|
||||||
<upload style="width: 350px" :file-list="fileList" :action-url="actionUrl" :limit="3" :multiple="true"
|
<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">
|
@success="handleSuccess">
|
||||||
<el-button size="small" type="primary">点击上传</el-button>
|
<el-button size="small" type="primary">点击上传</el-button>
|
||||||
</upload>
|
</upload>
|
||||||
|
|
@ -176,11 +176,6 @@ export default {
|
||||||
handlePreview(file) {
|
handlePreview(file) {
|
||||||
console.log('file')
|
console.log('file')
|
||||||
},
|
},
|
||||||
handleExceed(files, fileList) {
|
|
||||||
this.$message.warning(
|
|
||||||
`当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`
|
|
||||||
)
|
|
||||||
},
|
|
||||||
beforeRemove(file, fileList) {
|
beforeRemove(file, fileList) {
|
||||||
// return this.$confirm(`确定移除 ${file.name}?`);
|
// return this.$confirm(`确定移除 ${file.name}?`);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue