diff --git a/src/components/mycomponents/addImg.vue b/src/components/mycomponents/addImg.vue index d027f2e..cb405da 100644 --- a/src/components/mycomponents/addImg.vue +++ b/src/components/mycomponents/addImg.vue @@ -113,6 +113,7 @@ export default { }, Confirm() { this.dialogVisible = false + console.log(1111111111111, this.selectImage) this.$emit('successEvent', this.selectImage) }, handleBeforeRemove(file, fileList) { diff --git a/src/components/mycomponents/addImgconfig/imageComponent.vue b/src/components/mycomponents/addImgconfig/imageComponent.vue index f23f8d6..01c3ecd 100644 --- a/src/components/mycomponents/addImgconfig/imageComponent.vue +++ b/src/components/mycomponents/addImgconfig/imageComponent.vue @@ -16,7 +16,7 @@ @@ -35,6 +35,7 @@ export default { showUpload: false, selectList: [], fileList: [], + loadings: false } }, mounted() { @@ -44,14 +45,20 @@ export default { this.showUpload = true; }, async doSubmit() { - let res = await API.add({ - pictureClassifyId: this.activedata, - urls: this.fileList - }) - if (res.code == 200) { - this.showUpload = false; - this.fileList = [] - this.$emit('getList') + if (this.fileList.length) { + this.loadings = true + let res = await API.add({ + pictureClassifyId: this.activedata, + urls: this.fileList + }) + if (res.code == 200) { + this.loadings = false + this.showUpload = false; + this.fileList = [] + this.$emit('getList') + } + } else { + } }, deleteImg(d) {