UNPKG

tdesign-mobile-vue

Version:
27 lines (26 loc) 1.58 kB
import { CellData, RowClassNameParams, TableColumnClassName, TableRowData, TdBaseTableProps } from '../type'; import { ClassName, HTMLElementAttributes } from '../../common'; import { SkipSpansValue } from '../hooks/useRowspanAndColspan'; export declare function toString(obj: any): string; export declare function debounce<T = any>(fn: Function, delay?: number): () => void; export interface FormatRowAttributesParams { row: TableRowData; rowIndex: number; type: 'body' | 'foot'; } export declare function formatRowAttributes(attributes: TdBaseTableProps['rowAttributes'], params: FormatRowAttributesParams): HTMLElementAttributes; export declare function formatRowClassNames(rowClassNames: TdBaseTableProps['rowClassName'], params: RowClassNameParams<TableRowData>, rowKey: string): ClassName; export declare function formatClassNames(classNames: TableColumnClassName<TableRowData> | TableColumnClassName<TableRowData>[], params: CellData<TableRowData>): any[]; export declare const INNER_PRE_NAME = "@@inner-"; export declare function getCurrentRowByKey<T extends { colKey?: string; children?: any[]; }>(columns: T[], key: string): T; export interface CellSpanResult { rowspan?: number; colspan?: number; skipped: boolean; } export declare const handleCellSpan: (cellKey: string, skipSpansMap?: Map<string, SkipSpansValue>) => CellSpanResult; export declare const isLastRowInSpan: (rowIndex: number, rowspan?: number, totalDataLength?: number) => boolean; export declare const isFirstColumnInSpan: (colIndex: number, rowspan?: number) => boolean;