@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里進行聲明