mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-02 16:00:40 +00:00
improve: 上传判断
This commit is contained in:
parent
d0597896ca
commit
379434cc31
@ -62,6 +62,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
selectImgs() {
|
||||
if (this.loading) return;
|
||||
this.$refs['upload'].$refs['upload-inner'].handleClick();
|
||||
},
|
||||
again() {
|
||||
@ -70,14 +71,19 @@ export default {
|
||||
this.allSize = 0;
|
||||
},
|
||||
async submitUpload() {
|
||||
this.loading = true;
|
||||
for (let i = 0; i < this.imgList.length; i++) {
|
||||
const file = this.imgList[i].raw;
|
||||
await this.uploadItem(file);
|
||||
if (i == this.imgList.length - 1) {
|
||||
this.uploading = false;
|
||||
this.loading = false;
|
||||
if (this.imgList.length) {
|
||||
if (this.loading) return;
|
||||
this.loading = true;
|
||||
for (let i = 0; i < this.imgList.length; i++) {
|
||||
const file = this.imgList[i].raw;
|
||||
await this.uploadItem(file);
|
||||
if (i == this.imgList.length - 1) {
|
||||
this.uploading = false;
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.$Message.warning('请先选择图片');
|
||||
}
|
||||
},
|
||||
handleRemove(file) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user