chore: classNameExpr 已经所有属性都支持,不需要单独处理了 Closes #3869 (#9007)

This commit is contained in:
吴多益 2023-12-04 20:49:58 +08:00 committed by GitHub
parent 6011308802
commit 80e93078be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 14 deletions

View File

@ -154,10 +154,7 @@ export class TableCell extends React.Component<TableCellProps> {
<Component <Component
rowSpan={rowSpan > 1 ? rowSpan : undefined} rowSpan={rowSpan > 1 ? rowSpan : undefined}
style={style} style={style}
className={cx( className={cx(className)}
className,
column.classNameExpr ? filter(column.classNameExpr, data) : null
)}
tabIndex={tabIndex} tabIndex={tabIndex}
onKeyUp={onKeyUp} onKeyUp={onKeyUp}
> >

View File

@ -993,16 +993,6 @@ export default class Table2 extends React.Component<Table2Props, object> {
}); });
} }
// 设置了单元格样式
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) { if (column.searchable) {
clone.filterDropdown = ( clone.filterDropdown = (