toggleRowExpansionAll (data, isExpansion) { data.forEach((item) => { this.$refs.tableCheck.toggleRowExpansion(item, isExpansion); if (item.children !== undefined && item.children !== null) { this.toggleRowExpansionAll(item.children, isExpansion); } }); },
<span class="curPointer" @click="toggleRowExpansionAll(treeData, true)" >全部展开 </span> | <span class="curPointer" @click="toggleRowExpansionAll(treeData, false)" >全部收起</span >
标签:el,isExpansion,item,toggleRowExpansionAll,table,children From: https://www.cnblogs.com/dianzan/p/18206766