浏览代码

图片上传回显延时

e 5 年之前
父节点
当前提交
83e7805d75
共有 4 个文件被更改,包括 24 次插入6 次删除
  1. 8 2
      src/views/club/editForm.vue
  2. 8 2
      src/views/club/form.vue
  3. 4 1
      src/views/goods/category-create.vue
  4. 4 1
      src/views/goods/category-edit.vue

+ 8 - 2
src/views/club/editForm.vue

@@ -200,8 +200,11 @@ export default {
     },
     // 上传图标事件
     handleAvatarSuccess(response, file) {
+      this.businessImgLoading = true
       this.$nextTick(() => {
-        this.form.businessLicenseImage = response.data
+        setTimeout(() => {
+          this.form.businessLicenseImage = response.data
+        }, 1000 * 2)
       })
     },
     reloadAvatarImage() {
@@ -215,8 +218,11 @@ export default {
     },
     // 上传图标事件
     handleDoorwaySuccess(response, file) {
+      this.headImgLoading = true
       this.$nextTick(() => {
-        this.form.headpic = response.data
+        setTimeout(() => {
+          this.form.headpic = response.data
+        }, 1000 * 2)
       })
     },
     reloadDoorwayImage() {

+ 8 - 2
src/views/club/form.vue

@@ -146,8 +146,11 @@ export default {
     },
     // 上传图标事件
     handleAvatarSuccess(response, file) {
+      this.businessImgLoading = true
       this.$nextTick(() => {
-        this.form.businessLicenseImage = response.data
+        setTimeout(() => {
+          this.form.businessLicenseImage = response.data
+        }, 1000 * 2)
       })
     },
     reloadAvatarImage() {
@@ -161,8 +164,11 @@ export default {
     },
     // 上传图标事件
     handleDoorwaySuccess(response, file) {
+      this.headImgLoading = true
       this.$nextTick(() => {
-        this.form.headpic = response.data
+        setTimeout(() => {
+          this.form.headpic = response.data
+        }, 1000 * 2)
       })
     },
     reloadDoorwayImage() {

+ 4 - 1
src/views/goods/category-create.vue

@@ -112,8 +112,11 @@ export default {
     },
     // 上传图标事件
     handleSuccess(response, file) {
+      this.loadImgLoading = true
       this.$nextTick(() => {
-        this.temp.classifyImage = response.data
+        setTimeout(() => {
+          this.temp.classifyImage = response.data
+        }, 1000 * 2)
       })
     },
     reloadImage() {

+ 4 - 1
src/views/goods/category-edit.vue

@@ -123,8 +123,11 @@ export default {
     },
     // 上传图标事件
     handleSuccess(response, file) {
+      this.loadImgLoading = true
       this.$nextTick(() => {
-        this.temp.classifyImage = response.data
+        setTimeout(() => {
+          this.temp.classifyImage = response.data
+        }, 1000 * 2)
       })
     },
     reloadImage() {