fix: 修复table2行内无法获取全局参数Close:#9177 (#9258)

Co-authored-by: wanglinfang <wanglinfang@baidu.com>
This commit is contained in:
wanglinfang2014 2023-12-29 10:00:52 +08:00 committed by GitHub
parent 9b81c5532f
commit 18ced334d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -932,6 +932,8 @@ export default class Table2 extends React.Component<Table2Props, object> {
}); });
const isGroupColumn = !!column.children?.length; const isGroupColumn = !!column.children?.length;
const finalCanAccessSuperData =
column.canAccessSuperData ?? canAccessSuperData;
// 设置了type值 就完全按渲染器处理了 // 设置了type值 就完全按渲染器处理了
if (column.type) { if (column.type) {
Object.assign(clone, { Object.assign(clone, {
@ -949,11 +951,11 @@ export default class Table2 extends React.Component<Table2Props, object> {
const obj = { const obj = {
children: this.renderCellSchema(column, { children: this.renderCellSchema(column, {
data: record, data: item.locals,
value: column.name value: column.name
? resolveVariable( ? resolveVariable(
column.name, column.name,
canAccessSuperData ? item.locals : item.data finalCanAccessSuperData ? item.locals : item.data
) )
: column.name, : column.name,
popOverContainer: popOverContainer: