Pre Merge pull request !239 from 疯狂的狮子Li/N/A
This commit is contained in:
commit
1f2f2cfe98
|
|
@ -151,13 +151,19 @@ export default {
|
|||
},
|
||||
// 上传成功回调
|
||||
handleUploadSuccess(res) {
|
||||
this.uploadList.push({ name: res.data.url, url: res.data.url });
|
||||
if (this.uploadList.length === this.number) {
|
||||
this.fileList = this.fileList.concat(this.uploadList);
|
||||
this.uploadList = [];
|
||||
this.number = 0;
|
||||
this.$emit("input", this.listToString(this.fileList));
|
||||
if (res.code === 200) {
|
||||
this.uploadList.push({ name: res.data.url, url: res.data.url });
|
||||
if (this.uploadList.length === this.number) {
|
||||
this.fileList = this.fileList.concat(this.uploadList);
|
||||
this.uploadList = [];
|
||||
this.number = 0;
|
||||
this.$emit("input", this.listToString(this.fileList));
|
||||
this.$modal.closeLoading();
|
||||
}
|
||||
} else {
|
||||
this.$modal.msgError(res.msg);
|
||||
this.$modal.closeLoading();
|
||||
this.number--;
|
||||
}
|
||||
},
|
||||
// 删除文件
|
||||
|
|
|
|||
|
|
@ -122,13 +122,19 @@ export default {
|
|||
},
|
||||
// 上传成功回调
|
||||
handleUploadSuccess(res) {
|
||||
this.uploadList.push({ name: res.data.url, url: res.data.url });
|
||||
if (this.uploadList.length === this.number) {
|
||||
this.fileList = this.fileList.concat(this.uploadList);
|
||||
this.uploadList = [];
|
||||
this.number = 0;
|
||||
this.$emit("input", this.listToString(this.fileList));
|
||||
if (res.code === 200) {
|
||||
this.uploadList.push({ name: res.data.url, url: res.data.url });
|
||||
if (this.uploadList.length === this.number) {
|
||||
this.fileList = this.fileList.concat(this.uploadList);
|
||||
this.uploadList = [];
|
||||
this.number = 0;
|
||||
this.$emit("input", this.listToString(this.fileList));
|
||||
this.$modal.closeLoading();
|
||||
}
|
||||
} else {
|
||||
this.$modal.msgError(res.msg);
|
||||
this.$modal.closeLoading();
|
||||
this.number--;
|
||||
}
|
||||
},
|
||||
// 上传前loading加载
|
||||
|
|
|
|||
Loading…
Reference in New Issue