|
@@ -184,6 +184,7 @@
|
|
|
:on-preview="handlePictureCardPreview"
|
|
|
:on-progress="progress"
|
|
|
:on-success="handleChange"
|
|
|
+ :on-error="errorUpload"
|
|
|
:file-list="fileList"
|
|
|
list-type="picture"
|
|
|
:before-upload="beforeUpload"
|
|
@@ -443,6 +444,11 @@ export default {
|
|
|
this.dis = false
|
|
|
this.$message({ showClose: true, message: '文件上传成功', type: 'success' })
|
|
|
},
|
|
|
+ // 上传失败回调
|
|
|
+ errorUpload() {
|
|
|
+ this.dis = false
|
|
|
+ this.$message({ showClose: true, message: '文件上传失败', type: 'error' })
|
|
|
+ },
|
|
|
handlePictureCardPreview(file) { // 点击展示附件
|
|
|
this.dialogImageUrl = file.url
|
|
|
this.dialogVisible = true
|