element-UI树形table父子级全选
作者:互联网
@select-all="selectAll" ref="multipleTable" 在table里进行绑定 checkedKeys: false, 在data里进行声明 selectAll() { this.checkedKeys = !this.checkedKeys; this.splite(this.tableData, this.checkedKeys); }, /** * 处理数据 */ splite(data, flag) { data.forEach((row) => { this.$refs.multipleTable.toggleRowSelection(row, flag); if (row.children != undefined) { this.splite(row.children); } }); }, method里进行声明
标签:selectAll,checkedKeys,splite,element,全选,UI,table,data,row 来源: https://www.cnblogs.com/hurenjie/p/14007558.html