瀏覽代碼

热点列表页数据加载逻辑优化

(cherry picked from commit 0ada9052608dce7062fc64912948a7a54fc5bd6a)
任一存 2 年之前
父節點
當前提交
5209040a1c
共有 1 個文件被更改,包括 13 次插入1 次删除
  1. 13 1
      src/views/gui/CustomHotspotList.vue

+ 13 - 1
src/views/gui/CustomHotspotList.vue

@@ -30,7 +30,19 @@
 export default {
   data() {
     return {
-      hotspotList: window.myHotList
+      hotspotList: window.myHotList,
+      intervalId: null,
+    }
+  },
+  mounted() {
+    if (!window.myHotList) {
+      this.intervalId = setInterval(() => {
+        if (window.myHotList) {
+          this.hotspotList = window.myHotList
+          clearInterval(this.intervalId)
+        } else {
+        }
+      }, 300)
     }
   },
   methods: {