import { StyledProps } from '../common'; import { BaseTableCol, TableRowData, TdBaseTableProps, TdPrimaryTableProps } from './type'; export interface BaseTableProps extends TdBaseTableProps, StyledProps { /** * 多级表头场景,叶子结点变化时执行。非公开属性,请勿在业务中使用 */ onLeafColumnsChange?: (columns: BaseTableColumns) => void; /** * 表头是否可拖拽。非公开属性,请勿在业务中使用 */ thDraggable?: boolean; } export interface PrimaryTableProps extends TdPrimaryTableProps, StyledProps { } /** * SimpleTable is going to be deprecated, use BaseTableProps instead. */ export type SimpleTableProps = BaseTableProps; export interface BaseTableRef { tableElement: HTMLDivElement; tableHtmlElement: HTMLTableElement; tableContentElement: HTMLDivElement; refreshTable: () => void; } export type BaseTableColumns = TdBaseTableProps['columns']; export interface ColumnStickyLeftAndRight { left: number[]; right: number[]; top: number[]; bottom?: number[]; } export interface TableColFixedClasses { left: string; right: string; lastLeft: string; firstRight: string; leftShadow: string; rightShadow: string; } export interface TableRowFixedClasses { top: string; bottom: string; firstBottom: string; withoutBorderBottom: string; } export interface FixedColumnInfo { left?: number; right?: number; top?: number; bottom?: number; parent?: FixedColumnInfo; children?: string[]; width?: number; height?: number; col?: BaseTableCol; index?: number; lastLeftFixedCol?: boolean; firstRightFixedCol?: boolean; } export type RowAndColFixedPosition = Map>; export type TableTreeExpandType = 'expand-all' | 'fold-all' | 'user-reaction-change' | 'props-change'; export type PrimaryTableRef = BaseTableRef;