Procházet zdrojové kódy

feature_20260506_增加照片上传进度UI效果

zhujindu před 23 hodinami
rodič
revize
c65ff79860
1 změnil soubory, kde provedl 10 přidání a 4 odebrání
  1. 10 4
      src/components/uploadVNormalTaskPhoto.vue

+ 10 - 4
src/components/uploadVNormalTaskPhoto.vue

@@ -147,7 +147,7 @@ export default {
       d2timer: null,
     };
   },
-  created() {
+  activated() {
     this.resetDemo2();
   },
   methods: {
@@ -406,9 +406,15 @@ export default {
       this.d2running = false;
       this.d2count = 0;
       this.uploadImgTotal = 0;
-      document.getElementById('d2ring').style.strokeDashoffset = 251.2;
-      document.getElementById('d2pct').textContent = '0%';
-      document.getElementById('d2sub').textContent = '上传中';
+      if (document.getElementById('d2ring')) {
+        document.getElementById('d2ring').style.strokeDashoffset = 251.2;
+      }
+      if (document.getElementById('d2pct')) {
+        document.getElementById('d2pct').textContent = '0%';
+      }
+      if (document.getElementById('d2sub')) {
+        document.getElementById('d2sub').textContent = '上传中';
+      }
       this.uploadImgFlag = false;
     },
     // 照片是否入库,1.照片识别三次不通过仍要上传,2.照片识别通过