فهرست منبع

修复扫码对话框点击二次弹出问题

cyy 2 سال پیش
والد
کامیت
c7887fdae1
1فایلهای تغییر یافته به همراه17 افزوده شده و 4 حذف شده
  1. 17 4
      src/views/component/qrcodeedDialog.vue

+ 17 - 4
src/views/component/qrcodeedDialog.vue

@@ -45,10 +45,23 @@ export default {
             url:'http://192.168.2.16:8080/',
             url:'http://192.168.2.16:8080/',
         }
         }
     },
     },
-    mounted () {
-        this.$nextTick(() => {
-            this.qrcodeRender()
-        })
+    // mounted () {
+    //     this.$nextTick(() => {
+    //         this.qrcodeRender()
+    //     })
+    // },
+    watch:{
+        dialogVisible: {
+            handler: function(val, oldVal) {
+                if(val == true){
+                    this.$nextTick(() => {
+                        this.qrcodeRender()
+                    })
+                }
+            },
+            deep:true,
+            immediate:true
+        },
     },
     },
     methods: {
     methods: {
         downloadCode () {
         downloadCode () {