主要逻辑是
// 只允许当行展开逻辑 if (this.curExpandedRowKeys.length > 0) { let index = this.curExpandedRowKeys.indexOf(rowkey); if (index > -1) { this.curExpandedRowKeys.splice(index, 1); } else { this.curExpandedRowKeys.splice(0, this.curExpandedRowKeys.length); this.curExpandedRowKeys.push(rowkey); } } else { this.curExpandedRowKeys.push(rowkey); } }