@aplus-frontend/ui 0.0.1-beta.22 → 0.0.1-beta.24
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 -100
- package/es/src/ap-download/ap-download.vue.d.ts +41 -0
- package/es/src/ap-download/ap-download.vue.mjs +50 -0
- package/es/src/ap-download/ap-download.vue2.mjs +4 -0
- package/es/src/ap-download/hooks/index.d.ts +8 -0
- package/es/src/ap-download/index.d.ts +4 -0
- package/es/src/ap-download/index.mjs +2 -0
- package/es/src/ap-download/interface.d.ts +20 -0
- package/es/src/ap-download/interface.mjs +1 -0
- package/es/src/ap-download/style/ap-download.css +51 -0
- package/es/src/ap-form/index.d.ts +3 -1
- package/es/src/ap-form/index.mjs +15 -11
- package/es/src/ap-form/interface.d.ts +19 -1
- package/es/src/ap-form/modal-form/index.vue.d.ts +369 -0
- package/es/src/ap-form/modal-form/index.vue.mjs +195 -0
- package/es/src/ap-form/modal-form/index.vue2.mjs +4 -0
- package/es/src/ap-form/style/modal-form.css +17 -0
- package/es/src/index.d.ts +1 -0
- package/es/src/index.mjs +197 -192
- package/es/src/theme/antd-global-overwrite/admin/button.css +8 -1
- package/es/src/theme/antd-global-overwrite/admin/index.css +9 -2
- package/es/src/theme/antd-global-overwrite/admin/pagination.css +1 -1
- package/es/src/theme/antd-global-overwrite/aplus/button.css +8 -1
- package/es/src/theme/antd-global-overwrite/aplus/index.css +27 -10
- package/es/src/theme/antd-global-overwrite/aplus/pagination.css +1 -1
- package/es/src/theme/antd-global-overwrite/aplus/table.css +18 -8
- package/es/src/theme/ap-download/ap-download.css +51 -0
- package/es/src/theme/ap-form/modal-form.css +17 -0
- package/es/src/utils/config-provider-preset.mjs +24 -20
- package/es/src/utils/slot.d.ts +7 -1
- package/es/src/utils/slot.mjs +25 -15
- package/lib/index.js +1 -1
- package/lib/src/ap-download/ap-download.vue.d.ts +41 -0
- package/lib/src/ap-download/ap-download.vue.js +1 -0
- package/lib/src/ap-download/ap-download.vue2.js +1 -0
- package/lib/src/ap-download/hooks/index.d.ts +8 -0
- package/lib/src/ap-download/index.d.ts +4 -0
- package/lib/src/ap-download/index.js +1 -0
- package/lib/src/ap-download/interface.d.ts +20 -0
- package/lib/src/ap-download/interface.js +1 -0
- package/lib/src/ap-download/style/ap-download.css +51 -0
- package/lib/src/ap-form/index.d.ts +3 -1
- package/lib/src/ap-form/index.js +1 -1
- package/lib/src/ap-form/interface.d.ts +19 -1
- package/lib/src/ap-form/modal-form/index.vue.d.ts +369 -0
- package/lib/src/ap-form/modal-form/index.vue.js +1 -0
- package/lib/src/ap-form/modal-form/index.vue2.js +1 -0
- package/lib/src/ap-form/style/modal-form.css +17 -0
- package/lib/src/index.d.ts +1 -0
- package/lib/src/index.js +1 -1
- package/lib/src/theme/antd-global-overwrite/admin/button.css +8 -1
- package/lib/src/theme/antd-global-overwrite/admin/index.css +9 -2
- package/lib/src/theme/antd-global-overwrite/admin/pagination.css +1 -1
- package/lib/src/theme/antd-global-overwrite/aplus/button.css +8 -1
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +27 -10
- package/lib/src/theme/antd-global-overwrite/aplus/pagination.css +1 -1
- package/lib/src/theme/antd-global-overwrite/aplus/table.css +18 -8
- package/lib/src/theme/ap-download/ap-download.css +51 -0
- package/lib/src/theme/ap-form/modal-form.css +17 -0
- package/lib/src/utils/config-provider-preset.js +1 -1
- package/lib/src/utils/slot.d.ts +7 -1
- package/lib/src/utils/slot.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import { ApFormModalFormProps, ApFormSubmitterConfig } from '../interface';
|
|
2
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType, CSSProperties } from 'vue';
|
|
3
|
+
import { 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
|
+
}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
31
|
+
"update:open": (...args: any[]) => void;
|
|
32
|
+
}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApFormModalFormProps>, {
|
|
33
|
+
layout: string;
|
|
34
|
+
hideRequiredMark: boolean;
|
|
35
|
+
colon: boolean;
|
|
36
|
+
labelAlign: string;
|
|
37
|
+
validateOnRuleChange: boolean;
|
|
38
|
+
validateTrigger: string;
|
|
39
|
+
modalProps: () => {};
|
|
40
|
+
width: number;
|
|
41
|
+
submitter: () => {
|
|
42
|
+
resetButtonProps: boolean;
|
|
43
|
+
};
|
|
44
|
+
open: undefined;
|
|
45
|
+
showCancel: boolean;
|
|
46
|
+
}>>> & {
|
|
47
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
open: boolean;
|
|
50
|
+
width: number;
|
|
51
|
+
showCancel: boolean;
|
|
52
|
+
layout: string;
|
|
53
|
+
validateTrigger: string | string[];
|
|
54
|
+
colon: boolean;
|
|
55
|
+
labelAlign: FormLabelAlign;
|
|
56
|
+
hideRequiredMark: boolean;
|
|
57
|
+
validateOnRuleChange: boolean;
|
|
58
|
+
modalProps: Omit<Partial< ExtractPropTypes<{
|
|
59
|
+
prefixCls: StringConstructor;
|
|
60
|
+
visible: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: any;
|
|
63
|
+
};
|
|
64
|
+
open: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: any;
|
|
67
|
+
};
|
|
68
|
+
confirmLoading: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
default: any;
|
|
71
|
+
};
|
|
72
|
+
title: VueTypeValidableDef<any>;
|
|
73
|
+
closable: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: any;
|
|
76
|
+
};
|
|
77
|
+
closeIcon: VueTypeValidableDef<any>;
|
|
78
|
+
onOk: PropType<(e: MouseEvent) => void>;
|
|
79
|
+
onCancel: PropType<(e: MouseEvent) => void>;
|
|
80
|
+
'onUpdate:visible': PropType<(visible: boolean) => void>;
|
|
81
|
+
'onUpdate:open': PropType<(open: boolean) => void>;
|
|
82
|
+
onChange: PropType<(open: boolean) => void>;
|
|
83
|
+
afterClose: PropType<() => void>;
|
|
84
|
+
centered: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: any;
|
|
87
|
+
};
|
|
88
|
+
width: (StringConstructor | NumberConstructor)[];
|
|
89
|
+
footer: VueTypeValidableDef<any>;
|
|
90
|
+
okText: VueTypeValidableDef<any>;
|
|
91
|
+
okType: PropType<LegacyButtonType>;
|
|
92
|
+
cancelText: VueTypeValidableDef<any>;
|
|
93
|
+
icon: VueTypeValidableDef<any>;
|
|
94
|
+
maskClosable: {
|
|
95
|
+
type: BooleanConstructor;
|
|
96
|
+
default: any;
|
|
97
|
+
};
|
|
98
|
+
forceRender: {
|
|
99
|
+
type: BooleanConstructor;
|
|
100
|
+
default: any;
|
|
101
|
+
};
|
|
102
|
+
okButtonProps: {
|
|
103
|
+
type: PropType<Partial< ExtractPropTypes<{
|
|
104
|
+
prefixCls: StringConstructor;
|
|
105
|
+
type: PropType<ButtonType>;
|
|
106
|
+
htmlType: {
|
|
107
|
+
type: PropType<ButtonHTMLType>;
|
|
108
|
+
default: string;
|
|
109
|
+
};
|
|
110
|
+
shape: {
|
|
111
|
+
type: PropType<ButtonShape>;
|
|
112
|
+
};
|
|
113
|
+
size: {
|
|
114
|
+
type: PropType<ButtonSize>;
|
|
115
|
+
};
|
|
116
|
+
loading: {
|
|
117
|
+
type: PropType<boolean | {
|
|
118
|
+
delay?: number | undefined;
|
|
119
|
+
}>;
|
|
120
|
+
default: () => boolean | {
|
|
121
|
+
delay?: number | undefined;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
disabled: {
|
|
125
|
+
type: BooleanConstructor;
|
|
126
|
+
default: any;
|
|
127
|
+
};
|
|
128
|
+
ghost: {
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
default: any;
|
|
131
|
+
};
|
|
132
|
+
block: {
|
|
133
|
+
type: BooleanConstructor;
|
|
134
|
+
default: any;
|
|
135
|
+
};
|
|
136
|
+
danger: {
|
|
137
|
+
type: BooleanConstructor;
|
|
138
|
+
default: any;
|
|
139
|
+
};
|
|
140
|
+
icon: VueTypeValidableDef<any>;
|
|
141
|
+
href: StringConstructor;
|
|
142
|
+
target: StringConstructor;
|
|
143
|
+
title: StringConstructor;
|
|
144
|
+
onClick: {
|
|
145
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
146
|
+
};
|
|
147
|
+
onMousedown: {
|
|
148
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
149
|
+
};
|
|
150
|
+
}>>>;
|
|
151
|
+
default: Partial< ExtractPropTypes<{
|
|
152
|
+
prefixCls: StringConstructor;
|
|
153
|
+
type: PropType<ButtonType>;
|
|
154
|
+
htmlType: {
|
|
155
|
+
type: PropType<ButtonHTMLType>;
|
|
156
|
+
default: string;
|
|
157
|
+
};
|
|
158
|
+
shape: {
|
|
159
|
+
type: PropType<ButtonShape>;
|
|
160
|
+
};
|
|
161
|
+
size: {
|
|
162
|
+
type: PropType<ButtonSize>;
|
|
163
|
+
};
|
|
164
|
+
loading: {
|
|
165
|
+
type: PropType<boolean | {
|
|
166
|
+
delay?: number | undefined;
|
|
167
|
+
}>;
|
|
168
|
+
default: () => boolean | {
|
|
169
|
+
delay?: number | undefined;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
disabled: {
|
|
173
|
+
type: BooleanConstructor;
|
|
174
|
+
default: any;
|
|
175
|
+
};
|
|
176
|
+
ghost: {
|
|
177
|
+
type: BooleanConstructor;
|
|
178
|
+
default: any;
|
|
179
|
+
};
|
|
180
|
+
block: {
|
|
181
|
+
type: BooleanConstructor;
|
|
182
|
+
default: any;
|
|
183
|
+
};
|
|
184
|
+
danger: {
|
|
185
|
+
type: BooleanConstructor;
|
|
186
|
+
default: any;
|
|
187
|
+
};
|
|
188
|
+
icon: VueTypeValidableDef<any>;
|
|
189
|
+
href: StringConstructor;
|
|
190
|
+
target: StringConstructor;
|
|
191
|
+
title: StringConstructor;
|
|
192
|
+
onClick: {
|
|
193
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
194
|
+
};
|
|
195
|
+
onMousedown: {
|
|
196
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
197
|
+
};
|
|
198
|
+
}>>;
|
|
199
|
+
};
|
|
200
|
+
cancelButtonProps: {
|
|
201
|
+
type: PropType<Partial< ExtractPropTypes<{
|
|
202
|
+
prefixCls: StringConstructor;
|
|
203
|
+
type: PropType<ButtonType>;
|
|
204
|
+
htmlType: {
|
|
205
|
+
type: PropType<ButtonHTMLType>;
|
|
206
|
+
default: string;
|
|
207
|
+
};
|
|
208
|
+
shape: {
|
|
209
|
+
type: PropType<ButtonShape>;
|
|
210
|
+
};
|
|
211
|
+
size: {
|
|
212
|
+
type: PropType<ButtonSize>;
|
|
213
|
+
};
|
|
214
|
+
loading: {
|
|
215
|
+
type: PropType<boolean | {
|
|
216
|
+
delay?: number | undefined;
|
|
217
|
+
}>;
|
|
218
|
+
default: () => boolean | {
|
|
219
|
+
delay?: number | undefined;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
disabled: {
|
|
223
|
+
type: BooleanConstructor;
|
|
224
|
+
default: any;
|
|
225
|
+
};
|
|
226
|
+
ghost: {
|
|
227
|
+
type: BooleanConstructor;
|
|
228
|
+
default: any;
|
|
229
|
+
};
|
|
230
|
+
block: {
|
|
231
|
+
type: BooleanConstructor;
|
|
232
|
+
default: any;
|
|
233
|
+
};
|
|
234
|
+
danger: {
|
|
235
|
+
type: BooleanConstructor;
|
|
236
|
+
default: any;
|
|
237
|
+
};
|
|
238
|
+
icon: VueTypeValidableDef<any>;
|
|
239
|
+
href: StringConstructor;
|
|
240
|
+
target: StringConstructor;
|
|
241
|
+
title: StringConstructor;
|
|
242
|
+
onClick: {
|
|
243
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
244
|
+
};
|
|
245
|
+
onMousedown: {
|
|
246
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
247
|
+
};
|
|
248
|
+
}>>>;
|
|
249
|
+
default: Partial< ExtractPropTypes<{
|
|
250
|
+
prefixCls: StringConstructor;
|
|
251
|
+
type: PropType<ButtonType>;
|
|
252
|
+
htmlType: {
|
|
253
|
+
type: PropType<ButtonHTMLType>;
|
|
254
|
+
default: string;
|
|
255
|
+
};
|
|
256
|
+
shape: {
|
|
257
|
+
type: PropType<ButtonShape>;
|
|
258
|
+
};
|
|
259
|
+
size: {
|
|
260
|
+
type: PropType<ButtonSize>;
|
|
261
|
+
};
|
|
262
|
+
loading: {
|
|
263
|
+
type: PropType<boolean | {
|
|
264
|
+
delay?: number | undefined;
|
|
265
|
+
}>;
|
|
266
|
+
default: () => boolean | {
|
|
267
|
+
delay?: number | undefined;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
disabled: {
|
|
271
|
+
type: BooleanConstructor;
|
|
272
|
+
default: any;
|
|
273
|
+
};
|
|
274
|
+
ghost: {
|
|
275
|
+
type: BooleanConstructor;
|
|
276
|
+
default: any;
|
|
277
|
+
};
|
|
278
|
+
block: {
|
|
279
|
+
type: BooleanConstructor;
|
|
280
|
+
default: any;
|
|
281
|
+
};
|
|
282
|
+
danger: {
|
|
283
|
+
type: BooleanConstructor;
|
|
284
|
+
default: any;
|
|
285
|
+
};
|
|
286
|
+
icon: VueTypeValidableDef<any>;
|
|
287
|
+
href: StringConstructor;
|
|
288
|
+
target: StringConstructor;
|
|
289
|
+
title: StringConstructor;
|
|
290
|
+
onClick: {
|
|
291
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
292
|
+
};
|
|
293
|
+
onMousedown: {
|
|
294
|
+
type: PropType< MouseEventHandler | MouseEventHandler[]>;
|
|
295
|
+
};
|
|
296
|
+
}>>;
|
|
297
|
+
};
|
|
298
|
+
destroyOnClose: {
|
|
299
|
+
type: BooleanConstructor;
|
|
300
|
+
default: any;
|
|
301
|
+
};
|
|
302
|
+
wrapClassName: StringConstructor;
|
|
303
|
+
maskTransitionName: StringConstructor;
|
|
304
|
+
transitionName: StringConstructor;
|
|
305
|
+
getContainer: {
|
|
306
|
+
type: PropType<string | false | HTMLElement | (() => HTMLElement)>;
|
|
307
|
+
default: any;
|
|
308
|
+
};
|
|
309
|
+
zIndex: NumberConstructor;
|
|
310
|
+
bodyStyle: {
|
|
311
|
+
type: PropType<CSSProperties>;
|
|
312
|
+
default: CSSProperties;
|
|
313
|
+
};
|
|
314
|
+
maskStyle: {
|
|
315
|
+
type: PropType<CSSProperties>;
|
|
316
|
+
default: CSSProperties;
|
|
317
|
+
};
|
|
318
|
+
mask: {
|
|
319
|
+
type: BooleanConstructor;
|
|
320
|
+
default: any;
|
|
321
|
+
};
|
|
322
|
+
keyboard: {
|
|
323
|
+
type: BooleanConstructor;
|
|
324
|
+
default: any;
|
|
325
|
+
};
|
|
326
|
+
wrapProps: ObjectConstructor;
|
|
327
|
+
focusTriggerAfterClose: {
|
|
328
|
+
type: BooleanConstructor;
|
|
329
|
+
default: any;
|
|
330
|
+
};
|
|
331
|
+
modalRender: PropType<(arg: {
|
|
332
|
+
originVNode: VueNode;
|
|
333
|
+
}) => VueNode>;
|
|
334
|
+
mousePosition: {
|
|
335
|
+
type: PropType<{
|
|
336
|
+
x: number;
|
|
337
|
+
y: number;
|
|
338
|
+
}>;
|
|
339
|
+
default: {
|
|
340
|
+
x: number;
|
|
341
|
+
y: number;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
}>>, "visible" | "open" | "onUpdate:open">;
|
|
345
|
+
submitter: false | ApFormSubmitterConfig;
|
|
346
|
+
}, {}>, Readonly<ApModalFormSlots> & ApModalFormSlots>;
|
|
347
|
+
export default _default;
|
|
348
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
349
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
350
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
351
|
+
type: PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
352
|
+
} : {
|
|
353
|
+
type: PropType<T[K]>;
|
|
354
|
+
required: true;
|
|
355
|
+
};
|
|
356
|
+
};
|
|
357
|
+
type __VLS_WithDefaults<P, D> = {
|
|
358
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
359
|
+
default: D[K];
|
|
360
|
+
}> : P[K];
|
|
361
|
+
};
|
|
362
|
+
type __VLS_Prettify<T> = {
|
|
363
|
+
[K in keyof T]: T[K];
|
|
364
|
+
} & {};
|
|
365
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
366
|
+
new (): {
|
|
367
|
+
$slots: S;
|
|
368
|
+
};
|
|
369
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { isVNode as z, defineComponent as D, useSlots as E, ref as N, cloneVNode as L, computed as A, createVNode as a, mergeProps as m, unref as s, openBlock as g, createElementBlock as W, Fragment as G, withCtx as y, renderSlot as V, createTextVNode as H, toDisplayString as I, createBlock as x, resolveDynamicComponent as P } from "vue";
|
|
2
|
+
import { Button as C, Flex as S, Space as J, Modal as K } from "ant-design-vue";
|
|
3
|
+
import "../ap-form.vue.mjs";
|
|
4
|
+
import "../../hooks/index.mjs";
|
|
5
|
+
import { getSingleVNode as Q } from "../../utils/slot.mjs";
|
|
6
|
+
import "../../config-provider/index.mjs";
|
|
7
|
+
import { omit as X } from "lodash-unified";
|
|
8
|
+
import "../style/modal-form.css";
|
|
9
|
+
import { useControllableValue as Y } from "../../hooks/useControllableValue.mjs";
|
|
10
|
+
import { useLocale as Z } from "../../config-provider/hooks/use-locale.mjs";
|
|
11
|
+
import { useNamespace as ee } from "../../config-provider/hooks/use-namespace.mjs";
|
|
12
|
+
import te from "../ap-form.vue2.mjs";
|
|
13
|
+
function B(r) {
|
|
14
|
+
return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !z(r);
|
|
15
|
+
}
|
|
16
|
+
const ce = /* @__PURE__ */ D({
|
|
17
|
+
__name: "index",
|
|
18
|
+
props: {
|
|
19
|
+
initialValues: {},
|
|
20
|
+
layout: {
|
|
21
|
+
default: "horizontal"
|
|
22
|
+
},
|
|
23
|
+
labelCol: {},
|
|
24
|
+
wrapperCol: {},
|
|
25
|
+
colon: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: !0
|
|
28
|
+
},
|
|
29
|
+
labelAlign: {
|
|
30
|
+
default: "right"
|
|
31
|
+
},
|
|
32
|
+
labelWrap: {
|
|
33
|
+
type: Boolean
|
|
34
|
+
},
|
|
35
|
+
prefixCls: {},
|
|
36
|
+
requiredMark: {},
|
|
37
|
+
hideRequiredMark: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: !1
|
|
40
|
+
},
|
|
41
|
+
rules: {},
|
|
42
|
+
validateMessages: {},
|
|
43
|
+
validateOnRuleChange: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: !0
|
|
46
|
+
},
|
|
47
|
+
scrollToFirstError: {},
|
|
48
|
+
onSubmit: {},
|
|
49
|
+
name: {},
|
|
50
|
+
validateTrigger: {
|
|
51
|
+
default: "change"
|
|
52
|
+
},
|
|
53
|
+
size: {},
|
|
54
|
+
disabled: {
|
|
55
|
+
type: Boolean
|
|
56
|
+
},
|
|
57
|
+
onValuesChange: {},
|
|
58
|
+
onFieldsChange: {},
|
|
59
|
+
onFinishFailed: {},
|
|
60
|
+
onValidate: {},
|
|
61
|
+
open: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: void 0
|
|
64
|
+
},
|
|
65
|
+
"onUpdate:open": {},
|
|
66
|
+
modalProps: {
|
|
67
|
+
default: () => ({})
|
|
68
|
+
},
|
|
69
|
+
title: {},
|
|
70
|
+
width: {
|
|
71
|
+
default: 800
|
|
72
|
+
},
|
|
73
|
+
onFinish: {},
|
|
74
|
+
submitter: {
|
|
75
|
+
type: [Boolean, Object],
|
|
76
|
+
default: () => ({
|
|
77
|
+
resetButtonProps: !1
|
|
78
|
+
})
|
|
79
|
+
},
|
|
80
|
+
showCancel: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: !0
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
emits: ["update:open"],
|
|
86
|
+
setup(r, {
|
|
87
|
+
emit: _
|
|
88
|
+
}) {
|
|
89
|
+
const e = r, p = E(), T = _, c = N(), n = N(!1), {
|
|
90
|
+
value: j,
|
|
91
|
+
updateValue: f
|
|
92
|
+
} = Y(e, T, {
|
|
93
|
+
valuePropName: "open",
|
|
94
|
+
defaultValue: !1
|
|
95
|
+
}), {
|
|
96
|
+
t: b
|
|
97
|
+
} = Z(), {
|
|
98
|
+
b: R,
|
|
99
|
+
e: k
|
|
100
|
+
} = ee("ap-form-modal-form"), v = Q(p.trigger), M = v ? L(v, {
|
|
101
|
+
onClick: () => {
|
|
102
|
+
f(!0);
|
|
103
|
+
}
|
|
104
|
+
}) : null, O = A(() => {
|
|
105
|
+
var u, d, h, F;
|
|
106
|
+
let o;
|
|
107
|
+
const t = [];
|
|
108
|
+
if (e.submitter === !1)
|
|
109
|
+
return null;
|
|
110
|
+
if (e.showCancel) {
|
|
111
|
+
let l;
|
|
112
|
+
t.push(a(C, {
|
|
113
|
+
onClick: w,
|
|
114
|
+
disabled: n.value
|
|
115
|
+
}, B(l = b("ap.common.cancelText")) ? l : {
|
|
116
|
+
default: () => [l]
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
return ((u = e.submitter) == null ? void 0 : u.resetButtonProps) !== !1 && t.push(a(C, m(((d = e.submitter) == null ? void 0 : d.resetButtonProps) || {}, {
|
|
120
|
+
key: "submit",
|
|
121
|
+
disabled: n.value,
|
|
122
|
+
onClick: U
|
|
123
|
+
}), {
|
|
124
|
+
default: () => {
|
|
125
|
+
var l;
|
|
126
|
+
return [((l = e.submitter) == null ? void 0 : l.resetText) || b("ap.common.resetText")];
|
|
127
|
+
}
|
|
128
|
+
})), ((h = e.submitter) == null ? void 0 : h.submitButtonProps) !== !1 && t.push(a(C, m({
|
|
129
|
+
type: "primary",
|
|
130
|
+
key: "submit"
|
|
131
|
+
}, ((F = e.submitter) == null ? void 0 : F.submitButtonProps) || {}, {
|
|
132
|
+
loading: n.value,
|
|
133
|
+
onClick: $
|
|
134
|
+
}), {
|
|
135
|
+
default: () => {
|
|
136
|
+
var l;
|
|
137
|
+
return [((l = e.submitter) == null ? void 0 : l.submitText) || b("ap.common.okText")];
|
|
138
|
+
}
|
|
139
|
+
})), p.submitter ? a(S, {
|
|
140
|
+
justify: "flex-end",
|
|
141
|
+
class: k("footer")
|
|
142
|
+
}, B(o = p.submitter(t)) ? o : {
|
|
143
|
+
default: () => [o]
|
|
144
|
+
}) : a(S, {
|
|
145
|
+
justify: "flex-end",
|
|
146
|
+
class: k("footer")
|
|
147
|
+
}, {
|
|
148
|
+
default: () => [a(J, null, B(t) ? t : {
|
|
149
|
+
default: () => [t]
|
|
150
|
+
})]
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
function U() {
|
|
154
|
+
var o, t, i;
|
|
155
|
+
e.submitter !== !1 && ((o = c.value) == null || o.resetFields(), (i = (t = e.submitter) == null ? void 0 : t.onReset) == null || i.call(t));
|
|
156
|
+
}
|
|
157
|
+
async function $() {
|
|
158
|
+
var o, t, i, u;
|
|
159
|
+
if (e.submitter !== !1)
|
|
160
|
+
try {
|
|
161
|
+
const d = await ((o = c.value) == null ? void 0 : o.validateFields());
|
|
162
|
+
(i = (t = e.submitter) == null ? void 0 : t.onSubmit) == null || i.call(t), n.value = !0, await ((u = e.onFinish) == null ? void 0 : u.call(e, d)) && f(!1);
|
|
163
|
+
} finally {
|
|
164
|
+
n.value = !1;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function w() {
|
|
168
|
+
s(n) || f(!1);
|
|
169
|
+
}
|
|
170
|
+
function q(o) {
|
|
171
|
+
!o && s(n) || f(o);
|
|
172
|
+
}
|
|
173
|
+
return (o, t) => (g(), W(G, null, [a(s(K), m(o.modalProps, {
|
|
174
|
+
open: s(j),
|
|
175
|
+
"onUpdate:open": q,
|
|
176
|
+
onCancel: w,
|
|
177
|
+
footer: null,
|
|
178
|
+
width: o.width,
|
|
179
|
+
class: s(R)()
|
|
180
|
+
}), {
|
|
181
|
+
title: y(() => [V(o.$slots, "title", {}, () => [H(I(e.title), 1)])]),
|
|
182
|
+
default: y(() => [a(te, m({
|
|
183
|
+
ref_key: "formRef",
|
|
184
|
+
ref: c
|
|
185
|
+
}, s(X)(e, ["modalProps", "open", "onUpdate:open", "title", "width", "onFinish", "submitter"])), {
|
|
186
|
+
default: y(() => [V(o.$slots, "default")]),
|
|
187
|
+
_: 3
|
|
188
|
+
}, 16), (g(), x(P(O.value)))]),
|
|
189
|
+
_: 3
|
|
190
|
+
}, 16, ["open", "width", "class"]), (g(), x(P(s(M))))], 64));
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
export {
|
|
194
|
+
ce as default
|
|
195
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.aplus-ap-form-modal-form .ant-modal-content {
|
|
2
|
+
padding: 0;
|
|
3
|
+
}
|
|
4
|
+
.aplus-ap-form-modal-form .ant-modal-header {
|
|
5
|
+
padding: 15px 20px;
|
|
6
|
+
border-bottom: 1px solid #E9EDF3;
|
|
7
|
+
margin-bottom: 0;
|
|
8
|
+
}
|
|
9
|
+
.aplus-ap-form-modal-form .ant-modal-body {
|
|
10
|
+
padding: 20px;
|
|
11
|
+
}
|
|
12
|
+
.aplus-ap-form-modal-form__footer {
|
|
13
|
+
padding-top: 20px;
|
|
14
|
+
}
|
|
15
|
+
.aplus-ap-form-modal-form .ant-modal-close {
|
|
16
|
+
top: 16px;
|
|
17
|
+
}
|
package/es/src/index.d.ts
CHANGED