lilei 3 gadi atpakaļ
vecāks
revīzija
1da9e2a50d
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 4 2
      src/views/productManagement/newProduct/modal.vue

+ 4 - 2
src/views/productManagement/newProduct/modal.vue

@@ -80,13 +80,15 @@ export default {
     }
   },
   mounted () {
-    this.$refs.table.refresh(true)
+    this.$nextTick(() => {
+      this.$refs.table.refresh(true)
+    })
   },
   watch: {
     onlineFalg (newValue, oldValue) {
       const _this = this
       setTimeout(() => {
-        _this.$refs.table.refresh(true)
+        _this.$refs.table && _this.$refs.table.refresh(true)
       }, 400)
     }
   }