// 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;
}
});
// 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;
}
});
本文标题:ElementUI 折叠tree全部节点
本文链接:https://www.haomeiwen.com/subject/nudslctx.html
网友评论