1 | import { VNode } from 'vue'
|
2 | import { Table } from './table'
|
3 | import { ColumnOptions } from './column'
|
4 | import { FormOptions } from './form'
|
5 | import { FormItemOptions } from './form-item'
|
6 | import { ToolbarOptions } from './toolbar'
|
7 | import { PagerOptions } from './pager'
|
8 | import { RowInfo } from './component'
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export declare class Grid extends Table {
|
14 | |
15 |
|
16 |
|
17 | columns?: GridColumns[];
|
18 | |
19 |
|
20 |
|
21 | pagerConfig?: GridPagerConfig;
|
22 | |
23 |
|
24 |
|
25 | proxyConfig?: GridProxyConfig;
|
26 | proxyOpts: GridProxyConfig;
|
27 | |
28 |
|
29 |
|
30 | toolbarConfig?: GridToolbarConfig;
|
31 | |
32 |
|
33 |
|
34 | formConfig?: GridFormOptions;
|
35 | formOpts: GridFormOptions;
|
36 |
|
37 | |
38 |
|
39 |
|
40 |
|
41 | commitProxy(code: string): Promise<any>;
|
42 | |
43 |
|
44 |
|
45 | getFormItems(index?: number): FormItemOptions[];
|
46 | |
47 |
|
48 |
|
49 | getPendingRecords(): RowInfo[];
|
50 | |
51 |
|
52 |
|
53 | zoom(): Promise<boolean>;
|
54 | |
55 |
|
56 |
|
57 | isMaximized(): boolean;
|
58 | |
59 |
|
60 |
|
61 | maximize(): Promise<any>;
|
62 | |
63 |
|
64 |
|
65 | revert(): Promise<any>;
|
66 | |
67 |
|
68 |
|
69 | getProxyInfo(): {
|
70 | data: any;
|
71 | filter: any;
|
72 | form: any;
|
73 | sort: any;
|
74 | pager: any;
|
75 | pendingRecords: any[];
|
76 | };
|
77 | [key: string]: any;
|
78 | }
|
79 |
|
80 | export interface GridProxyQueryPageParams {
|
81 | pageSize: number;
|
82 | currentPage: number;
|
83 | }
|
84 |
|
85 | export interface GridProxyQuerySortParams {
|
86 | order: string;
|
87 | property: string;
|
88 | }
|
89 |
|
90 | export interface GridProxyQueryFiltersParams {
|
91 | property: string;
|
92 | values: any[];
|
93 | }
|
94 |
|
95 | export interface GridProxyConfig {
|
96 | autoLoad?: boolean;
|
97 | message?: boolean;
|
98 | seq?: boolean;
|
99 | sort?: boolean;
|
100 | filter?: boolean;
|
101 | form?: boolean;
|
102 | props?: {
|
103 | list?: string;
|
104 | result?: string;
|
105 | total?: string;
|
106 | message?: string;
|
107 | };
|
108 | ajax?: {
|
109 | query?(params: { page: GridProxyQueryPageParams, sort: GridProxyQuerySortParams, filters: GridProxyQueryFiltersParams[], form: any }, ...args: any[]): Promise<any>;
|
110 | delete?(params: { body: { removeRecords: any[] } }, ...args: any[]): Promise<any>;
|
111 | save?(params: { body: { insertRecords: any[], updateRecords: any[], removeRecords: any[], pendingRecords: any[] } }, ...args: any[]): Promise<any>;
|
112 | }
|
113 | [key: string]: any;
|
114 | }
|
115 |
|
116 | export interface GridPagerConfig extends PagerOptions {
|
117 | [key: string]: any;
|
118 | }
|
119 |
|
120 | export interface GridColumns extends ColumnOptions {
|
121 | children?: GridColumns[];
|
122 | }
|
123 |
|
124 | export interface GridToolbarConfig extends ToolbarOptions {
|
125 | zoom?: boolean | {
|
126 | escRestore?: boolean;
|
127 | iconIn?: string;
|
128 | iconOut?: string;
|
129 | };
|
130 | slots?: {
|
131 | buttons?(): VNode[] | string[];
|
132 | tools?(): VNode[] | string[];
|
133 | }
|
134 | }
|
135 |
|
136 | export interface GridFormOptions extends FormOptions {
|
137 | [key: string]: any;
|
138 | }
|