From cc1e18eda76c9ea17897aca5d5187a4b045c2646 Mon Sep 17 00:00:00 2001 From: yerl Date: Fri, 2 Aug 2024 09:36:01 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E5=8F=B3=E5=9B=BA=E5=AE=9A=E5=88=97=E5=8D=95=E5=85=83=E6=A0=BC?= =?UTF-8?q?=E5=90=88=E5=B9=B6=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/table/table-body.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/table/table-body.vue b/src/components/table/table-body.vue index 941437e4b..70c35b347 100644 --- a/src/components/table/table-body.vue +++ b/src/components/table/table-body.vue @@ -72,6 +72,14 @@ } }, computed: { + // 非右固定列数 + notFixedRightColumnsCount() { + if (this.fixed == 'right') { + return this.columns.filter(item => item.fixed != 'right').length + } else { + return 0 + } + }, expandRender () { let render = function () { return ''; @@ -135,7 +143,7 @@ row, column, rowIndex, - columnIndex + columnIndex: column.fixed == 'right' ? (columnIndex + this.notFixedRightColumnsCount) : columnIndex }); let rowspan = 1; let colspan = 1;