乐趣区

关于前端:eltree的全部展开收缩

利用于 vue
开展

Expand() {
      debugger;
      this.$nextTick(() => {
        debugger;
        for (var i = 0; i < this.$refs.tree.store._getAllNodes().length; i++) {
          debugger;
          this.$refs.tree.store._getAllNodes()[i].expanded = true;
        }
      });
    },

收起

shrink() {this.$nextTick(() => {
        debugger;
        for (var i = 0; i < this.$refs.tree.store._getAllNodes().length; i++) {
          debugger;
          this.$refs.tree.store._getAllNodes()[i].expanded = false;
        }
      });
    },
退出移动版