1.點擊按鈕,全部展開,然后el-tree則全部展開2.點擊按鈕,全部折疊,然后el-tree則全部折疊3.使用 :default-expand-all="isExpand",動態改變isExpand的值,值變化,樹卻沒有變化4.怎么實現?html代碼:<el-tree class="filter-tree treeoverflow" :data="data2" :props="defaultProps" highlight-current :filter-node-method="filterNode" @node-click="handleNodeClick" :default-expand-all="isExpand" ref="tree2"></el-tree>js代碼: isExpand(){ console.log('執行isExpand()'); this.czlx=this.$store.state.ysml.czlx; if( this.czlx=='111') { console.log("全部折疊"+this.czlx); this.iscolspann=false; return false; }else if( this.czlx=='222'){ console.log("全部展開"); this.iscolspann=true; return true; }else{ return false; }},
element-ui 怎樣動態控制樹的全部折疊和展開
白豬掌柜的
2019-03-20 22:15:49