@aplus-frontend/ui 0.0.1-beta.39 → 0.0.1-beta.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/es/index.mjs +104 -98
- package/es/src/ap-action/item-popconfirm/index.vue.d.ts +343 -0
- package/es/src/ap-custom-column/column-select.vue.mjs +19 -19
- package/es/src/ap-field/select/index.vue.d.ts +235 -0
- package/es/src/ap-form/interface.d.ts +1 -0
- package/es/src/ap-form/items/checkbox/index.vue.d.ts +47 -0
- package/es/src/ap-form/items/checkbox/index.vue.mjs +61 -0
- package/es/src/ap-form/items/checkbox/index.vue2.mjs +4 -0
- package/es/src/ap-form/items/index.d.ts +2 -1
- package/es/src/ap-form/items/index.mjs +1 -0
- package/es/src/ap-form/items/interface.d.ts +5 -1
- package/es/src/ap-form/modal-form/index.vue.d.ts +378 -0
- package/es/src/ap-form/search-form/index.vue.mjs +48 -44
- package/es/src/ap-table/ap-table.vue.d.ts +184 -0
- package/es/src/ap-table/ap-table.vue.mjs +258 -0
- package/es/src/ap-table/ap-table.vue2.mjs +4 -0
- package/es/src/ap-table/components/index/index.vue.d.ts +28 -0
- package/es/src/ap-table/components/index/index.vue.mjs +4 -0
- package/es/src/ap-table/components/index/index.vue2.mjs +21 -0
- package/es/src/ap-table/components/interface.d.ts +10 -0
- package/es/src/ap-table/components/style/index.css +12 -0
- package/es/src/ap-table/constants.d.ts +11075 -0
- package/es/src/ap-table/constants.mjs +55 -0
- package/es/src/ap-table/hooks/use-table-paging.d.ts +5 -1
- package/es/src/ap-table/hooks/use-table-paging.mjs +142 -0
- package/es/src/ap-table/index.d.ts +5 -0
- package/es/src/ap-table/index.mjs +6 -0
- package/es/src/ap-table/interface.d.ts +41 -14
- package/es/src/ap-table/interface.mjs +1 -0
- package/es/src/ap-table/style/ap-table.css +26 -0
- package/es/src/ap-table/utils.mjs +35 -0
- package/es/src/config-provider/config-provider-props.d.ts +152 -0
- package/es/src/config-provider/config-provider.d.ts +323 -0
- package/es/src/config-provider/config-provider.mjs +26 -34
- package/es/src/config-provider/hooks/use-global-config.d.ts +154 -0
- package/es/src/config-provider/index.d.ts +691 -0
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +206 -199
- package/es/src/modal/basic.vue.d.ts +464 -0
- package/es/src/modal/components/modal-footer.vue.d.ts +457 -0
- package/es/src/modal/components/modal.d.ts +443 -0
- package/es/src/modal/index.d.ts +963 -0
- package/es/src/modal/props.d.ts +283 -0
- package/es/src/pro-form/hooks/use-label-width.d.ts +312 -0
- package/es/src/pro-table/components/editable/editable-cell.vue.d.ts +82 -2
- package/es/src/theme/ap-table/ap-table-index.css +12 -0
- package/es/src/theme/ap-table/ap-table.css +26 -0
- package/es/src/theme/work-order-modal/index.css +2 -2
- package/es/src/work-order-modal/style/index.css +2 -2
- package/es/src/work-order-modal/work-order-modal.vue.mjs +35 -25
- package/lib/index.js +1 -1
- package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +343 -0
- package/lib/src/ap-custom-column/column-select.vue.js +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +235 -0
- package/lib/src/ap-form/interface.d.ts +1 -0
- package/lib/src/ap-form/items/checkbox/index.vue.d.ts +47 -0
- package/lib/src/ap-form/items/checkbox/index.vue.js +1 -0
- package/lib/src/ap-form/items/checkbox/index.vue2.js +1 -0
- package/lib/src/ap-form/items/index.d.ts +2 -1
- package/lib/src/ap-form/items/index.js +1 -1
- package/lib/src/ap-form/items/interface.d.ts +5 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +378 -0
- package/lib/src/ap-form/search-form/index.vue.js +1 -1
- package/lib/src/ap-table/ap-table.vue.d.ts +184 -0
- package/lib/src/ap-table/ap-table.vue.js +1 -0
- package/lib/src/ap-table/ap-table.vue2.js +1 -0
- package/lib/src/ap-table/components/index/index.vue.d.ts +28 -0
- package/lib/src/ap-table/components/index/index.vue.js +1 -0
- package/lib/src/ap-table/components/index/index.vue2.js +1 -0
- package/lib/src/ap-table/components/interface.d.ts +10 -0
- package/lib/src/ap-table/components/style/index.css +12 -0
- package/lib/src/ap-table/constants.d.ts +11075 -0
- package/lib/src/ap-table/constants.js +1 -0
- package/lib/src/ap-table/hooks/use-table-paging.d.ts +5 -1
- package/lib/src/ap-table/hooks/use-table-paging.js +1 -0
- package/lib/src/ap-table/index.d.ts +5 -0
- package/lib/src/ap-table/index.js +1 -0
- package/lib/src/ap-table/interface.d.ts +41 -14
- package/lib/src/ap-table/interface.js +1 -0
- package/lib/src/ap-table/style/ap-table.css +26 -0
- package/lib/src/ap-table/utils.js +1 -0
- package/lib/src/config-provider/config-provider-props.d.ts +152 -0
- package/lib/src/config-provider/config-provider.d.ts +323 -0
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +154 -0
- package/lib/src/config-provider/index.d.ts +691 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/modal/basic.vue.d.ts +464 -0
- package/lib/src/modal/components/modal-footer.vue.d.ts +457 -0
- package/lib/src/modal/components/modal.d.ts +443 -0
- package/lib/src/modal/index.d.ts +963 -0
- package/lib/src/modal/props.d.ts +283 -0
- package/lib/src/pro-form/hooks/use-label-width.d.ts +312 -0
- package/lib/src/pro-table/components/editable/editable-cell.vue.d.ts +82 -2
- package/lib/src/theme/ap-table/ap-table-index.css +12 -0
- package/lib/src/theme/ap-table/ap-table.css +26 -0
- package/lib/src/theme/work-order-modal/index.css +2 -2
- package/lib/src/work-order-modal/style/index.css +2 -2
- package/lib/src/work-order-modal/work-order-modal.vue.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import { ApFormModalFormProps, ApFormSubmitterConfig } from '../interface';
|
|
2
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties } from 'vue';
|
|
3
|
+
import { NamePath, ValidateOptions, FormLabelAlign } from 'ant-design-vue/es/form/interface';
|
|
4
|
+
import { VueTypeValidableDef } from '../../../node_modules/vue-types';
|
|
5
|
+
import { LegacyButtonType, ButtonHTMLType } from 'ant-design-vue/es/button/buttonTypes';
|
|
6
|
+
import { ButtonType, ButtonShape, ButtonSize } from 'ant-design-vue/es/button';
|
|
7
|
+
import { MouseEventHandler } from 'ant-design-vue/es/_util/EventInterface';
|
|
8
|
+
import { VueNode } from 'ant-design-vue/es/_util/type';
|
|
9
|
+
|
|
10
|
+
type ApModalFormSlots = {
|
|
11
|
+
trigger: any;
|
|
12
|
+
default: any;
|
|
13
|
+
title: any;
|
|
14
|
+
submitter(defaultDoms: VNode[]): any;
|
|
15
|
+
};
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormModalFormProps>, {
|
|
17
|
+
layout: string;
|
|
18
|
+
hideRequiredMark: boolean;
|
|
19
|
+
colon: boolean;
|
|
20
|
+
labelAlign: string;
|
|
21
|
+
validateOnRuleChange: boolean;
|
|
22
|
+
validateTrigger: string;
|
|
23
|
+
modalProps: () => {};
|
|
24
|
+
width: number;
|
|
25
|
+
submitter: () => {
|
|
26
|
+
resetButtonProps: boolean;
|
|
27
|
+
};
|
|
28
|
+
open: undefined;
|
|
29
|
+
showCancel: boolean;
|
|
30
|
+
}>, {
|
|
31
|
+
resetFields: (name?: NamePath | undefined) => void;
|
|
32
|
+
clearValidate: (name?: NamePath | undefined) => void;
|
|
33
|
+
validateFields: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<Partial<any>> | undefined;
|
|
34
|
+
getFieldsValue: (nameList?: true | (string | number)[] | undefined) => Partial<any> | undefined;
|
|
35
|
+
validate: (nameList?: string | NamePath[] | undefined, options?: ValidateOptions | undefined) => Promise<Partial<any>> | undefined;
|
|
36
|
+
scrollToField: (name: NamePath, options?: {}) => void;
|
|
37
|
+
setFieldValue: (key: string, newValue: any) => void;
|
|
38
|
+
setFieldsValue: (values: Record<string, any>) => void;
|
|
39
|
+
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
40
|
+
"update:open": (...args: any[]) => void;
|
|
41
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormModalFormProps>, {
|
|
42
|
+
layout: string;
|
|
43
|
+
hideRequiredMark: boolean;
|
|
44
|
+
colon: boolean;
|
|
45
|
+
labelAlign: string;
|
|
46
|
+
validateOnRuleChange: boolean;
|
|
47
|
+
validateTrigger: string;
|
|
48
|
+
modalProps: () => {};
|
|
49
|
+
width: number;
|
|
50
|
+
submitter: () => {
|
|
51
|
+
resetButtonProps: boolean;
|
|
52
|
+
};
|
|
53
|
+
open: undefined;
|
|
54
|
+
showCancel: boolean;
|
|
55
|
+
}>>> & {
|
|
56
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
open: boolean;
|
|
59
|
+
width: number;
|
|
60
|
+
showCancel: boolean;
|
|
61
|
+
layout: string;
|
|
62
|
+
validateTrigger: string | string[];
|
|
63
|
+
colon: boolean;
|
|
64
|
+
labelAlign: FormLabelAlign;
|
|
65
|
+
hideRequiredMark: boolean;
|
|
66
|
+
validateOnRuleChange: boolean;
|
|
67
|
+
modalProps: Omit<Partial< ExtractPropTypes<{
|
|
68
|
+
prefixCls: StringConstructor;
|
|
69
|
+
visible: {
|
|
70
|
+
type: BooleanConstructor;
|
|
71
|
+
default: any;
|
|
72
|
+
};
|
|
73
|
+
open: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: any;
|
|
76
|
+
};
|
|
77
|
+
confirmLoading: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: any;
|
|
80
|
+
};
|
|
81
|
+
title: VueTypeValidableDef<any>;
|
|
82
|
+
closable: {
|
|
83
|
+
type: BooleanConstructor;
|
|
84
|
+
default: any;
|
|
85
|
+
};
|
|
86
|
+
closeIcon: VueTypeValidableDef<any>;
|
|
87
|
+
onOk: PropType<(e: MouseEvent) => void>;
|
|
88
|
+
onCancel: PropType<(e: MouseEvent) => void>;
|
|
89
|
+
'onUpdate:visible': PropType<(visible: boolean) => void>;
|
|
90
|
+
'onUpdate:open': PropType<(open: boolean) => void>;
|
|
91
|
+
onChange: PropType<(open: boolean) => void>;
|
|
92
|
+
afterClose: PropType<() => void>;
|
|
93
|
+
centered: {
|
|
94
|
+
type: BooleanConstructor;
|
|
95
|
+
default: any;
|
|
96
|
+
};
|
|
97
|
+
width: (StringConstructor | NumberConstructor)[];
|
|
98
|
+
footer: VueTypeValidableDef<any>;
|
|
99
|
+
okText: VueTypeValidableDef<any>;
|
|
100
|
+
okType: PropType<LegacyButtonType>;
|
|
101
|
+
cancelText: VueTypeValidableDef<any>;
|
|
102
|
+
icon: VueTypeValidableDef<any>;
|
|
103
|
+
maskClosable: {
|
|
104
|
+
type: BooleanConstructor;
|
|
105
|
+
default: any;
|
|
106
|
+
};
|
|
107
|
+
forceRender: {
|
|
108
|
+
type: BooleanConstructor;
|
|
109
|
+
default: any;
|
|
110
|
+
};
|
|
111
|
+
okButtonProps: {
|
|
112
|
+
type: PropType<Partial< ExtractPropTypes<{
|
|
113
|
+
prefixCls: StringConstructor;
|
|
114
|
+
type: PropType<ButtonType>;
|
|
115
|
+
htmlType: {
|
|
116
|
+
type: PropType<ButtonHTMLType>;
|
|
117
|
+
default: string;
|
|
118
|
+
};
|
|
119
|
+
shape: {
|
|
120
|
+
type: PropType<ButtonShape>;
|
|
121
|
+
};
|
|
122
|
+
size: {
|
|
123
|
+
type: PropType<ButtonSize>;
|
|
124
|
+
};
|
|
125
|
+
loading: {
|
|
126
|
+
type: PropType<boolean | {
|
|
127
|
+
delay?: number | undefined;
|
|
128
|
+
}>;
|
|
129
|
+
default: () => boolean | {
|
|
130
|
+
delay?: number | undefined;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
disabled: {
|
|
134
|
+
type: BooleanConstructor;
|
|
135
|
+
default: any;
|
|
136
|
+
};
|
|
137
|
+
ghost: {
|
|
138
|
+
type: BooleanConstructor;
|
|
139
|
+
default: any;
|
|
140
|
+
};
|
|
141
|
+
block: {
|
|
142
|
+
type: BooleanConstructor;
|
|
143
|
+
default: any;
|
|
144
|
+
};
|
|
145
|
+
danger: {
|
|
146
|
+
type: BooleanConstructor;
|
|
147
|
+
default: any;
|
|
148
|
+
};
|
|
149
|
+
icon: VueTypeValidableDef<any>;
|
|
150
|
+
href: StringConstructor;
|
|
151
|
+
target: StringConstructor;
|
|
152
|
+
title: StringConstructor;
|
|
153
|
+
onClick: {
|
|
154
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
155
|
+
};
|
|
156
|
+
onMousedown: {
|
|
157
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
158
|
+
};
|
|
159
|
+
}>>>;
|
|
160
|
+
default: Partial< ExtractPropTypes<{
|
|
161
|
+
prefixCls: StringConstructor;
|
|
162
|
+
type: PropType<ButtonType>;
|
|
163
|
+
htmlType: {
|
|
164
|
+
type: PropType<ButtonHTMLType>;
|
|
165
|
+
default: string;
|
|
166
|
+
};
|
|
167
|
+
shape: {
|
|
168
|
+
type: PropType<ButtonShape>;
|
|
169
|
+
};
|
|
170
|
+
size: {
|
|
171
|
+
type: PropType<ButtonSize>;
|
|
172
|
+
};
|
|
173
|
+
loading: {
|
|
174
|
+
type: PropType<boolean | {
|
|
175
|
+
delay?: number | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
default: () => boolean | {
|
|
178
|
+
delay?: number | undefined;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
disabled: {
|
|
182
|
+
type: BooleanConstructor;
|
|
183
|
+
default: any;
|
|
184
|
+
};
|
|
185
|
+
ghost: {
|
|
186
|
+
type: BooleanConstructor;
|
|
187
|
+
default: any;
|
|
188
|
+
};
|
|
189
|
+
block: {
|
|
190
|
+
type: BooleanConstructor;
|
|
191
|
+
default: any;
|
|
192
|
+
};
|
|
193
|
+
danger: {
|
|
194
|
+
type: BooleanConstructor;
|
|
195
|
+
default: any;
|
|
196
|
+
};
|
|
197
|
+
icon: VueTypeValidableDef<any>;
|
|
198
|
+
href: StringConstructor;
|
|
199
|
+
target: StringConstructor;
|
|
200
|
+
title: StringConstructor;
|
|
201
|
+
onClick: {
|
|
202
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
203
|
+
};
|
|
204
|
+
onMousedown: {
|
|
205
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
206
|
+
};
|
|
207
|
+
}>>;
|
|
208
|
+
};
|
|
209
|
+
cancelButtonProps: {
|
|
210
|
+
type: PropType<Partial< ExtractPropTypes<{
|
|
211
|
+
prefixCls: StringConstructor;
|
|
212
|
+
type: PropType<ButtonType>;
|
|
213
|
+
htmlType: {
|
|
214
|
+
type: PropType<ButtonHTMLType>;
|
|
215
|
+
default: string;
|
|
216
|
+
};
|
|
217
|
+
shape: {
|
|
218
|
+
type: PropType<ButtonShape>;
|
|
219
|
+
};
|
|
220
|
+
size: {
|
|
221
|
+
type: PropType<ButtonSize>;
|
|
222
|
+
};
|
|
223
|
+
loading: {
|
|
224
|
+
type: PropType<boolean | {
|
|
225
|
+
delay?: number | undefined;
|
|
226
|
+
}>;
|
|
227
|
+
default: () => boolean | {
|
|
228
|
+
delay?: number | undefined;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
disabled: {
|
|
232
|
+
type: BooleanConstructor;
|
|
233
|
+
default: any;
|
|
234
|
+
};
|
|
235
|
+
ghost: {
|
|
236
|
+
type: BooleanConstructor;
|
|
237
|
+
default: any;
|
|
238
|
+
};
|
|
239
|
+
block: {
|
|
240
|
+
type: BooleanConstructor;
|
|
241
|
+
default: any;
|
|
242
|
+
};
|
|
243
|
+
danger: {
|
|
244
|
+
type: BooleanConstructor;
|
|
245
|
+
default: any;
|
|
246
|
+
};
|
|
247
|
+
icon: VueTypeValidableDef<any>;
|
|
248
|
+
href: StringConstructor;
|
|
249
|
+
target: StringConstructor;
|
|
250
|
+
title: StringConstructor;
|
|
251
|
+
onClick: {
|
|
252
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
253
|
+
};
|
|
254
|
+
onMousedown: {
|
|
255
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
256
|
+
};
|
|
257
|
+
}>>>;
|
|
258
|
+
default: Partial< ExtractPropTypes<{
|
|
259
|
+
prefixCls: StringConstructor;
|
|
260
|
+
type: PropType<ButtonType>;
|
|
261
|
+
htmlType: {
|
|
262
|
+
type: PropType<ButtonHTMLType>;
|
|
263
|
+
default: string;
|
|
264
|
+
};
|
|
265
|
+
shape: {
|
|
266
|
+
type: PropType<ButtonShape>;
|
|
267
|
+
};
|
|
268
|
+
size: {
|
|
269
|
+
type: PropType<ButtonSize>;
|
|
270
|
+
};
|
|
271
|
+
loading: {
|
|
272
|
+
type: PropType<boolean | {
|
|
273
|
+
delay?: number | undefined;
|
|
274
|
+
}>;
|
|
275
|
+
default: () => boolean | {
|
|
276
|
+
delay?: number | undefined;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
disabled: {
|
|
280
|
+
type: BooleanConstructor;
|
|
281
|
+
default: any;
|
|
282
|
+
};
|
|
283
|
+
ghost: {
|
|
284
|
+
type: BooleanConstructor;
|
|
285
|
+
default: any;
|
|
286
|
+
};
|
|
287
|
+
block: {
|
|
288
|
+
type: BooleanConstructor;
|
|
289
|
+
default: any;
|
|
290
|
+
};
|
|
291
|
+
danger: {
|
|
292
|
+
type: BooleanConstructor;
|
|
293
|
+
default: any;
|
|
294
|
+
};
|
|
295
|
+
icon: VueTypeValidableDef<any>;
|
|
296
|
+
href: StringConstructor;
|
|
297
|
+
target: StringConstructor;
|
|
298
|
+
title: StringConstructor;
|
|
299
|
+
onClick: {
|
|
300
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
301
|
+
};
|
|
302
|
+
onMousedown: {
|
|
303
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
304
|
+
};
|
|
305
|
+
}>>;
|
|
306
|
+
};
|
|
307
|
+
destroyOnClose: {
|
|
308
|
+
type: BooleanConstructor;
|
|
309
|
+
default: any;
|
|
310
|
+
};
|
|
311
|
+
wrapClassName: StringConstructor;
|
|
312
|
+
maskTransitionName: StringConstructor;
|
|
313
|
+
transitionName: StringConstructor;
|
|
314
|
+
getContainer: {
|
|
315
|
+
type: PropType<string | false | HTMLElement | (() => HTMLElement)>;
|
|
316
|
+
default: any;
|
|
317
|
+
};
|
|
318
|
+
zIndex: NumberConstructor;
|
|
319
|
+
bodyStyle: {
|
|
320
|
+
type: PropType<CSSProperties>;
|
|
321
|
+
default: CSSProperties;
|
|
322
|
+
};
|
|
323
|
+
maskStyle: {
|
|
324
|
+
type: PropType<CSSProperties>;
|
|
325
|
+
default: CSSProperties;
|
|
326
|
+
};
|
|
327
|
+
mask: {
|
|
328
|
+
type: BooleanConstructor;
|
|
329
|
+
default: any;
|
|
330
|
+
};
|
|
331
|
+
keyboard: {
|
|
332
|
+
type: BooleanConstructor;
|
|
333
|
+
default: any;
|
|
334
|
+
};
|
|
335
|
+
wrapProps: ObjectConstructor;
|
|
336
|
+
focusTriggerAfterClose: {
|
|
337
|
+
type: BooleanConstructor;
|
|
338
|
+
default: any;
|
|
339
|
+
};
|
|
340
|
+
modalRender: PropType<(arg: {
|
|
341
|
+
originVNode: VueNode;
|
|
342
|
+
}) => VueNode>;
|
|
343
|
+
mousePosition: {
|
|
344
|
+
type: PropType<{
|
|
345
|
+
x: number;
|
|
346
|
+
y: number;
|
|
347
|
+
}>;
|
|
348
|
+
default: {
|
|
349
|
+
x: number;
|
|
350
|
+
y: number;
|
|
351
|
+
};
|
|
352
|
+
};
|
|
353
|
+
}>>, "visible" | "open" | "onUpdate:open">;
|
|
354
|
+
submitter: false | ApFormSubmitterConfig;
|
|
355
|
+
}, {}>, Readonly<ApModalFormSlots> & ApModalFormSlots>;
|
|
356
|
+
export default _default;
|
|
357
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
358
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
359
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
360
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
361
|
+
} : {
|
|
362
|
+
type: PropType<T[K]>;
|
|
363
|
+
required: true;
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
type __VLS_WithDefaults<P, D> = {
|
|
367
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
368
|
+
default: D[K];
|
|
369
|
+
}> : P[K];
|
|
370
|
+
};
|
|
371
|
+
type __VLS_Prettify<T> = {
|
|
372
|
+
[K in keyof T]: T[K];
|
|
373
|
+
} & {};
|
|
374
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
375
|
+
new (): {
|
|
376
|
+
$slots: S;
|
|
377
|
+
};
|
|
378
|
+
};
|
|
@@ -13,12 +13,12 @@ import { useControllableValue as ne } from "../../hooks/useControllableValue.mjs
|
|
|
13
13
|
import { useNamespace as re } from "../../config-provider/hooks/use-namespace.mjs";
|
|
14
14
|
import { useLocale as se } from "../../config-provider/hooks/use-locale.mjs";
|
|
15
15
|
import V from "../ap-form-item.vue.mjs";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
function ie(
|
|
19
|
-
return typeof
|
|
16
|
+
import pe from "../ap-form.vue2.mjs";
|
|
17
|
+
import ce from "../ap-form-item-group/index.vue.mjs";
|
|
18
|
+
function ie(c) {
|
|
19
|
+
return typeof c == "function" || Object.prototype.toString.call(c) === "[object Object]" && !J(c);
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const p = 24, Pe = /* @__PURE__ */ K({
|
|
22
22
|
name: "ApFormSearchForm",
|
|
23
23
|
__name: "index",
|
|
24
24
|
props: {
|
|
@@ -91,16 +91,19 @@ const c = 24, Pe = /* @__PURE__ */ K({
|
|
|
91
91
|
},
|
|
92
92
|
countPerRow: {
|
|
93
93
|
default: 4
|
|
94
|
+
},
|
|
95
|
+
submitLoading: {
|
|
96
|
+
type: Boolean
|
|
94
97
|
}
|
|
95
98
|
},
|
|
96
99
|
emits: ["update:collapse"],
|
|
97
|
-
setup(
|
|
100
|
+
setup(c, {
|
|
98
101
|
expose: I,
|
|
99
102
|
emit: j
|
|
100
103
|
}) {
|
|
101
104
|
var S;
|
|
102
|
-
const l = Q(), t =
|
|
103
|
-
value:
|
|
105
|
+
const l = Q(), t = c, M = j, {
|
|
106
|
+
value: f,
|
|
104
107
|
updateValue: O
|
|
105
108
|
} = ne(t, M, {
|
|
106
109
|
valuePropName: "collapse",
|
|
@@ -108,48 +111,48 @@ const c = 24, Pe = /* @__PURE__ */ K({
|
|
|
108
111
|
}), {
|
|
109
112
|
b: $
|
|
110
113
|
} = re("ap-form-search-form"), {
|
|
111
|
-
t:
|
|
112
|
-
} = se(),
|
|
114
|
+
t: g
|
|
115
|
+
} = se(), m = X();
|
|
113
116
|
function D() {
|
|
114
|
-
O(!o(
|
|
117
|
+
O(!o(f));
|
|
115
118
|
}
|
|
116
|
-
function
|
|
119
|
+
function L() {
|
|
117
120
|
var e;
|
|
118
|
-
(e =
|
|
121
|
+
(e = m.value) == null || e.validateFields().then(t.onSubmit);
|
|
119
122
|
}
|
|
120
|
-
function
|
|
121
|
-
var e,
|
|
122
|
-
t.customReset || (
|
|
123
|
+
function q() {
|
|
124
|
+
var e, u, d;
|
|
125
|
+
t.customReset || (u = (e = m.value) == null ? void 0 : e.resetFields) == null || u.call(e), (d = t.onReset) == null || d.call(t);
|
|
123
126
|
}
|
|
124
|
-
const
|
|
127
|
+
const R = v(T(l.default())), i = v((S = l.extra) == null ? void 0 : S.call(l)), F = C(() => Math.floor(p / t.countPerRow));
|
|
125
128
|
P(() => l.default(), (e) => {
|
|
126
|
-
|
|
129
|
+
R.value = T(e);
|
|
127
130
|
}), P(() => {
|
|
128
131
|
var e;
|
|
129
132
|
return (e = l.extra) == null ? void 0 : e.call(l);
|
|
130
133
|
}, (e) => {
|
|
131
|
-
|
|
134
|
+
i.value = e;
|
|
132
135
|
});
|
|
133
|
-
const
|
|
136
|
+
const z = C(() => {
|
|
134
137
|
let e;
|
|
135
|
-
const
|
|
138
|
+
const u = [...o(R)], d = [], b = [], n = o(F);
|
|
136
139
|
let h = 0;
|
|
137
|
-
|
|
140
|
+
u.forEach((r) => {
|
|
138
141
|
const s = r.props;
|
|
139
|
-
s != null && s.hidden ?
|
|
142
|
+
s != null && s.hidden ? d.push(r) : (h += s.span || n, b.push(r));
|
|
140
143
|
});
|
|
141
|
-
const B =
|
|
144
|
+
const B = p - (h + n) % p, U = B < n ? p : B, x = p - n * (o(i) && !t.extraInAction ? 2 : 1), W = !t.forceExpand && h > x;
|
|
142
145
|
let _ = 0;
|
|
143
146
|
const G = b.map((r, s) => {
|
|
144
147
|
const w = r.props;
|
|
145
148
|
return _ += w.span || n, Y(r, {
|
|
146
149
|
span: w.span || n,
|
|
147
150
|
key: `ApFormSearchFormItem-${s}`,
|
|
148
|
-
hidden: !t.forceExpand && o(
|
|
151
|
+
hidden: !t.forceExpand && o(f) && _ > x
|
|
149
152
|
});
|
|
150
|
-
}), H =
|
|
151
|
-
return a(Z, null, [G,
|
|
152
|
-
span: o(
|
|
153
|
+
}), H = p - Math.min(x, _) - n;
|
|
154
|
+
return a(Z, null, [G, d, a(V, {
|
|
155
|
+
span: o(F)
|
|
153
156
|
}, {
|
|
154
157
|
default: () => [a(N, {
|
|
155
158
|
justify: "space-between"
|
|
@@ -157,43 +160,44 @@ const c = 24, Pe = /* @__PURE__ */ K({
|
|
|
157
160
|
default: () => [a(oe, null, {
|
|
158
161
|
default: () => [a(y, {
|
|
159
162
|
type: "primary",
|
|
160
|
-
onClick:
|
|
163
|
+
onClick: L,
|
|
164
|
+
loading: t.submitLoading
|
|
161
165
|
}, {
|
|
162
|
-
default: () => [t.searchText ||
|
|
166
|
+
default: () => [t.searchText || g("ap.apForm.search.search")]
|
|
163
167
|
}), a(y, {
|
|
164
|
-
onClick:
|
|
168
|
+
onClick: q
|
|
165
169
|
}, {
|
|
166
|
-
default: () => [t.resetText ||
|
|
167
|
-
}),
|
|
170
|
+
default: () => [t.resetText || g("ap.apForm.search.reset")]
|
|
171
|
+
}), W ? a(y, {
|
|
168
172
|
onClick: D,
|
|
169
173
|
icon: a(ae, {
|
|
170
174
|
style: "color:#B8C3D1",
|
|
171
|
-
rotate: o(
|
|
175
|
+
rotate: o(f) ? 90 : -90
|
|
172
176
|
}, null)
|
|
173
177
|
}, null) : null]
|
|
174
|
-
}), t.extraInAction ? o(
|
|
178
|
+
}), t.extraInAction ? o(i) : null]
|
|
175
179
|
})]
|
|
176
|
-
}), t.extraInAction
|
|
177
|
-
span: o(
|
|
180
|
+
}), !t.extraInAction && o(i) ? a(V, {
|
|
181
|
+
span: o(f) ? H : U
|
|
178
182
|
}, {
|
|
179
183
|
default: () => [a(N, {
|
|
180
184
|
justify: "end"
|
|
181
|
-
}, ie(e = o(
|
|
185
|
+
}, ie(e = o(i)) ? e : {
|
|
182
186
|
default: () => [e]
|
|
183
187
|
})]
|
|
184
|
-
})]);
|
|
188
|
+
}) : null]);
|
|
185
189
|
});
|
|
186
190
|
return I({
|
|
187
|
-
apForm: C(() => o(
|
|
188
|
-
}), (e,
|
|
191
|
+
apForm: C(() => o(m))
|
|
192
|
+
}), (e, u) => (k(), A(pe, ee({
|
|
189
193
|
class: o($)(),
|
|
190
194
|
ref_key: "apForm",
|
|
191
|
-
ref:
|
|
195
|
+
ref: m
|
|
192
196
|
}, o(le)(t, ["collapse", "defaultCollapse", "onUpdate:collapse", "searchText", "resetText", "onSubmit", "onReset", "extraInAction", "forceExpand", "countPerRow"])), {
|
|
193
|
-
default: E(() => [a(
|
|
197
|
+
default: E(() => [a(ce, {
|
|
194
198
|
"count-per-row": t.countPerRow
|
|
195
199
|
}, {
|
|
196
|
-
default: E(() => [(k(), A(te(
|
|
200
|
+
default: E(() => [(k(), A(te(z.value)))]),
|
|
197
201
|
_: 1
|
|
198
202
|
}, 8, ["count-per-row"])]),
|
|
199
203
|
_: 1
|