11import React , { MouseEvent , MutableRefObject , ReactNode } from 'react' ;
22import classNames from 'classnames' ;
3- import { isFunction , get } from 'lodash-es' ;
3+ import { get , isFunction } from 'lodash-es' ;
4+
45import TEllipsis from './Ellipsis' ;
5- import { BaseTableCellParams , RowspanColspan , TableRowData , TdBaseTableProps } from './type' ;
6- import { RowAndColFixedPosition } from './interface' ;
6+ import useClassName from './hooks/useClassName' ;
77import { getColumnFixedStyles } from './hooks/useFixed' ;
8- import { TableClassName } from './hooks/useClassName' ;
98import { formatClassNames } from './utils' ;
10- import { TooltipProps } from '../tooltip' ;
11- import { PaginationProps } from '../pagination' ;
9+
10+ import type { PaginationProps } from '../pagination' ;
11+ import type { TooltipProps } from '../tooltip' ;
12+ import type { RowAndColFixedPosition } from './interface' ;
13+ import type { BaseTableCellParams , RowspanColspan , TableRowData , TdBaseTableProps } from './type' ;
1214
1315export interface RenderEllipsisCellParams {
1416 cellNode : ReactNode ;
@@ -25,7 +27,6 @@ export interface CellProps {
2527 dataLength : number ;
2628 cellSpans : RowspanColspan ;
2729 cellEmptyContent : TdBaseTableProps [ 'cellEmptyContent' ] ;
28- tableClassNames : TableClassName ;
2930 tableRef ?: MutableRefObject < HTMLDivElement > ;
3031 classPrefix ?: string ;
3132 overlayClassName ?: string ;
@@ -94,11 +95,11 @@ function renderEllipsisCell(cellParams: BaseTableCellParams<TableRowData>, param
9495}
9596
9697const Cell = ( props : CellProps ) => {
97- const { cellParams, tableClassNames , tableRef, columnLength, classPrefix, overlayClassName, pagination } = props ;
98+ const { cellParams, tableRef, columnLength, classPrefix, overlayClassName, pagination } = props ;
9899 const { col, colIndex, rowIndex } = cellParams ;
99100 const { cellSpans, dataLength, rowAndColFixedPosition, cellEmptyContent, rowspanAndColspan, onClick } = props ;
100101 const { tableColFixedClasses, tdEllipsisClass, tableBaseClass, tdAlignClasses, tableDraggableClasses } =
101- tableClassNames ;
102+ useClassName ( ) ;
102103
103104 const cellNode = renderCell ( cellParams , { cellEmptyContent, pagination } ) ;
104105 const tdStyles = getColumnFixedStyles ( col , colIndex , rowAndColFixedPosition , tableColFixedClasses ) ;
0 commit comments