|
@@ -12,6 +12,7 @@
|
|
|
:before-upload="beforeUpload"
|
|
|
:on-success="onSuccess"
|
|
|
:on-progress="onProgress"
|
|
|
+ :on-error="onError"
|
|
|
>
|
|
|
<el-button v-if="type === 'file'" type="primary" style="margin:0">{{ title }}</el-button>
|
|
|
<i v-else slot="default" class="el-icon-plus" />
|
|
@@ -111,6 +112,11 @@ export default {
|
|
|
this.title = `${parseInt(file.percent - 1)}%`;
|
|
|
},
|
|
|
|
|
|
+ // 上传失败
|
|
|
+ onError(err) {
|
|
|
+ this.title = `上传失败`
|
|
|
+ },
|
|
|
+
|
|
|
// 删除
|
|
|
handleRemove() {
|
|
|
this.hideUpload = true;
|