diff --git a/packages/amis/src/renderers/Table/TableCell.tsx b/packages/amis/src/renderers/Table/TableCell.tsx index 5c13ec268..0017537de 100644 --- a/packages/amis/src/renderers/Table/TableCell.tsx +++ b/packages/amis/src/renderers/Table/TableCell.tsx @@ -154,10 +154,7 @@ export class TableCell extends React.Component { 1 ? rowSpan : undefined} style={style} - className={cx( - className, - column.classNameExpr ? filter(column.classNameExpr, data) : null - )} + className={cx(className)} tabIndex={tabIndex} onKeyUp={onKeyUp} > diff --git a/packages/amis/src/renderers/Table2/index.tsx b/packages/amis/src/renderers/Table2/index.tsx index 7e1bdbc1c..91019b74a 100644 --- a/packages/amis/src/renderers/Table2/index.tsx +++ b/packages/amis/src/renderers/Table2/index.tsx @@ -993,16 +993,6 @@ export default class Table2 extends React.Component { }); } - // 设置了单元格样式 - if (column.classNameExpr) { - clone.className = (record: any, rowIndex: number) => { - const className = filter(column.classNameExpr, {record, rowIndex}); - return `${className}${ - column.className ? ` ${column.className}` : '' - }`; - }; - } - // 设置了列搜索 if (column.searchable) { clone.filterDropdown = (