fix: 修复文件上传一直出现loading的情况
This commit is contained in:
parent
96580e2284
commit
c117e4b087
@ -224,9 +224,12 @@
|
|||||||
this.$refs.upload.fileList.splice(fileList.indexOf(item), 1);
|
this.$refs.upload.fileList.splice(fileList.indexOf(item), 1);
|
||||||
this.$emit('input', this.$refs.upload.fileList);
|
this.$emit('input', this.$refs.upload.fileList);
|
||||||
},
|
},
|
||||||
handleProgress() {
|
handleProgress(event, file) {
|
||||||
//开始上传
|
//开始上传
|
||||||
this.$emit('update:uploadIng', this.uploadIng + 1);
|
if (file._uploadIng === undefined) {
|
||||||
|
file._uploadIng = true;
|
||||||
|
this.$emit('update:uploadIng', this.uploadIng + 1);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleSuccess (res, file) {
|
handleSuccess (res, file) {
|
||||||
//上传完成
|
//上传完成
|
||||||
|
@ -248,9 +248,12 @@
|
|||||||
|
|
||||||
/********************文件上传部分************************/
|
/********************文件上传部分************************/
|
||||||
|
|
||||||
handleProgress() {
|
handleProgress(event, file) {
|
||||||
//开始上传
|
//开始上传
|
||||||
this.uploadIng++;
|
if (file._uploadIng === undefined) {
|
||||||
|
file._uploadIng = true;
|
||||||
|
this.uploadIng++;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSuccess(res, file) {
|
handleSuccess(res, file) {
|
||||||
|
@ -474,9 +474,12 @@
|
|||||||
|
|
||||||
/********************文件上传部分************************/
|
/********************文件上传部分************************/
|
||||||
|
|
||||||
handleProgress() {
|
handleProgress(event, file) {
|
||||||
//开始上传
|
//开始上传
|
||||||
this.uploadIng++;
|
if (file._uploadIng === undefined) {
|
||||||
|
file._uploadIng = true;
|
||||||
|
this.uploadIng++;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleSuccess(res, file) {
|
handleSuccess(res, file) {
|
||||||
|
@ -79,7 +79,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
handleProgress(event, file) {
|
handleProgress(event, file) {
|
||||||
//上传时
|
//上传时
|
||||||
if (typeof file.tempId === "undefined") {
|
if (file.tempId === undefined) {
|
||||||
file.tempId = $A.randomString(8);
|
file.tempId = $A.randomString(8);
|
||||||
this.$emit('on-progress', file);
|
this.$emit('on-progress', file);
|
||||||
}
|
}
|
||||||
|
@ -1206,7 +1206,10 @@ export default {
|
|||||||
|
|
||||||
handleProgress(event, file, fileList) {
|
handleProgress(event, file, fileList) {
|
||||||
//开始上传
|
//开始上传
|
||||||
this.uploadIng++;
|
if (file._uploadIng === undefined) {
|
||||||
|
file._uploadIng = true;
|
||||||
|
this.uploadIng++;
|
||||||
|
}
|
||||||
this.uploadUpdate(fileList);
|
this.uploadUpdate(fileList);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user