fix:表格展开问题修改

This commit is contained in:
shijing 2026-07-28 15:44:24 +08:00
parent 5b007a536d
commit d599261715
1 changed files with 4 additions and 3 deletions

View File

@ -138,6 +138,7 @@ export default {
hideExport: { type: Boolean, default: false }, hideExport: { type: Boolean, default: false },
hExportCols: { type: Array, default: null }, hExportCols: { type: Array, default: null },
hExportName: { type: String, default: null }, hExportName: { type: String, default: null },
slotColumns: { type: Array, default: null },
paginationLayout: { type: String, default: config.paginationLayout }, paginationLayout: { type: String, default: config.paginationLayout },
}, },
watch: { watch: {
@ -562,16 +563,16 @@ export default {
}, },
// / // /
toggleExpandAll() { toggleExpandAll() {
const isExpandAll = this.expandRowKeys.length === this.$refs.scTable.data.length; const isExpandAll = this.expandRowKeys.length === this.tableData.length;
if (isExpandAll) { if (isExpandAll) {
this.expandRowKeys = []; // this.expandRowKeys = []; //
} else { } else {
this.expandRowKeys = this.$refs.scTable.data.map(item => item.id); // this.expandRowKeys = this.tableData.map(item => item.id); //
} }
}, },
// expandRowKeys // expandRowKeys
handleExpandChange(row, expandedRows) { handleExpandChange(row, expandedRows) {
this.expandRowKeys = expandedRows.map(row => row.is); // this.expandRowKeys = expandedRows.map(row => row.id); //
} }
}, },
}; };