Commit 27832837 authored by xinzhedeai's avatar xinzhedeai

图片删除上传问题处理

parent c821d7ff
...@@ -232,9 +232,15 @@ export default { ...@@ -232,9 +232,15 @@ export default {
upFloorPlanError() { upFloorPlanError() {
this.$message.error('上传失败,请稍后再试') this.$message.error('上传失败,请稍后再试')
}, },
upFloorPlanRemove() { upFloorPlanRemove(file) {
this.$set(this.dialog1Data, '_fileList', []) // this.$set(this.dialog1Data, '_fileList', [])
this.dialog1Data.filePath = '' // this.dialog1Data.filePath = ''
// debugger
var url = file.url
const findIndex = this.dialog1Data._fileList.findIndex((item)=>{
return url === item.url
})
this.dialog1Data._fileList.splice(findIndex, 1); // 从列表中移除文件
}, },
upFloorPlanBefore(file) { upFloorPlanBefore(file) {
const isIMG = file.type === 'image/jpeg' || file.type === 'image/png' const isIMG = file.type === 'image/jpeg' || file.type === 'image/png'
...@@ -298,7 +304,7 @@ export default { ...@@ -298,7 +304,7 @@ export default {
this.getData(); this.getData();
}, },
confirmFolder() { confirmFolder() {
if(!this.dialog1Data.filePath){ if(!this.dialog1Data._fileList.length){
this.$message.warning("请上传图片"); this.$message.warning("请上传图片");
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment