@vtj/ui 0.8.39 → 0.8.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +18417 -17967
- package/dist/index.umd.js +14 -14
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/types/adapter.d.ts +3 -1
- package/types/components/field/Field.d.ts +3 -3
- package/types/components/field/builtin.d.ts +2 -1
- package/types/components/field/index.d.ts +1 -0
- package/types/components/field/types.d.ts +4 -4
- package/types/components/grid/Grid.d.ts +56 -46
- package/types/components/grid/hooks/index.d.ts +1 -0
- package/types/components/grid/hooks/useLoader.d.ts +661 -0
- package/types/components/grid/hooks/useProps.d.ts +6 -21
- package/types/components/grid/hooks/useState.d.ts +654 -0
- package/types/components/grid/props.d.ts +22 -25
- package/types/components/grid/renderers/components/PickerEdit.d.ts +18 -0
- package/types/components/grid/renderers/picker.d.ts +3 -0
- package/types/components/grid/types.d.ts +14 -0
- package/types/components/index.d.ts +1 -0
- package/types/components/list/List.d.ts +1 -1
- package/types/components/picker/Dialog.d.ts +24 -0
- package/types/components/picker/Picker.d.ts +436 -0
- package/types/components/picker/hooks.d.ts +14 -0
- package/types/components/picker/index.d.ts +4 -0
- package/types/components/picker/props.d.ts +269 -0
- package/types/components/picker/types.d.ts +19 -0
- package/types/components/query-form/QueryForm.d.ts +9 -0
- package/types/components/query-form/hooks.d.ts +2 -1
- package/types/components/query-form/props.d.ts +4 -0
- package/types/components/shared.d.ts +1 -0
- package/types/version.d.ts +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType, InjectionKey, ComponentInternalInstance } from 'vue';
|
|
2
|
-
import { GridColumns, GridCustomInfo,
|
|
2
|
+
import { GridColumns, GridCustomInfo, GridCellRenders, GridEditRenders, GridFilterRenders, GridLoader } from './types';
|
|
3
3
|
import { Options } from 'sortablejs';
|
|
4
4
|
|
|
5
5
|
export declare const gridProps: {
|
|
@@ -10,6 +10,9 @@ export declare const gridProps: {
|
|
|
10
10
|
type: PropType<GridColumns>;
|
|
11
11
|
default(): GridColumns;
|
|
12
12
|
};
|
|
13
|
+
loader: {
|
|
14
|
+
type: PropType<GridLoader>;
|
|
15
|
+
};
|
|
13
16
|
/**
|
|
14
17
|
* 行拖拽排序
|
|
15
18
|
*/
|
|
@@ -50,38 +53,38 @@ export declare const gridProps: {
|
|
|
50
53
|
default: boolean;
|
|
51
54
|
};
|
|
52
55
|
/**
|
|
53
|
-
*
|
|
54
|
-
* 如果使用了服务端排序,sort 属性可以获取相关信息;
|
|
55
|
-
* 如果使用了服务端过滤,filter 属性可以获取相关信息;
|
|
56
|
-
* 如果使用了表单,form 属性可以获取相关信息
|
|
56
|
+
* 开启分页
|
|
57
57
|
*/
|
|
58
|
-
|
|
59
|
-
type:
|
|
58
|
+
pager: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
60
|
};
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
63
|
-
* 例如导出模式 export-config.mode=all 时会触发该方法并将返回值进行导出
|
|
62
|
+
* 初始页码
|
|
64
63
|
*/
|
|
65
|
-
|
|
66
|
-
type:
|
|
64
|
+
page: {
|
|
65
|
+
type: NumberConstructor;
|
|
66
|
+
default: number;
|
|
67
67
|
};
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* 初始每页显示条目个数
|
|
70
70
|
*/
|
|
71
|
-
|
|
72
|
-
type:
|
|
71
|
+
pageSize: {
|
|
72
|
+
type: NumberConstructor;
|
|
73
|
+
default: number;
|
|
73
74
|
};
|
|
74
75
|
/**
|
|
75
|
-
*
|
|
76
|
+
* 每页显示个数选择器的选项设置
|
|
76
77
|
*/
|
|
77
|
-
|
|
78
|
-
type: PropType<
|
|
78
|
+
pageSizes: {
|
|
79
|
+
type: PropType<number[]>;
|
|
80
|
+
default: () => number[];
|
|
79
81
|
};
|
|
80
82
|
/**
|
|
81
|
-
*
|
|
83
|
+
* 初始执行加载函数
|
|
82
84
|
*/
|
|
83
|
-
|
|
85
|
+
auto: {
|
|
84
86
|
type: BooleanConstructor;
|
|
87
|
+
default: boolean;
|
|
85
88
|
};
|
|
86
89
|
/**
|
|
87
90
|
* 开启虚拟滚动
|
|
@@ -115,11 +118,5 @@ export declare const gridProps: {
|
|
|
115
118
|
type: BooleanConstructor;
|
|
116
119
|
default: boolean;
|
|
117
120
|
};
|
|
118
|
-
/**
|
|
119
|
-
* 查询表单模型数据
|
|
120
|
-
*/
|
|
121
|
-
queryModel: {
|
|
122
|
-
type: PropType<Record<string, any>>;
|
|
123
|
-
};
|
|
124
121
|
};
|
|
125
122
|
export declare const GridInstanceKey: InjectionKey<ComponentInternalInstance | null>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { VxeGlobalRendererHandles } from '../../types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
params: VxeGlobalRendererHandles.RenderEditParams;
|
|
6
|
+
renderOpts: VxeGlobalRendererHandles.RenderEditOptions;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
|
|
9
|
+
export default _default;
|
|
10
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
11
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
12
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
13
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
14
|
+
} : {
|
|
15
|
+
type: PropType<T[K]>;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -19,6 +19,19 @@ export interface GridSortableEvent {
|
|
|
19
19
|
e: Sortable.SortableEvent;
|
|
20
20
|
}
|
|
21
21
|
export type GridColumns = VxeGridPropTypes.Columns;
|
|
22
|
+
export interface GridState {
|
|
23
|
+
page?: number;
|
|
24
|
+
pageSize?: number;
|
|
25
|
+
total?: number;
|
|
26
|
+
filters?: VxeTableDefines.FilterCheckedParams[];
|
|
27
|
+
sorts?: VxeTableDefines.SortCheckedParams[];
|
|
28
|
+
[index: string]: any;
|
|
29
|
+
}
|
|
30
|
+
export interface GridLoaderData {
|
|
31
|
+
list: any[];
|
|
32
|
+
total: number;
|
|
33
|
+
}
|
|
34
|
+
export type GridLoader = (state: GridState) => GridLoaderData | Promise<GridLoaderData>;
|
|
22
35
|
export type GridCustomInfo = {
|
|
23
36
|
id: string;
|
|
24
37
|
resize?: Record<string, number>;
|
|
@@ -44,6 +57,7 @@ export type GridEmits = {
|
|
|
44
57
|
columnSort: [e: GridSortableEvent];
|
|
45
58
|
cellSelected: [params: any];
|
|
46
59
|
editChange: [data: any[]];
|
|
60
|
+
loaded: [rows: any[]];
|
|
47
61
|
};
|
|
48
62
|
export type GridInstance = InstanceType<typeof Grid>;
|
|
49
63
|
export type { VxeGridInstance, VxeTableDefines, VxeGridPropTypes, VxeColumnPropTypes, VxeGridEvents, VxeGridDefines, VxeGridProps, VxeGlobalRendererHandles, VxeColumnSlotTypes, DefineRendererOption, VxeGlobalInterceptorHandles };
|
|
@@ -91,8 +91,8 @@ declare const _default: __VLS_WithTemplateSlots< DefineComponent<{
|
|
|
91
91
|
data: DataLoader<ListData, ListState>;
|
|
92
92
|
width: string | number;
|
|
93
93
|
height: string | number;
|
|
94
|
-
pageSize: number;
|
|
95
94
|
page: number;
|
|
95
|
+
pageSize: number;
|
|
96
96
|
}, {}>, {
|
|
97
97
|
empty?(_: {}): any;
|
|
98
98
|
default?(_: {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { PickerColumns, PrickerFields, PickerLoader } from './types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
export interface Props {
|
|
5
|
+
gridProps?: any;
|
|
6
|
+
formProps?: any;
|
|
7
|
+
columns?: PickerColumns;
|
|
8
|
+
fields?: PrickerFields;
|
|
9
|
+
loader?: PickerLoader;
|
|
10
|
+
formModel?: Record<string, any>;
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
onPick: (rows: any[]) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
17
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
18
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
19
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
20
|
+
} : {
|
|
21
|
+
type: PropType<T[K]>;
|
|
22
|
+
required: true;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
import { DefineComponent, PropType, ExtractPropTypes, VNode, RendererNode, RendererElement, ComputedRef, Ref, ComponentOptionsMixin, PublicProps } from 'vue';
|
|
2
|
+
import { GridColumns, QueryFormItems, GridLoader, UnReadOnly, IconParam, BaseSize, DialogMode, GridCustomInfo, GridCellRenders, GridEditRenders, GridFilterRenders } from '..';
|
|
3
|
+
import { DraggableOptions, ResizableOptions } from '../..';
|
|
4
|
+
import { Options } from 'sortablejs';
|
|
5
|
+
declare const _default: DefineComponent<{
|
|
6
|
+
columns: {
|
|
7
|
+
type: PropType<GridColumns>;
|
|
8
|
+
};
|
|
9
|
+
fields: {
|
|
10
|
+
type: PropType<QueryFormItems>;
|
|
11
|
+
};
|
|
12
|
+
loader: {
|
|
13
|
+
type: PropType<GridLoader>;
|
|
14
|
+
};
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: (StringConstructor | NumberConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
17
|
+
};
|
|
18
|
+
multiple: {
|
|
19
|
+
type: BooleanConstructor;
|
|
20
|
+
};
|
|
21
|
+
raw: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
};
|
|
24
|
+
disabled: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
};
|
|
27
|
+
append: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
};
|
|
30
|
+
valueKey: {
|
|
31
|
+
type: StringConstructor;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
labelKey: {
|
|
35
|
+
type: StringConstructor;
|
|
36
|
+
default: string;
|
|
37
|
+
};
|
|
38
|
+
queryKey: {
|
|
39
|
+
type: StringConstructor;
|
|
40
|
+
};
|
|
41
|
+
preload: {
|
|
42
|
+
type: BooleanConstructor;
|
|
43
|
+
};
|
|
44
|
+
defaultQuery: {
|
|
45
|
+
type: PropType<() => any>;
|
|
46
|
+
};
|
|
47
|
+
dialogProps: {
|
|
48
|
+
type: PropType<UnReadOnly<Partial<Readonly<Partial< ExtractPropTypes<{
|
|
49
|
+
modelValue: {
|
|
50
|
+
type: BooleanConstructor;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
53
|
+
title: {
|
|
54
|
+
type: StringConstructor;
|
|
55
|
+
};
|
|
56
|
+
subtitle: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
};
|
|
59
|
+
icon: {
|
|
60
|
+
type: PropType<IconParam>;
|
|
61
|
+
};
|
|
62
|
+
size: {
|
|
63
|
+
type: PropType<BaseSize>;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
width: {
|
|
67
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
68
|
+
default: string;
|
|
69
|
+
};
|
|
70
|
+
height: {
|
|
71
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
74
|
+
left: {
|
|
75
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
76
|
+
};
|
|
77
|
+
top: {
|
|
78
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
79
|
+
};
|
|
80
|
+
modal: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
84
|
+
draggable: {
|
|
85
|
+
type: PropType<boolean | DraggableOptions>;
|
|
86
|
+
default: boolean;
|
|
87
|
+
};
|
|
88
|
+
resizable: {
|
|
89
|
+
type: PropType<boolean | ResizableOptions>;
|
|
90
|
+
};
|
|
91
|
+
closable: {
|
|
92
|
+
type: BooleanConstructor;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
95
|
+
maximizable: {
|
|
96
|
+
type: BooleanConstructor;
|
|
97
|
+
default: boolean;
|
|
98
|
+
};
|
|
99
|
+
minimizable: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
default: boolean;
|
|
102
|
+
};
|
|
103
|
+
mode: {
|
|
104
|
+
type: PropType<DialogMode>;
|
|
105
|
+
default: string;
|
|
106
|
+
};
|
|
107
|
+
content: {
|
|
108
|
+
type: PropType<Record<string, any> | VNode<RendererNode, RendererElement, {
|
|
109
|
+
[key: string]: any;
|
|
110
|
+
}> | DefineComponent<any, any, any, any>>;
|
|
111
|
+
};
|
|
112
|
+
src: {
|
|
113
|
+
type: StringConstructor;
|
|
114
|
+
};
|
|
115
|
+
componentInstance: {
|
|
116
|
+
type: PropType<Record<string, any> | null>;
|
|
117
|
+
};
|
|
118
|
+
beforeClose: {
|
|
119
|
+
type: PropType<() => boolean | Promise<boolean>>;
|
|
120
|
+
};
|
|
121
|
+
submit: {
|
|
122
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
123
|
+
};
|
|
124
|
+
cancel: {
|
|
125
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
126
|
+
};
|
|
127
|
+
bodyPadding: {
|
|
128
|
+
type: BooleanConstructor;
|
|
129
|
+
default: boolean;
|
|
130
|
+
};
|
|
131
|
+
primary: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
};
|
|
134
|
+
}>>>>>>;
|
|
135
|
+
};
|
|
136
|
+
gridProps: {
|
|
137
|
+
type: PropType<UnReadOnly<Partial<Readonly<Partial< ExtractPropTypes<{
|
|
138
|
+
columns: {
|
|
139
|
+
type: PropType<GridColumns>;
|
|
140
|
+
default(): GridColumns;
|
|
141
|
+
};
|
|
142
|
+
loader: {
|
|
143
|
+
type: PropType<GridLoader>;
|
|
144
|
+
};
|
|
145
|
+
rowSortable: {
|
|
146
|
+
type: PropType<boolean | Options>;
|
|
147
|
+
default: boolean;
|
|
148
|
+
};
|
|
149
|
+
columnSortable: {
|
|
150
|
+
type: PropType<boolean | Options>;
|
|
151
|
+
default: boolean;
|
|
152
|
+
};
|
|
153
|
+
customable: {
|
|
154
|
+
type: BooleanConstructor;
|
|
155
|
+
};
|
|
156
|
+
getCustom: {
|
|
157
|
+
type: PropType<(id: string) => Promise< GridCustomInfo>>;
|
|
158
|
+
};
|
|
159
|
+
saveCustom: {
|
|
160
|
+
type: PropType<(info: GridCustomInfo) => Promise<any>>;
|
|
161
|
+
};
|
|
162
|
+
resizable: {
|
|
163
|
+
type: BooleanConstructor;
|
|
164
|
+
default: boolean;
|
|
165
|
+
};
|
|
166
|
+
pager: {
|
|
167
|
+
type: BooleanConstructor;
|
|
168
|
+
};
|
|
169
|
+
page: {
|
|
170
|
+
type: NumberConstructor;
|
|
171
|
+
default: number;
|
|
172
|
+
};
|
|
173
|
+
pageSize: {
|
|
174
|
+
type: NumberConstructor;
|
|
175
|
+
default: number;
|
|
176
|
+
};
|
|
177
|
+
pageSizes: {
|
|
178
|
+
type: PropType<number[]>;
|
|
179
|
+
default: () => number[];
|
|
180
|
+
};
|
|
181
|
+
auto: {
|
|
182
|
+
type: BooleanConstructor;
|
|
183
|
+
default: boolean;
|
|
184
|
+
};
|
|
185
|
+
virtual: {
|
|
186
|
+
type: BooleanConstructor;
|
|
187
|
+
default: boolean;
|
|
188
|
+
};
|
|
189
|
+
cellRenders: {
|
|
190
|
+
type: PropType<GridCellRenders>;
|
|
191
|
+
};
|
|
192
|
+
editRenders: {
|
|
193
|
+
type: PropType<GridEditRenders>;
|
|
194
|
+
};
|
|
195
|
+
filterRenders: {
|
|
196
|
+
type: PropType<GridFilterRenders>;
|
|
197
|
+
};
|
|
198
|
+
editable: {
|
|
199
|
+
type: BooleanConstructor;
|
|
200
|
+
default: boolean;
|
|
201
|
+
};
|
|
202
|
+
}>>>>>>;
|
|
203
|
+
};
|
|
204
|
+
formProps: {
|
|
205
|
+
type: PropType<Record<string, any>>;
|
|
206
|
+
};
|
|
207
|
+
}, {
|
|
208
|
+
focus: () => void;
|
|
209
|
+
blur: () => void;
|
|
210
|
+
disabled: ComputedRef<boolean>;
|
|
211
|
+
options: Ref<{
|
|
212
|
+
label: string;
|
|
213
|
+
value: any;
|
|
214
|
+
}[]>;
|
|
215
|
+
setOptions: (rows: any, append?: boolean | undefined) => void;
|
|
216
|
+
current: Ref<any>;
|
|
217
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
218
|
+
change: (value: any) => void;
|
|
219
|
+
"update:modelValue": (value: any) => void;
|
|
220
|
+
picked: (value: any) => void;
|
|
221
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
222
|
+
columns: {
|
|
223
|
+
type: PropType<GridColumns>;
|
|
224
|
+
};
|
|
225
|
+
fields: {
|
|
226
|
+
type: PropType<QueryFormItems>;
|
|
227
|
+
};
|
|
228
|
+
loader: {
|
|
229
|
+
type: PropType<GridLoader>;
|
|
230
|
+
};
|
|
231
|
+
modelValue: {
|
|
232
|
+
type: (StringConstructor | NumberConstructor | ObjectConstructor | ArrayConstructor)[];
|
|
233
|
+
};
|
|
234
|
+
multiple: {
|
|
235
|
+
type: BooleanConstructor;
|
|
236
|
+
};
|
|
237
|
+
raw: {
|
|
238
|
+
type: BooleanConstructor;
|
|
239
|
+
};
|
|
240
|
+
disabled: {
|
|
241
|
+
type: BooleanConstructor;
|
|
242
|
+
};
|
|
243
|
+
append: {
|
|
244
|
+
type: BooleanConstructor;
|
|
245
|
+
};
|
|
246
|
+
valueKey: {
|
|
247
|
+
type: StringConstructor;
|
|
248
|
+
default: string;
|
|
249
|
+
};
|
|
250
|
+
labelKey: {
|
|
251
|
+
type: StringConstructor;
|
|
252
|
+
default: string;
|
|
253
|
+
};
|
|
254
|
+
queryKey: {
|
|
255
|
+
type: StringConstructor;
|
|
256
|
+
};
|
|
257
|
+
preload: {
|
|
258
|
+
type: BooleanConstructor;
|
|
259
|
+
};
|
|
260
|
+
defaultQuery: {
|
|
261
|
+
type: PropType<() => any>;
|
|
262
|
+
};
|
|
263
|
+
dialogProps: {
|
|
264
|
+
type: PropType<UnReadOnly<Partial<Readonly<Partial< ExtractPropTypes<{
|
|
265
|
+
modelValue: {
|
|
266
|
+
type: BooleanConstructor;
|
|
267
|
+
default: boolean;
|
|
268
|
+
};
|
|
269
|
+
title: {
|
|
270
|
+
type: StringConstructor;
|
|
271
|
+
};
|
|
272
|
+
subtitle: {
|
|
273
|
+
type: StringConstructor;
|
|
274
|
+
};
|
|
275
|
+
icon: {
|
|
276
|
+
type: PropType<IconParam>;
|
|
277
|
+
};
|
|
278
|
+
size: {
|
|
279
|
+
type: PropType<BaseSize>;
|
|
280
|
+
default: string;
|
|
281
|
+
};
|
|
282
|
+
width: {
|
|
283
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
284
|
+
default: string;
|
|
285
|
+
};
|
|
286
|
+
height: {
|
|
287
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
288
|
+
default: string;
|
|
289
|
+
};
|
|
290
|
+
left: {
|
|
291
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
292
|
+
};
|
|
293
|
+
top: {
|
|
294
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
295
|
+
};
|
|
296
|
+
modal: {
|
|
297
|
+
type: BooleanConstructor;
|
|
298
|
+
default: boolean;
|
|
299
|
+
};
|
|
300
|
+
draggable: {
|
|
301
|
+
type: PropType<boolean | DraggableOptions>;
|
|
302
|
+
default: boolean;
|
|
303
|
+
};
|
|
304
|
+
resizable: {
|
|
305
|
+
type: PropType<boolean | ResizableOptions>;
|
|
306
|
+
};
|
|
307
|
+
closable: {
|
|
308
|
+
type: BooleanConstructor;
|
|
309
|
+
default: boolean;
|
|
310
|
+
};
|
|
311
|
+
maximizable: {
|
|
312
|
+
type: BooleanConstructor;
|
|
313
|
+
default: boolean;
|
|
314
|
+
};
|
|
315
|
+
minimizable: {
|
|
316
|
+
type: BooleanConstructor;
|
|
317
|
+
default: boolean;
|
|
318
|
+
};
|
|
319
|
+
mode: {
|
|
320
|
+
type: PropType<DialogMode>;
|
|
321
|
+
default: string;
|
|
322
|
+
};
|
|
323
|
+
content: {
|
|
324
|
+
type: PropType<Record<string, any> | VNode<RendererNode, RendererElement, {
|
|
325
|
+
[key: string]: any;
|
|
326
|
+
}> | DefineComponent<any, any, any, any>>;
|
|
327
|
+
};
|
|
328
|
+
src: {
|
|
329
|
+
type: StringConstructor;
|
|
330
|
+
};
|
|
331
|
+
componentInstance: {
|
|
332
|
+
type: PropType<Record<string, any> | null>;
|
|
333
|
+
};
|
|
334
|
+
beforeClose: {
|
|
335
|
+
type: PropType<() => boolean | Promise<boolean>>;
|
|
336
|
+
};
|
|
337
|
+
submit: {
|
|
338
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
339
|
+
};
|
|
340
|
+
cancel: {
|
|
341
|
+
type: (BooleanConstructor | StringConstructor)[];
|
|
342
|
+
};
|
|
343
|
+
bodyPadding: {
|
|
344
|
+
type: BooleanConstructor;
|
|
345
|
+
default: boolean;
|
|
346
|
+
};
|
|
347
|
+
primary: {
|
|
348
|
+
type: BooleanConstructor;
|
|
349
|
+
};
|
|
350
|
+
}>>>>>>;
|
|
351
|
+
};
|
|
352
|
+
gridProps: {
|
|
353
|
+
type: PropType<UnReadOnly<Partial<Readonly<Partial< ExtractPropTypes<{
|
|
354
|
+
columns: {
|
|
355
|
+
type: PropType<GridColumns>;
|
|
356
|
+
default(): GridColumns;
|
|
357
|
+
};
|
|
358
|
+
loader: {
|
|
359
|
+
type: PropType<GridLoader>;
|
|
360
|
+
};
|
|
361
|
+
rowSortable: {
|
|
362
|
+
type: PropType<boolean | Options>;
|
|
363
|
+
default: boolean;
|
|
364
|
+
};
|
|
365
|
+
columnSortable: {
|
|
366
|
+
type: PropType<boolean | Options>;
|
|
367
|
+
default: boolean;
|
|
368
|
+
};
|
|
369
|
+
customable: {
|
|
370
|
+
type: BooleanConstructor;
|
|
371
|
+
};
|
|
372
|
+
getCustom: {
|
|
373
|
+
type: PropType<(id: string) => Promise< GridCustomInfo>>;
|
|
374
|
+
};
|
|
375
|
+
saveCustom: {
|
|
376
|
+
type: PropType<(info: GridCustomInfo) => Promise<any>>;
|
|
377
|
+
};
|
|
378
|
+
resizable: {
|
|
379
|
+
type: BooleanConstructor;
|
|
380
|
+
default: boolean;
|
|
381
|
+
};
|
|
382
|
+
pager: {
|
|
383
|
+
type: BooleanConstructor;
|
|
384
|
+
};
|
|
385
|
+
page: {
|
|
386
|
+
type: NumberConstructor;
|
|
387
|
+
default: number;
|
|
388
|
+
};
|
|
389
|
+
pageSize: {
|
|
390
|
+
type: NumberConstructor;
|
|
391
|
+
default: number;
|
|
392
|
+
};
|
|
393
|
+
pageSizes: {
|
|
394
|
+
type: PropType<number[]>;
|
|
395
|
+
default: () => number[];
|
|
396
|
+
};
|
|
397
|
+
auto: {
|
|
398
|
+
type: BooleanConstructor;
|
|
399
|
+
default: boolean;
|
|
400
|
+
};
|
|
401
|
+
virtual: {
|
|
402
|
+
type: BooleanConstructor;
|
|
403
|
+
default: boolean;
|
|
404
|
+
};
|
|
405
|
+
cellRenders: {
|
|
406
|
+
type: PropType<GridCellRenders>;
|
|
407
|
+
};
|
|
408
|
+
editRenders: {
|
|
409
|
+
type: PropType<GridEditRenders>;
|
|
410
|
+
};
|
|
411
|
+
filterRenders: {
|
|
412
|
+
type: PropType<GridFilterRenders>;
|
|
413
|
+
};
|
|
414
|
+
editable: {
|
|
415
|
+
type: BooleanConstructor;
|
|
416
|
+
default: boolean;
|
|
417
|
+
};
|
|
418
|
+
}>>>>>>;
|
|
419
|
+
};
|
|
420
|
+
formProps: {
|
|
421
|
+
type: PropType<Record<string, any>>;
|
|
422
|
+
};
|
|
423
|
+
}>> & {
|
|
424
|
+
onChange?: ((value: any) => any) | undefined;
|
|
425
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
426
|
+
onPicked?: ((value: any) => any) | undefined;
|
|
427
|
+
}, {
|
|
428
|
+
raw: boolean;
|
|
429
|
+
disabled: boolean;
|
|
430
|
+
multiple: boolean;
|
|
431
|
+
valueKey: string;
|
|
432
|
+
append: boolean;
|
|
433
|
+
labelKey: string;
|
|
434
|
+
preload: boolean;
|
|
435
|
+
}, {}>;
|
|
436
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Emits } from '../shared';
|
|
2
|
+
import { PickerProps, PickerEmits } from './types';
|
|
3
|
+
import { Ref, ComputedRef } from 'vue';
|
|
4
|
+
import { VxeTableDataRow } from 'vxe-table';
|
|
5
|
+
|
|
6
|
+
export declare function useOptions(props: PickerProps, emit: Emits<PickerEmits>): {
|
|
7
|
+
current: Ref<any>;
|
|
8
|
+
options: Ref<{
|
|
9
|
+
label: string;
|
|
10
|
+
value: any;
|
|
11
|
+
}[]>;
|
|
12
|
+
setOptions: (rows: any, append?: boolean) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare function useGridColumns(props: PickerProps): ComputedRef<import("vxe-table").VxeTableDefines.ColumnOptions<VxeTableDataRow>[]>;
|