if (aCommand == 'Proline_Collapse') { this.$nextTick(()=>{ this.$refs.tree_ext.fn_setChildNodenotExpand(this.$refs.tree_ext.in_rootNode,false); }) } this.$nextTick(()=>{ this.$refs.tree_ext.fn_setChildNodenotExpand(this.$refs.tree_ext.in_rootNode,true); }); fn_setChildNodenotExpand(anode,flag){ // in_rootNode: Node // checked: false // childNodes: Array(1) // data: undefined // expanded: false anode.expanded = flag; if(anode.childNodes.length > 0){ anode.childNodes.forEach(node=>{ this.fn_setChildNodenotExpand(node, flag); }) } }
Element UI 树组件 全折叠 全展开
最新推荐文章于 2024-05-31 15:59:20 发布