From 18ced334d78fa2b4471b284f55a0b9fb6713c1c4 Mon Sep 17 00:00:00 2001 From: wanglinfang2014 Date: Fri, 29 Dec 2023 10:00:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dtable2=E8=A1=8C?= =?UTF-8?q?=E5=86=85=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E5=8F=82=E6=95=B0Close:#9177=20(#9258)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: wanglinfang --- packages/amis/src/renderers/Table2/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/amis/src/renderers/Table2/index.tsx b/packages/amis/src/renderers/Table2/index.tsx index 17f7b4c55..59ef0e601 100644 --- a/packages/amis/src/renderers/Table2/index.tsx +++ b/packages/amis/src/renderers/Table2/index.tsx @@ -932,6 +932,8 @@ export default class Table2 extends React.Component { }); const isGroupColumn = !!column.children?.length; + const finalCanAccessSuperData = + column.canAccessSuperData ?? canAccessSuperData; // 设置了type值 就完全按渲染器处理了 if (column.type) { Object.assign(clone, { @@ -949,11 +951,11 @@ export default class Table2 extends React.Component { const obj = { children: this.renderCellSchema(column, { - data: record, + data: item.locals, value: column.name ? resolveVariable( column.name, - canAccessSuperData ? item.locals : item.data + finalCanAccessSuperData ? item.locals : item.data ) : column.name, popOverContainer: