From d599261715f8cdcf57fe599c0f037d0e1ae6bcf0 Mon Sep 17 00:00:00 2001 From: shijing Date: Tue, 28 Jul 2026 15:44:24 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=A1=A8=E6=A0=BC=E5=B1=95=E5=BC=80?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/scTable/index.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue index 7056b838..306e5d02 100644 --- a/src/components/scTable/index.vue +++ b/src/components/scTable/index.vue @@ -138,6 +138,7 @@ export default { hideExport: { type: Boolean, default: false }, hExportCols: { type: Array, default: null }, hExportName: { type: String, default: null }, + slotColumns: { type: Array, default: null }, paginationLayout: { type: String, default: config.paginationLayout }, }, watch: { @@ -562,16 +563,16 @@ export default { }, // 控制展开/收起所有行 toggleExpandAll() { - const isExpandAll = this.expandRowKeys.length === this.$refs.scTable.data.length; + const isExpandAll = this.expandRowKeys.length === this.tableData.length; if (isExpandAll) { this.expandRowKeys = []; // 收起所有 } else { - this.expandRowKeys = this.$refs.scTable.data.map(item => item.id); // 展开所有 + this.expandRowKeys = this.tableData.map(item => item.id); // 展开所有 } }, // 每次展开状态变化时更新 expandRowKeys handleExpandChange(row, expandedRows) { - this.expandRowKeys = expandedRows.map(row => row.is); // 根据实际的唯一标识 + this.expandRowKeys = expandedRows.map(row => row.id); // 根据实际的唯一标识 } }, };