UNPKG

xdesign-vue-next

Version:

XDesign Component for vue-next

33 lines (32 loc) 1.87 kB
import { CellData, RowClassNameParams, TableColumnClassName, TableRowData, TdBaseTableProps } from './type'; import { ClassName, HTMLElementAttributes } from '../common'; import { AffixProps } from '../affix'; 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 enum SCROLL_DIRECTION { X = "x", Y = "y", UNKNOWN = "unknown" } export declare const getScrollDirection: (scrollLeft: number, scrollTop: number) => SCROLL_DIRECTION; export declare const getRecord: (record: Record<any, any>) => Record<any, any>; export declare function getCurrentRowByKey<T extends { colKey?: string; children?: any[]; }>(columns: T[], key: string): T; export declare function getAffixProps(mainAffixProps: boolean | AffixProps, subAffixProps?: AffixProps): import("../affix").TdAffixProps; export declare function getEditableKeysMap(keys: Array<string | number>, list: any[], rowKey: string): { [key: string]: boolean; [key: number]: boolean; }; export declare function getColumnDataByKey(columns: any[], colKey: string): any; export declare function getColumnIndexByKey(columns: any[], colKey: string): number;