1 | import { Emitter } from '@mantou/gem/lib/decorators';
|
2 | import { GemElement, TemplateResult } from '@mantou/gem/lib/element';
|
3 | import { StyleObject } from '@mantou/gem/lib/utils';
|
4 | import { MenuItem } from './menu';
|
5 | import './placeholder';
|
6 | import './empty';
|
7 | import './tooltip';
|
8 | import './loading';
|
9 | import './space';
|
10 | import './selection-box';
|
11 | export declare type Column<T> = {
|
12 | title: string | TemplateResult;
|
13 | style?: StyleObject;
|
14 | ellipsis?: boolean;
|
15 | width?: string;
|
16 | tooltip?: string;
|
17 | dataIndex?: keyof T | string[];
|
18 | render?: (record: T) => string | TemplateResult;
|
19 | getActions?: (record: T, evt: HTMLElement) => MenuItem[];
|
20 | getColSpan?: (record: T, arr: T[]) => number;
|
21 | getRowSpan?: (record: T, arr: T[]) => number;
|
22 | data?: Record<string, unknown>;
|
23 | };
|
24 | export declare type Columns<T> = Column<T>[];
|
25 | export declare type ItemContextMenuEventDetail = {
|
26 | data: any;
|
27 | selected: boolean;
|
28 | originEvent: MouseEvent;
|
29 | };
|
30 |
|
31 |
|
32 |
|
33 | export declare class DuoyunTableElement extends GemElement {
|
34 | #private;
|
35 | static table: string;
|
36 | static th: string;
|
37 | static td: string;
|
38 | static tr: string;
|
39 | static side: string;
|
40 | caption: string;
|
41 | headless: boolean;
|
42 | selectable: boolean;
|
43 | selection?: any[];
|
44 | select: Emitter<any[]>;
|
45 | itemclick: Emitter<any>;
|
46 | itemcontextmenu: Emitter<ItemContextMenuEventDetail>;
|
47 | columns?: Column<any>[];
|
48 | data?: (Record<string, unknown> | undefined)[];
|
49 | getRowStyle?: (record: any) => StyleObject;
|
50 | noData?: string | TemplateResult;
|
51 | rowKey?: string | string[];
|
52 | expandedRowRender?: (record: any) => undefined | string | TemplateResult;
|
53 | expand: Emitter<any>;
|
54 | constructor();
|
55 | mounted: () => void;
|
56 | render: () => TemplateResult;
|
57 | appendSelection(items: any[]): void;
|
58 | removeSelection(items: any[]): void;
|
59 | }
|
60 | //# sourceMappingURL=table.d.ts.map |
\ | No newline at end of file |