|
@@ -152,6 +152,7 @@
|
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
|
action="http://star.xiaojukeji.com/upload/img.node"
|
|
|
+ :on-remove="handleRemove"
|
|
|
:on-preview="handlePictureCardPreview"
|
|
|
:on-progress="progress"
|
|
|
:on-success="handleChange"
|
|
@@ -447,6 +448,14 @@ export default {
|
|
|
}))
|
|
|
})
|
|
|
},
|
|
|
+ handleRemove(file, fileList) {
|
|
|
+ this.fileDbList = this.fileDbList.filter(item => {
|
|
|
+ return item.name !== file.name
|
|
|
+ })
|
|
|
+ this.fileList = this.fileList.filter(item => {
|
|
|
+ return item.name !== file.name
|
|
|
+ })
|
|
|
+ },
|
|
|
pasteUpload() {
|
|
|
if (!this.modalShow) {
|
|
|
return false
|
|
@@ -470,11 +479,14 @@ export default {
|
|
|
}
|
|
|
this.fileList.push(item)
|
|
|
this.fileDbList.push(item)
|
|
|
+ this.formInline.accessory = JSON.stringify(this.fileDbList)
|
|
|
this.$message({
|
|
|
showClose: true,
|
|
|
message: '文件上传成功',
|
|
|
type: 'success'
|
|
|
})
|
|
|
+ this.imageName = null
|
|
|
+ this.imageUrl = null
|
|
|
window.uploadFiles = null
|
|
|
},
|
|
|
updateFile(file) {
|