haojianlong 4 lat temu
rodzic
commit
3a62946870
2 zmienionych plików z 8 dodań i 0 usunięć
  1. 2 0
      src/components/homeView/leftAsideTree.vue
  2. 6 0
      src/views/home.vue

+ 2 - 0
src/components/homeView/leftAsideTree.vue

@@ -52,6 +52,8 @@ export default {
         this.treeData = res.content;
         if (!res.content.length) {
           this.$emit("noTree");
+        } else {
+          this.$emit("getDataSuc")
         }
       });
     },

+ 6 - 0
src/views/home.vue

@@ -41,6 +41,7 @@
           ref="leftAsideTree"
           @changeNode="changeNode"
           @noTree="(noTreeFlag = false), (popVisible = true)"
+          @getDataSuc="getTreeSuc"
         ></leftAsideTree>
         <div
           class="recycle"
@@ -300,6 +301,11 @@ export default {
       this.categoryName = data.name;
       this.queryGraph();
     },
+    // 树数据获取成功
+    getTreeSuc() {
+      this.noTreeFlag = true;
+      this.cardList = [];
+    },
     // 发布修改
     changePub() {
       this.queryGraph();