elementUI tree组件收起

elementUI tree组件收起方法

this.$nextTick(() => {
          for (let i = 0; i < (this.$refs.sourceTree as any).store._getAllNodes().length; i++) {
            (this.$refs.sourceTree as any).store._getAllNodes()[i].expanded = false
          }
        })

  

原文地址:https://www.cnblogs.com/karila/p/13854502.html