ElementUI 折叠tree全部节点
2019-07-19 本文已影响0人
jumper996
// tree为Tree组件的ref值,isexpand为true或false
this.$nextTick(() => {
for(let i=0;i<this.$refs.tree.store._getAllNodes().length;i++){
this.$refs.tree.store._getAllNodes()[i].expanded=false;
}
});