vft 0.0.261 → 0.0.264
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/components/affix/affix.d.ts +1 -1
- package/es/components/affix/affix.vue.d.ts +3 -3
- package/es/components/affix/index.d.ts +6 -6
- package/es/components/autocomplete/autocomplete.vue.d.ts +4 -4
- package/es/components/autocomplete/index.d.ts +12 -12
- package/es/components/avatar/index.d.ts +3 -3
- package/es/components/button/button.vue.d.ts +1 -1
- package/es/components/button/index.d.ts +24 -24
- package/es/components/button/use-button.d.ts +1 -1
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/checkbox/composables/use-checkbox-status.d.ts +2 -2
- package/es/components/checkbox/composables/use-checkbox.d.ts +2 -2
- package/es/components/checkbox/index.d.ts +51 -51
- package/es/components/col/col.vue.d.ts +1 -1
- package/es/components/col/index.d.ts +9 -9
- package/es/components/color-picker/index.d.ts +8 -8
- package/es/components/date-picker/date-picker.d.ts +6 -6
- package/es/components/date-picker/index.d.ts +12 -12
- package/es/components/date-picker/props/date-picker.d.ts +2 -2
- package/es/components/divider/index.d.ts +3 -3
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/focus-trap/utils.d.ts +1 -1
- package/es/components/form/form-item.vue.d.ts +2 -2
- package/es/components/form/hooks/use-form-common-props.d.ts +2 -2
- package/es/components/form/index.d.ts +54 -54
- package/es/components/input/index.d.ts +3 -3
- package/es/components/input/input.vue2.js +4 -4
- package/es/components/input-number/index.d.ts +2 -2
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/popper/composables/use-content.d.ts +3 -3
- package/es/components/radio/index.d.ts +48 -48
- package/es/components/radio/radio.vue.d.ts +1 -1
- package/es/components/radio/use-radio.d.ts +1 -1
- package/es/components/roving-focus-group/roving-focus-group-impl.vue.d.ts +2 -2
- package/es/components/select/index.d.ts +10 -10
- package/es/components/select/select.vue.d.ts +10 -10
- package/es/components/select/useSelect.d.ts +9 -9
- package/es/components/slider/index.d.ts +4 -4
- package/es/components/space/index.d.ts +3 -3
- package/es/components/space/space.d.ts +4 -4
- package/es/components/super-form/index.d.ts +15 -0
- package/es/components/super-form/super-form.vue.d.ts +1 -0
- package/es/components/super-form/super-form.vue2.js +4 -4
- package/es/components/super-form/types.d.ts +2 -0
- package/es/components/switch/index.d.ts +15 -15
- package/es/components/switch/switch.vue.d.ts +1 -1
- package/es/components/tabs/index.d.ts +2 -2
- package/es/components/time-picker/common/picker-range-trigger.vue.d.ts +2 -2
- package/es/components/time-picker/common/picker.vue.d.ts +6 -6
- package/es/components/time-picker/common/props.d.ts +2 -2
- package/es/components/time-picker/index.d.ts +12 -12
- package/es/components/time-picker/time-picker.d.ts +6 -6
- package/es/components/time-select/time-select.vue.d.ts +1 -1
- package/es/components/timeline/index.d.ts +6 -6
- package/es/components/tree/tree-node.vue.d.ts +36 -36
- package/es/components/upload/index.d.ts +9 -9
- package/es/constants/size.d.ts +1 -1
- package/es/hooks/use-popper/index.d.ts +3 -3
- package/es/hooks/use-size/index.d.ts +1 -1
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/affix/affix.d.ts +1 -1
- package/lib/components/affix/affix.vue.d.ts +3 -3
- package/lib/components/affix/index.d.ts +6 -6
- package/lib/components/autocomplete/autocomplete.vue.d.ts +4 -4
- package/lib/components/autocomplete/index.d.ts +12 -12
- package/lib/components/avatar/index.d.ts +3 -3
- package/lib/components/button/button.vue.d.ts +1 -1
- package/lib/components/button/index.d.ts +24 -24
- package/lib/components/button/use-button.d.ts +1 -1
- package/lib/components/checkbox/composables/use-checkbox-status.d.ts +2 -2
- package/lib/components/checkbox/composables/use-checkbox.d.ts +2 -2
- package/lib/components/checkbox/index.d.ts +51 -51
- package/lib/components/col/col.vue.d.ts +1 -1
- package/lib/components/col/index.d.ts +9 -9
- package/lib/components/color-picker/index.d.ts +8 -8
- package/lib/components/date-picker/date-picker.d.ts +6 -6
- package/lib/components/date-picker/index.d.ts +12 -12
- package/lib/components/date-picker/props/date-picker.d.ts +2 -2
- package/lib/components/divider/index.d.ts +3 -3
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/focus-trap/utils.d.ts +1 -1
- package/lib/components/form/form-item.vue.d.ts +2 -2
- package/lib/components/form/hooks/use-form-common-props.d.ts +2 -2
- package/lib/components/form/index.d.ts +54 -54
- package/lib/components/input/index.d.ts +3 -3
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/input-number/index.d.ts +2 -2
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/popper/composables/use-content.d.ts +3 -3
- package/lib/components/radio/index.d.ts +48 -48
- package/lib/components/radio/radio.vue.d.ts +1 -1
- package/lib/components/radio/use-radio.d.ts +1 -1
- package/lib/components/roving-focus-group/roving-focus-group-impl.vue.d.ts +2 -2
- package/lib/components/select/index.d.ts +10 -10
- package/lib/components/select/select.vue.d.ts +10 -10
- package/lib/components/select/useSelect.d.ts +9 -9
- package/lib/components/slider/index.d.ts +4 -4
- package/lib/components/space/index.d.ts +3 -3
- package/lib/components/space/space.d.ts +4 -4
- package/lib/components/super-form/index.d.ts +15 -0
- package/lib/components/super-form/super-form.vue.d.ts +1 -0
- package/lib/components/super-form/super-form.vue2.cjs +1 -1
- package/lib/components/super-form/types.d.ts +2 -0
- package/lib/components/switch/index.d.ts +15 -15
- package/lib/components/switch/switch.vue.d.ts +1 -1
- package/lib/components/tabs/index.d.ts +2 -2
- package/lib/components/time-picker/common/picker-range-trigger.vue.d.ts +2 -2
- package/lib/components/time-picker/common/picker.vue.d.ts +6 -6
- package/lib/components/time-picker/common/props.d.ts +2 -2
- package/lib/components/time-picker/index.d.ts +12 -12
- package/lib/components/time-picker/time-picker.d.ts +6 -6
- package/lib/components/time-select/time-select.vue.d.ts +1 -1
- package/lib/components/timeline/index.d.ts +6 -6
- package/lib/components/tree/tree-node.vue.d.ts +36 -36
- package/lib/components/upload/index.d.ts +9 -9
- package/lib/constants/size.d.ts +1 -1
- package/lib/hooks/use-popper/index.d.ts +3 -3
- package/lib/hooks/use-size/index.d.ts +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +5 -5
- package/web-types.json +1 -1
|
@@ -3,7 +3,7 @@ import FormItem, { type FormItemProps } from './form-item.vue';
|
|
|
3
3
|
export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
4
4
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
5
5
|
size: {
|
|
6
|
-
type: import("vue").PropType<""
|
|
6
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
7
7
|
};
|
|
8
8
|
disabled: {
|
|
9
9
|
type: import("vue").PropType<boolean>;
|
|
@@ -15,7 +15,7 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
15
15
|
type: import("vue").PropType<Partial<Record<string, import("vft/es/utils").Arrayable<import("./types").FormItemRule>>>>;
|
|
16
16
|
};
|
|
17
17
|
labelPosition: {
|
|
18
|
-
type: import("vue").PropType<"
|
|
18
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
19
19
|
};
|
|
20
20
|
requireAsteriskPosition: {
|
|
21
21
|
type: import("vue").PropType<"left" | "right">;
|
|
@@ -69,7 +69,7 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
69
69
|
Defaults: {};
|
|
70
70
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
71
71
|
size: {
|
|
72
|
-
type: import("vue").PropType<""
|
|
72
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
73
73
|
};
|
|
74
74
|
disabled: {
|
|
75
75
|
type: import("vue").PropType<boolean>;
|
|
@@ -81,7 +81,7 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
81
81
|
type: import("vue").PropType<Partial<Record<string, import("vft/es/utils").Arrayable<import("./types").FormItemRule>>>>;
|
|
82
82
|
};
|
|
83
83
|
labelPosition: {
|
|
84
|
-
type: import("vue").PropType<"
|
|
84
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
85
85
|
};
|
|
86
86
|
requireAsteriskPosition: {
|
|
87
87
|
type: import("vue").PropType<"left" | "right">;
|
|
@@ -130,7 +130,7 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
130
130
|
__isSuspense?: never;
|
|
131
131
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
132
132
|
size: {
|
|
133
|
-
type: import("vue").PropType<""
|
|
133
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
134
134
|
};
|
|
135
135
|
disabled: {
|
|
136
136
|
type: import("vue").PropType<boolean>;
|
|
@@ -142,7 +142,7 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
142
142
|
type: import("vue").PropType<Partial<Record<string, import("vft/es/utils").Arrayable<import("./types").FormItemRule>>>>;
|
|
143
143
|
};
|
|
144
144
|
labelPosition: {
|
|
145
|
-
type: import("vue").PropType<"
|
|
145
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
146
146
|
};
|
|
147
147
|
requireAsteriskPosition: {
|
|
148
148
|
type: import("vue").PropType<"left" | "right">;
|
|
@@ -204,13 +204,17 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
204
204
|
type: import("vue").PropType<string | string[]>;
|
|
205
205
|
};
|
|
206
206
|
size: {
|
|
207
|
-
type: import("vue").PropType<""
|
|
207
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
208
|
+
};
|
|
209
|
+
required: {
|
|
210
|
+
type: import("vue").PropType<boolean>;
|
|
211
|
+
default: undefined;
|
|
208
212
|
};
|
|
209
213
|
rules: {
|
|
210
214
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
211
215
|
};
|
|
212
216
|
labelPosition: {
|
|
213
|
-
type: import("vue").PropType<"
|
|
217
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
214
218
|
};
|
|
215
219
|
labelWidth: {
|
|
216
220
|
type: import("vue").PropType<string | number>;
|
|
@@ -224,10 +228,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
224
228
|
type: import("vue").PropType<boolean>;
|
|
225
229
|
default: boolean;
|
|
226
230
|
};
|
|
227
|
-
required: {
|
|
228
|
-
type: import("vue").PropType<boolean>;
|
|
229
|
-
default: undefined;
|
|
230
|
-
};
|
|
231
231
|
for: {
|
|
232
232
|
type: import("vue").PropType<string>;
|
|
233
233
|
};
|
|
@@ -237,7 +237,7 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
237
237
|
}>> & Readonly<{
|
|
238
238
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
239
239
|
}>, {
|
|
240
|
-
size: import("vue").ComputedRef<""
|
|
240
|
+
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
241
241
|
validateMessage: import("vue").Ref<string, string>;
|
|
242
242
|
validateState: import("vue").Ref<import("./types").FormItemValidateState, import("./types").FormItemValidateState>;
|
|
243
243
|
validate: (trigger: string, callback?: import("./types").FormValidateCallback) => import("./types").FormValidationResult;
|
|
@@ -246,10 +246,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
246
246
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
247
247
|
"update:error": (val: string) => void;
|
|
248
248
|
}, import("vue").PublicProps, {
|
|
249
|
+
required: boolean;
|
|
249
250
|
labelWidth: string | number;
|
|
250
251
|
inlineMessage: string | boolean;
|
|
251
252
|
showMessage: boolean;
|
|
252
|
-
required: boolean;
|
|
253
253
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
254
254
|
P: {};
|
|
255
255
|
B: {};
|
|
@@ -268,13 +268,17 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
268
268
|
type: import("vue").PropType<string | string[]>;
|
|
269
269
|
};
|
|
270
270
|
size: {
|
|
271
|
-
type: import("vue").PropType<""
|
|
271
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
272
|
+
};
|
|
273
|
+
required: {
|
|
274
|
+
type: import("vue").PropType<boolean>;
|
|
275
|
+
default: undefined;
|
|
272
276
|
};
|
|
273
277
|
rules: {
|
|
274
278
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
275
279
|
};
|
|
276
280
|
labelPosition: {
|
|
277
|
-
type: import("vue").PropType<"
|
|
281
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
278
282
|
};
|
|
279
283
|
labelWidth: {
|
|
280
284
|
type: import("vue").PropType<string | number>;
|
|
@@ -288,10 +292,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
288
292
|
type: import("vue").PropType<boolean>;
|
|
289
293
|
default: boolean;
|
|
290
294
|
};
|
|
291
|
-
required: {
|
|
292
|
-
type: import("vue").PropType<boolean>;
|
|
293
|
-
default: undefined;
|
|
294
|
-
};
|
|
295
295
|
for: {
|
|
296
296
|
type: import("vue").PropType<string>;
|
|
297
297
|
};
|
|
@@ -301,17 +301,17 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
301
301
|
}>> & Readonly<{
|
|
302
302
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
303
303
|
}>, {
|
|
304
|
-
size: import("vue").ComputedRef<""
|
|
304
|
+
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
305
305
|
validateMessage: import("vue").Ref<string, string>;
|
|
306
306
|
validateState: import("vue").Ref<import("./types").FormItemValidateState, import("./types").FormItemValidateState>;
|
|
307
307
|
validate: (trigger: string, callback?: import("./types").FormValidateCallback) => import("./types").FormValidationResult;
|
|
308
308
|
clearValidate: () => void;
|
|
309
309
|
resetField: () => void;
|
|
310
310
|
}, {}, {}, {}, {
|
|
311
|
+
required: boolean;
|
|
311
312
|
labelWidth: string | number;
|
|
312
313
|
inlineMessage: string | boolean;
|
|
313
314
|
showMessage: boolean;
|
|
314
|
-
required: boolean;
|
|
315
315
|
}>;
|
|
316
316
|
__isFragment?: never;
|
|
317
317
|
__isTeleport?: never;
|
|
@@ -327,13 +327,17 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
327
327
|
type: import("vue").PropType<string | string[]>;
|
|
328
328
|
};
|
|
329
329
|
size: {
|
|
330
|
-
type: import("vue").PropType<""
|
|
330
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
331
|
+
};
|
|
332
|
+
required: {
|
|
333
|
+
type: import("vue").PropType<boolean>;
|
|
334
|
+
default: undefined;
|
|
331
335
|
};
|
|
332
336
|
rules: {
|
|
333
337
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
334
338
|
};
|
|
335
339
|
labelPosition: {
|
|
336
|
-
type: import("vue").PropType<"
|
|
340
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
337
341
|
};
|
|
338
342
|
labelWidth: {
|
|
339
343
|
type: import("vue").PropType<string | number>;
|
|
@@ -347,10 +351,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
347
351
|
type: import("vue").PropType<boolean>;
|
|
348
352
|
default: boolean;
|
|
349
353
|
};
|
|
350
|
-
required: {
|
|
351
|
-
type: import("vue").PropType<boolean>;
|
|
352
|
-
default: undefined;
|
|
353
|
-
};
|
|
354
354
|
for: {
|
|
355
355
|
type: import("vue").PropType<string>;
|
|
356
356
|
};
|
|
@@ -360,7 +360,7 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
360
360
|
}>> & Readonly<{
|
|
361
361
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
362
362
|
}>, {
|
|
363
|
-
size: import("vue").ComputedRef<""
|
|
363
|
+
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
364
364
|
validateMessage: import("vue").Ref<string, string>;
|
|
365
365
|
validateState: import("vue").Ref<import("./types").FormItemValidateState, import("./types").FormItemValidateState>;
|
|
366
366
|
validate: (trigger: string, callback?: import("./types").FormValidateCallback) => import("./types").FormValidationResult;
|
|
@@ -369,10 +369,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
369
369
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
370
370
|
"update:error": (val: string) => void;
|
|
371
371
|
}, string, {
|
|
372
|
+
required: boolean;
|
|
372
373
|
labelWidth: string | number;
|
|
373
374
|
inlineMessage: string | boolean;
|
|
374
375
|
showMessage: boolean;
|
|
375
|
-
required: boolean;
|
|
376
376
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
377
377
|
$slots: {
|
|
378
378
|
label?(_: {
|
|
@@ -397,13 +397,17 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
397
397
|
type: import("vue").PropType<string | string[]>;
|
|
398
398
|
};
|
|
399
399
|
size: {
|
|
400
|
-
type: import("vue").PropType<""
|
|
400
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
401
|
+
};
|
|
402
|
+
required: {
|
|
403
|
+
type: import("vue").PropType<boolean>;
|
|
404
|
+
default: undefined;
|
|
401
405
|
};
|
|
402
406
|
rules: {
|
|
403
407
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
404
408
|
};
|
|
405
409
|
labelPosition: {
|
|
406
|
-
type: import("vue").PropType<"
|
|
410
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
407
411
|
};
|
|
408
412
|
labelWidth: {
|
|
409
413
|
type: import("vue").PropType<string | number>;
|
|
@@ -417,10 +421,6 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
417
421
|
type: import("vue").PropType<boolean>;
|
|
418
422
|
default: boolean;
|
|
419
423
|
};
|
|
420
|
-
required: {
|
|
421
|
-
type: import("vue").PropType<boolean>;
|
|
422
|
-
default: undefined;
|
|
423
|
-
};
|
|
424
424
|
for: {
|
|
425
425
|
type: import("vue").PropType<string>;
|
|
426
426
|
};
|
|
@@ -430,7 +430,7 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
430
430
|
}>> & Readonly<{
|
|
431
431
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
432
432
|
}>, {
|
|
433
|
-
size: import("vue").ComputedRef<""
|
|
433
|
+
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
434
434
|
validateMessage: import("vue").Ref<string, string>;
|
|
435
435
|
validateState: import("vue").Ref<import("./types").FormItemValidateState, import("./types").FormItemValidateState>;
|
|
436
436
|
validate: (trigger: string, callback?: import("./types").FormValidateCallback) => import("./types").FormValidationResult;
|
|
@@ -439,10 +439,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
439
439
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
440
440
|
"update:error": (val: string) => void;
|
|
441
441
|
}, import("vue").PublicProps, {
|
|
442
|
+
required: boolean;
|
|
442
443
|
labelWidth: string | number;
|
|
443
444
|
inlineMessage: string | boolean;
|
|
444
445
|
showMessage: boolean;
|
|
445
|
-
required: boolean;
|
|
446
446
|
}, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
|
|
447
447
|
P: {};
|
|
448
448
|
B: {};
|
|
@@ -461,13 +461,17 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
461
461
|
type: import("vue").PropType<string | string[]>;
|
|
462
462
|
};
|
|
463
463
|
size: {
|
|
464
|
-
type: import("vue").PropType<""
|
|
464
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
465
|
+
};
|
|
466
|
+
required: {
|
|
467
|
+
type: import("vue").PropType<boolean>;
|
|
468
|
+
default: undefined;
|
|
465
469
|
};
|
|
466
470
|
rules: {
|
|
467
471
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
468
472
|
};
|
|
469
473
|
labelPosition: {
|
|
470
|
-
type: import("vue").PropType<"
|
|
474
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
471
475
|
};
|
|
472
476
|
labelWidth: {
|
|
473
477
|
type: import("vue").PropType<string | number>;
|
|
@@ -481,10 +485,6 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
481
485
|
type: import("vue").PropType<boolean>;
|
|
482
486
|
default: boolean;
|
|
483
487
|
};
|
|
484
|
-
required: {
|
|
485
|
-
type: import("vue").PropType<boolean>;
|
|
486
|
-
default: undefined;
|
|
487
|
-
};
|
|
488
488
|
for: {
|
|
489
489
|
type: import("vue").PropType<string>;
|
|
490
490
|
};
|
|
@@ -494,17 +494,17 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
494
494
|
}>> & Readonly<{
|
|
495
495
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
496
496
|
}>, {
|
|
497
|
-
size: import("vue").ComputedRef<""
|
|
497
|
+
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
498
498
|
validateMessage: import("vue").Ref<string, string>;
|
|
499
499
|
validateState: import("vue").Ref<import("./types").FormItemValidateState, import("./types").FormItemValidateState>;
|
|
500
500
|
validate: (trigger: string, callback?: import("./types").FormValidateCallback) => import("./types").FormValidationResult;
|
|
501
501
|
clearValidate: () => void;
|
|
502
502
|
resetField: () => void;
|
|
503
503
|
}, {}, {}, {}, {
|
|
504
|
+
required: boolean;
|
|
504
505
|
labelWidth: string | number;
|
|
505
506
|
inlineMessage: string | boolean;
|
|
506
507
|
showMessage: boolean;
|
|
507
|
-
required: boolean;
|
|
508
508
|
}>;
|
|
509
509
|
__isFragment?: never;
|
|
510
510
|
__isTeleport?: never;
|
|
@@ -520,13 +520,17 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
520
520
|
type: import("vue").PropType<string | string[]>;
|
|
521
521
|
};
|
|
522
522
|
size: {
|
|
523
|
-
type: import("vue").PropType<""
|
|
523
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
524
|
+
};
|
|
525
|
+
required: {
|
|
526
|
+
type: import("vue").PropType<boolean>;
|
|
527
|
+
default: undefined;
|
|
524
528
|
};
|
|
525
529
|
rules: {
|
|
526
530
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
527
531
|
};
|
|
528
532
|
labelPosition: {
|
|
529
|
-
type: import("vue").PropType<"
|
|
533
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
530
534
|
};
|
|
531
535
|
labelWidth: {
|
|
532
536
|
type: import("vue").PropType<string | number>;
|
|
@@ -540,10 +544,6 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
540
544
|
type: import("vue").PropType<boolean>;
|
|
541
545
|
default: boolean;
|
|
542
546
|
};
|
|
543
|
-
required: {
|
|
544
|
-
type: import("vue").PropType<boolean>;
|
|
545
|
-
default: undefined;
|
|
546
|
-
};
|
|
547
547
|
for: {
|
|
548
548
|
type: import("vue").PropType<string>;
|
|
549
549
|
};
|
|
@@ -553,7 +553,7 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
553
553
|
}>> & Readonly<{
|
|
554
554
|
"onUpdate:error"?: ((val: string) => any) | undefined;
|
|
555
555
|
}>, {
|
|
556
|
-
size: import("vue").ComputedRef<""
|
|
556
|
+
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
557
557
|
validateMessage: import("vue").Ref<string, string>;
|
|
558
558
|
validateState: import("vue").Ref<import("./types").FormItemValidateState, import("./types").FormItemValidateState>;
|
|
559
559
|
validate: (trigger: string, callback?: import("./types").FormValidateCallback) => import("./types").FormValidationResult;
|
|
@@ -562,10 +562,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
562
562
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
563
563
|
"update:error": (val: string) => void;
|
|
564
564
|
}, string, {
|
|
565
|
+
required: boolean;
|
|
565
566
|
labelWidth: string | number;
|
|
566
567
|
inlineMessage: string | boolean;
|
|
567
568
|
showMessage: boolean;
|
|
568
|
-
required: boolean;
|
|
569
569
|
}, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
570
570
|
$slots: {
|
|
571
571
|
label?(_: {
|
|
@@ -5,7 +5,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
5
5
|
type: import("vue").PropType<string>;
|
|
6
6
|
};
|
|
7
7
|
size: {
|
|
8
|
-
type: import("vue").PropType<"
|
|
8
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
9
9
|
};
|
|
10
10
|
disabled: {
|
|
11
11
|
type: import("vue").PropType<boolean>;
|
|
@@ -134,7 +134,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
134
134
|
type: import("vue").PropType<string>;
|
|
135
135
|
};
|
|
136
136
|
size: {
|
|
137
|
-
type: import("vue").PropType<"
|
|
137
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
138
138
|
};
|
|
139
139
|
disabled: {
|
|
140
140
|
type: import("vue").PropType<boolean>;
|
|
@@ -244,7 +244,7 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
244
244
|
type: import("vue").PropType<string>;
|
|
245
245
|
};
|
|
246
246
|
size: {
|
|
247
|
-
type: import("vue").PropType<"
|
|
247
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
248
248
|
};
|
|
249
249
|
disabled: {
|
|
250
250
|
type: import("vue").PropType<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),T=require("@vft/constants"),Y=require("@vft/use"),s=require("@vft/utils");require("../form/index.cjs");const b=require("../icon/index.cjs"),Z=require("@vueuse/core"),q=require("../../utils/error.cjs");require("../../utils/ns-cover.cjs");const Be=require("lodash-es"),_=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const ee=require("./utils.cjs"),te=require("../form/hooks/use-form-common-props.cjs"),oe=require("../form/hooks/use-form-item.cjs"),Ve=["role"],Ie=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form"],Se=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form"],ze=e.defineComponent({__name:"input",props:{id:{},size:{default:""},disabled:{type:Boolean},modelValue:{},type:{default:"text"},resize:{},autosize:{type:[Object,Boolean],default:!1},autocomplete:{default:"off"},formatter:{},parser:{},placeholder:{},form:{},readonly:{type:Boolean},clearable:{type:Boolean},showPassword:{type:Boolean},showWordLimit:{type:Boolean},suffixIcon:{},prefixIcon:{},clearIcon:{},containerRole:{},label:{},tabindex:{default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:[Boolean,null,String,Object,Array]}},emits:{[T.UPDATE_MODEL_EVENT]:t=>s.isString(t),input:t=>s.isString(t),change:t=>s.isString(t),suffixClick:t=>s.isString(t),prefixClick:t=>s.isString(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,enter:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},setup(t,{expose:ne,emit:ae}){const l=ae,p=e.useAttrs(),i=e.useSlots(),F=e.computed(()=>{const o={};return t.containerRole==="combobox"&&(o["aria-haspopup"]=p["aria-haspopup"],o["aria-owns"]=p["aria-owns"],o["aria-expanded"]=p["aria-expanded"]),o}),le=e.computed(()=>[t.type==="textarea"?A.b():n.b(),n.m(ie.value),n.is("disabled",c.value),n.is("exceed",fe.value),n.is("focus",m.value),{[n.b("group")]:i.prepend||i.append,[n.bm("group","append")]:i.append,[n.bm("group","prepend")]:i.prepend,[n.m("prefix")]:i.prefix||t.prefixIcon,[n.m("suffix")]:i.suffix||t.suffixIcon||t.clearable||t.showPassword,[n.bm("suffix","password-clear")]:E.value&&z.value},p.class]),se=e.getCurrentInstance(),re=e.computed(()=>[n.e("wrapper"),n.is("focus",m.value)]),r=Y.useAttrs({excludeKeys:e.computed(()=>Object.keys(F.value))}),{form:ue,formItem:C}=oe.useFormItem(),{inputId:M}=oe.useFormItemInputId(se.props,{formItemContext:C}),ie=te.useFormSize(),c=te.useFormDisabled(),n=_.useNamespace("input"),A=_.useNamespace("textarea"),w=e.shallowRef(),d=e.shallowRef(),m=e.ref(!1),V=e.ref(!1),v=e.ref(!1),x=e.ref(!1),D=e.ref(),I=e.shallowRef(t.inputStyle),y=e.computed(()=>w.value||d.value),S=e.computed(()=>s.singleAttrToObj(t.prefixIcon,"icon",{size:16})),O=e.computed(()=>s.singleAttrToObj(t.suffixIcon,"icon",{size:16})),ce=e.computed(()=>s.singleAttrToObj(t.clearIcon,"icon",{icon:"icon-circle-close",size:16})),R=e.computed(()=>ue?.statusIcon??!1),h=e.computed(()=>C?.validateState||""),K=e.computed(()=>h.value&&{validating:"icon-loading",success:"icon-circle-check",error:"icon-circle-close"}[h.value]),de=e.computed(()=>x.value?{icon:"icon-view",size:16}:{icon:"icon-hide",size:16}),me=e.computed(()=>[p.style,t.inputStyle]),$=e.computed(()=>[t.inputStyle,I.value,{resize:t.resize}]),u=e.computed(()=>Be.isNil(t.modelValue)?"":String(t.modelValue)),E=e.computed(()=>t.clearable&&!c.value&&!t.readonly&&!!u.value&&(m.value||V.value)),z=e.computed(()=>t.showPassword&&!c.value&&!t.readonly&&!!u.value&&(!!u.value||m.value)),f=e.computed(()=>t.showWordLimit&&!!r.value.maxlength&&(t.type==="text"||t.type==="textarea")&&!c.value&&!t.readonly&&!t.showPassword),N=e.computed(()=>Array.from(u.value).length),fe=e.computed(()=>!!f.value&&N.value>Number(r.value.maxlength)),pe=e.computed(()=>!!i.suffix||!!t.suffixIcon||E.value||t.showPassword||f.value||!!h.value&&R.value),[ve,ye]=Y.useCursor(w);Z.useResizeObserver(d,o=>{if(!f.value||t.resize!=="both")return;const a=o[0],{width:k}=a.contentRect;D.value={right:`calc(100% - ${k+15+6}px)`}});const B=()=>{if(!(!Z.isClient||t.type!=="textarea"))if(t.autosize){const o=s.isObject(t.autosize)?t.autosize.minRows:void 0,a=s.isObject(t.autosize)?t.autosize.maxRows:void 0;I.value={...ee.calcTextareaHeight(d.value,o,a)}}else I.value={minHeight:ee.calcTextareaHeight(d.value).minHeight}},g=()=>{const o=y.value;!o||o.value===u.value||(o.value=u.value)},P=async o=>{ve();let{value:a}=o.target;if(r.value.maxlength&&a.length>=r.value.maxlength&&(a=a.slice(0,Number(r.value.maxlength))),t.formatter&&(a=t.parser?t.parser(a):a,a=t.formatter(a)),!v.value){if(a===u.value){g();return}l(T.UPDATE_MODEL_EVENT,a),l("input",a),await e.nextTick(),g(),ye()}},j=o=>{l("change",o.target.value)},he=()=>{l("suffixClick",t.modelValue)},ge=()=>{l("prefixClick",t.modelValue)},L=o=>{l("compositionstart",o),v.value=!0},ke=o=>/([(\uAC00-\uD7AF)|\u3130-\u318F])+/.test(o),W=o=>{l("compositionupdate",o);const a=o.target?.value,k=a[a.length-1]||"";v.value=!ke(k)},H=o=>{l("compositionend",o),v.value&&(v.value=!1,P(o))},be=()=>{x.value=!x.value,U()},U=async()=>{await e.nextTick(),y.value?.focus()},Ce=()=>y.value?.blur(),G=o=>{m.value=!0,l("focus",o)},J=o=>{m.value=!1,l("blur",o),t.validateEvent&&C?.validate?.("blur").catch(a=>q.debugWarn(a))},we=o=>{V.value=!1,l("mouseleave",o)},xe=o=>{V.value=!0,l("mouseenter",o)},Q=o=>{let a=o.key;if(o.target.type==="number"&&["e","+","-0","E"].includes(a))return o.returnValue=!1,!1;l("keydown",o)},Ee=()=>{y.value?.select()},X=()=>{l(T.UPDATE_MODEL_EVENT,""),l("change",""),l("clear"),l("input","")};return e.watch(()=>t.modelValue,()=>{e.nextTick(()=>B()),t.validateEvent&&C?.validate?.("change").catch(o=>q.debugWarn(o))}),e.watch(u,()=>g()),e.watch(()=>t.type,async()=>{await e.nextTick(),g(),B()}),e.onMounted(()=>{!t.formatter&&t.parser&&q.debugWarn("VftInput","If you set the parser, you also need to set the formatter."),g(),e.nextTick(B)}),ne({input:w,textarea:d,ref:y,textareaStyle:$,autosize:t.autosize,focus:U,blur:Ce,select:Ee,clear:X,resizeTextarea:B}),(o,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps(F.value,{class:le.value,style:me.value,role:o.containerRole,onMouseenter:xe,onMouseleave:we}),[o.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).be("group","prepend"))},[e.renderSlot(o.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(re.value)},[o.$slots.prefix||S.value?.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("prefix-inner")),onClick:ge},[e.renderSlot(o.$slots,"prefix"),S.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0,pointer:""},S.value,{class:e.unref(n).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(M),ref_key:"input",ref:w,class:e.unref(n).e("inner")},e.unref(r),{type:o.showPassword?x.value?"text":"password":o.type,disabled:e.unref(c),formatter:o.formatter,parser:o.parser,readonly:o.readonly,autocomplete:o.autocomplete,tabindex:o.tabindex,"aria-label":o.label,placeholder:o.placeholder,style:o.inputStyle,form:o.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q,onKeyup:a[0]||(a[0]=e.withKeys(k=>l("enter"),["enter"]))}),null,16,Ie),pe.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(n).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("suffix-inner")),onClick:he},[!E.value||!z.value||!f.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(o.$slots,"suffix"),O.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0},O.value,{class:e.unref(n).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:1,pointer:"",class:[e.unref(n).e("icon"),e.unref(n).e("clear")]},ce.value,{onMousedown:e.withModifiers(e.unref(s.noop),["prevent"]),onClick:e.withModifiers(X,["stop"])}),null,16,["class","onMousedown"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:2},de.value,{class:[e.unref(n).e("icon"),e.unref(n).e("password")],onClick:be}),null,16,["class"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(n).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("count-inner"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),3)],2)):e.createCommentVNode("",!0),h.value&&K.value&&R.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),{key:4,icon:K.value,class:e.normalizeClass([e.unref(n).e("icon"),e.unref(n).e("validateIcon"),e.unref(n).is("loading",h.value==="validating")])},null,8,["icon","class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0)],2),o.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n).be("group","append"))},[e.renderSlot(o.$slots,"append")],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("textarea",e.mergeProps({id:e.unref(M),ref_key:"textarea",ref:d,class:e.unref(A).e("inner")},e.unref(r),{tabindex:o.tabindex,disabled:e.unref(c),readonly:o.readonly,autocomplete:o.autocomplete,style:$.value,"aria-label":o.label,placeholder:o.placeholder,form:o.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q}),null,16,Se),f.value?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(D.value),class:e.normalizeClass(e.unref(n).e("count"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),7)):e.createCommentVNode("",!0)],64))],16,Ve)),[[e.vShow,o.type!=="hidden"]])}});exports.default=ze;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),T=require("@vft/constants"),Y=require("@vft/use"),s=require("@vft/utils");require("../form/index.cjs");const b=require("../icon/index.cjs"),Z=require("@vueuse/core"),q=require("../../utils/error.cjs");require("../../utils/ns-cover.cjs");const Be=require("lodash-es"),_=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const ee=require("./utils.cjs"),te=require("../form/hooks/use-form-item.cjs"),oe=require("../form/hooks/use-form-common-props.cjs"),Ve=["role"],Ie=["id","type","disabled","formatter","parser","readonly","autocomplete","tabindex","aria-label","placeholder","form"],Se=["id","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form"],ze=e.defineComponent({__name:"input",props:{id:{},size:{default:""},disabled:{type:Boolean},modelValue:{},type:{default:"text"},resize:{},autosize:{type:[Object,Boolean],default:!1},autocomplete:{default:"off"},formatter:{},parser:{},placeholder:{},form:{},readonly:{type:Boolean},clearable:{type:Boolean},showPassword:{type:Boolean},showWordLimit:{type:Boolean},suffixIcon:{},prefixIcon:{},clearIcon:{},containerRole:{},label:{},tabindex:{default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:[Boolean,null,String,Object,Array]}},emits:{[T.UPDATE_MODEL_EVENT]:t=>s.isString(t),input:t=>s.isString(t),change:t=>s.isString(t),suffixClick:t=>s.isString(t),prefixClick:t=>s.isString(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,enter:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},setup(t,{expose:ne,emit:ae}){const l=ae,p=e.useAttrs(),i=e.useSlots(),F=e.computed(()=>{const o={};return t.containerRole==="combobox"&&(o["aria-haspopup"]=p["aria-haspopup"],o["aria-owns"]=p["aria-owns"],o["aria-expanded"]=p["aria-expanded"]),o}),le=e.computed(()=>[t.type==="textarea"?A.b():n.b(),n.m(ie.value),n.is("disabled",c.value),n.is("exceed",fe.value),n.is("focus",m.value),{[n.b("group")]:i.prepend||i.append,[n.bm("group","append")]:i.append,[n.bm("group","prepend")]:i.prepend,[n.m("prefix")]:i.prefix||t.prefixIcon,[n.m("suffix")]:i.suffix||t.suffixIcon||t.clearable||t.showPassword,[n.bm("suffix","password-clear")]:E.value&&z.value},p.class]),se=e.getCurrentInstance(),re=e.computed(()=>[n.e("wrapper"),n.is("focus",m.value)]),r=Y.useAttrs({excludeKeys:e.computed(()=>Object.keys(F.value))}),{form:ue,formItem:C}=te.useFormItem(),{inputId:M}=te.useFormItemInputId(se.props,{formItemContext:C}),ie=oe.useFormSize(),c=oe.useFormDisabled(),n=_.useNamespace("input"),A=_.useNamespace("textarea"),w=e.shallowRef(),d=e.shallowRef(),m=e.ref(!1),V=e.ref(!1),v=e.ref(!1),x=e.ref(!1),D=e.ref(),I=e.shallowRef(t.inputStyle),y=e.computed(()=>w.value||d.value),S=e.computed(()=>s.singleAttrToObj(t.prefixIcon,"icon",{size:16})),O=e.computed(()=>s.singleAttrToObj(t.suffixIcon,"icon",{size:16})),ce=e.computed(()=>s.singleAttrToObj(t.clearIcon,"icon",{icon:"icon-circle-close",size:16})),R=e.computed(()=>ue?.statusIcon??!1),h=e.computed(()=>C?.validateState||""),K=e.computed(()=>h.value&&{validating:"icon-loading",success:"icon-circle-check",error:"icon-circle-close"}[h.value]),de=e.computed(()=>x.value?{icon:"icon-view",size:16}:{icon:"icon-hide",size:16}),me=e.computed(()=>[p.style,t.inputStyle]),$=e.computed(()=>[t.inputStyle,I.value,{resize:t.resize}]),u=e.computed(()=>Be.isNil(t.modelValue)?"":String(t.modelValue)),E=e.computed(()=>t.clearable&&!c.value&&!t.readonly&&!!u.value&&(m.value||V.value)),z=e.computed(()=>t.showPassword&&!c.value&&!t.readonly&&!!u.value&&(!!u.value||m.value)),f=e.computed(()=>t.showWordLimit&&!!r.value.maxlength&&(t.type==="text"||t.type==="textarea")&&!c.value&&!t.readonly&&!t.showPassword),N=e.computed(()=>Array.from(u.value).length),fe=e.computed(()=>!!f.value&&N.value>Number(r.value.maxlength)),pe=e.computed(()=>!!i.suffix||!!t.suffixIcon||E.value||t.showPassword||f.value||!!h.value&&R.value),[ve,ye]=Y.useCursor(w);Z.useResizeObserver(d,o=>{if(!f.value||t.resize!=="both")return;const a=o[0],{width:k}=a.contentRect;D.value={right:`calc(100% - ${k+15+6}px)`}});const B=()=>{if(!(!Z.isClient||t.type!=="textarea"))if(t.autosize){const o=s.isObject(t.autosize)?t.autosize.minRows:void 0,a=s.isObject(t.autosize)?t.autosize.maxRows:void 0;I.value={...ee.calcTextareaHeight(d.value,o,a)}}else I.value={minHeight:ee.calcTextareaHeight(d.value).minHeight}},g=()=>{const o=y.value;!o||o.value===u.value||(o.value=u.value)},P=async o=>{ve();let{value:a}=o.target;if(r.value.maxlength&&a.length>=r.value.maxlength&&(a=a.slice(0,Number(r.value.maxlength))),t.formatter&&(a=t.parser?t.parser(a):a,a=t.formatter(a)),!v.value){if(a===u.value){g();return}l(T.UPDATE_MODEL_EVENT,a),l("input",a),await e.nextTick(),g(),ye()}},j=o=>{l("change",o.target.value)},he=()=>{l("suffixClick",t.modelValue)},ge=()=>{l("prefixClick",t.modelValue)},L=o=>{l("compositionstart",o),v.value=!0},ke=o=>/([(\uAC00-\uD7AF)|\u3130-\u318F])+/.test(o),W=o=>{l("compositionupdate",o);const a=o.target?.value,k=a[a.length-1]||"";v.value=!ke(k)},H=o=>{l("compositionend",o),v.value&&(v.value=!1,P(o))},be=()=>{x.value=!x.value,U()},U=async()=>{await e.nextTick(),y.value?.focus()},Ce=()=>y.value?.blur(),G=o=>{m.value=!0,l("focus",o)},J=o=>{m.value=!1,l("blur",o),t.validateEvent&&C?.validate?.("blur").catch(a=>q.debugWarn(a))},we=o=>{V.value=!1,l("mouseleave",o)},xe=o=>{V.value=!0,l("mouseenter",o)},Q=o=>{let a=o.key;if(o.target.type==="number"&&["e","+","-0","E"].includes(a))return o.returnValue=!1,!1;l("keydown",o)},Ee=()=>{y.value?.select()},X=()=>{l(T.UPDATE_MODEL_EVENT,""),l("change",""),l("clear"),l("input","")};return e.watch(()=>t.modelValue,()=>{e.nextTick(()=>B()),t.validateEvent&&C?.validate?.("change").catch(o=>q.debugWarn(o))}),e.watch(u,()=>g()),e.watch(()=>t.type,async()=>{await e.nextTick(),g(),B()}),e.onMounted(()=>{!t.formatter&&t.parser&&q.debugWarn("VftInput","If you set the parser, you also need to set the formatter."),g(),e.nextTick(B)}),ne({input:w,textarea:d,ref:y,textareaStyle:$,autosize:t.autosize,focus:U,blur:Ce,select:Ee,clear:X,resizeTextarea:B}),(o,a)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps(F.value,{class:le.value,style:me.value,role:o.containerRole,onMouseenter:xe,onMouseleave:we}),[o.type!=="textarea"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[o.$slots.prepend?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n).be("group","prepend"))},[e.renderSlot(o.$slots,"prepend")],2)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(re.value)},[o.$slots.prefix||S.value?.icon?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(e.unref(n).e("prefix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("prefix-inner")),onClick:ge},[e.renderSlot(o.$slots,"prefix"),S.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0,pointer:""},S.value,{class:e.unref(n).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0),e.createElementVNode("input",e.mergeProps({id:e.unref(M),ref_key:"input",ref:w,class:e.unref(n).e("inner")},e.unref(r),{type:o.showPassword?x.value?"text":"password":o.type,disabled:e.unref(c),formatter:o.formatter,parser:o.parser,readonly:o.readonly,autocomplete:o.autocomplete,tabindex:o.tabindex,"aria-label":o.label,placeholder:o.placeholder,style:o.inputStyle,form:o.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q,onKeyup:a[0]||(a[0]=e.withKeys(k=>l("enter"),["enter"]))}),null,16,Ie),pe.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(e.unref(n).e("suffix"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("suffix-inner")),onClick:he},[!E.value||!z.value||!f.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.renderSlot(o.$slots,"suffix"),O.value?.icon?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:0},O.value,{class:e.unref(n).e("icon")}),null,16,["class"])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),E.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:1,pointer:"",class:[e.unref(n).e("icon"),e.unref(n).e("clear")]},ce.value,{onMousedown:e.withModifiers(e.unref(s.noop),["prevent"]),onClick:e.withModifiers(X,["stop"])}),null,16,["class","onMousedown"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),e.mergeProps({key:2},de.value,{class:[e.unref(n).e("icon"),e.unref(n).e("password")],onClick:be}),null,16,["class"])):e.createCommentVNode("",!0),f.value?(e.openBlock(),e.createElementBlock("span",{key:3,class:e.normalizeClass(e.unref(n).e("count"))},[e.createElementVNode("span",{class:e.normalizeClass(e.unref(n).e("count-inner"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),3)],2)):e.createCommentVNode("",!0),h.value&&K.value&&R.value?(e.openBlock(),e.createBlock(e.unref(b.VftIcon),{key:4,icon:K.value,class:e.normalizeClass([e.unref(n).e("icon"),e.unref(n).e("validateIcon"),e.unref(n).is("loading",h.value==="validating")])},null,8,["icon","class"])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0)],2),o.$slots.append?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n).be("group","append"))},[e.renderSlot(o.$slots,"append")],2)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("textarea",e.mergeProps({id:e.unref(M),ref_key:"textarea",ref:d,class:e.unref(A).e("inner")},e.unref(r),{tabindex:o.tabindex,disabled:e.unref(c),readonly:o.readonly,autocomplete:o.autocomplete,style:$.value,"aria-label":o.label,placeholder:o.placeholder,form:o.form,onCompositionstart:L,onCompositionupdate:W,onCompositionend:H,onInput:P,onFocus:G,onBlur:J,onChange:j,onKeydown:Q}),null,16,Se),f.value?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(D.value),class:e.normalizeClass(e.unref(n).e("count"))},e.toDisplayString(N.value)+" / "+e.toDisplayString(e.unref(r).maxlength),7)):e.createCommentVNode("",!0)],64))],16,Ve)),[[e.vShow,o.type!=="hidden"]])}});exports.default=ze;
|
|
@@ -26,7 +26,7 @@ export declare const VftInputNumber: import("vft/es/utils").SFCWithInstall<impor
|
|
|
26
26
|
type: import("vue").PropType<boolean>;
|
|
27
27
|
};
|
|
28
28
|
size: {
|
|
29
|
-
type: import("vue").PropType<"
|
|
29
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
30
30
|
};
|
|
31
31
|
controls: {
|
|
32
32
|
type: import("vue").PropType<boolean>;
|
|
@@ -87,7 +87,7 @@ export declare const VftInputNumber: import("vft/es/utils").SFCWithInstall<impor
|
|
|
87
87
|
type: import("vue").PropType<boolean>;
|
|
88
88
|
};
|
|
89
89
|
size: {
|
|
90
|
-
type: import("vue").PropType<"
|
|
90
|
+
type: import("vue").PropType<"default" | "small" | "large">;
|
|
91
91
|
};
|
|
92
92
|
controls: {
|
|
93
93
|
type: import("vue").PropType<boolean>;
|
|
@@ -7,14 +7,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
7
7
|
type: import("vue").PropType<string | number>;
|
|
8
8
|
default: number;
|
|
9
9
|
};
|
|
10
|
-
teleported: {
|
|
11
|
-
type: import("vue").PropType<boolean>;
|
|
12
|
-
default: boolean;
|
|
13
|
-
};
|
|
14
10
|
icon: {
|
|
15
11
|
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
16
12
|
default: string;
|
|
17
13
|
};
|
|
14
|
+
teleported: {
|
|
15
|
+
type: import("vue").PropType<boolean>;
|
|
16
|
+
default: boolean;
|
|
17
|
+
};
|
|
18
18
|
hideAfter: {
|
|
19
19
|
type: import("vue").PropType<number>;
|
|
20
20
|
default: number;
|
|
@@ -52,8 +52,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
52
52
|
cancel: (val: MouseEvent) => void;
|
|
53
53
|
}, import("vue").PublicProps, {
|
|
54
54
|
width: string | number;
|
|
55
|
-
teleported: boolean;
|
|
56
55
|
icon: string | import("vft/es/vft").IconProps;
|
|
56
|
+
teleported: boolean;
|
|
57
57
|
hideAfter: number;
|
|
58
58
|
persistent: boolean;
|
|
59
59
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -74,14 +74,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
74
74
|
type: import("vue").PropType<string | number>;
|
|
75
75
|
default: number;
|
|
76
76
|
};
|
|
77
|
-
teleported: {
|
|
78
|
-
type: import("vue").PropType<boolean>;
|
|
79
|
-
default: boolean;
|
|
80
|
-
};
|
|
81
77
|
icon: {
|
|
82
78
|
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
83
79
|
default: string;
|
|
84
80
|
};
|
|
81
|
+
teleported: {
|
|
82
|
+
type: import("vue").PropType<boolean>;
|
|
83
|
+
default: boolean;
|
|
84
|
+
};
|
|
85
85
|
hideAfter: {
|
|
86
86
|
type: import("vue").PropType<number>;
|
|
87
87
|
default: number;
|
|
@@ -116,8 +116,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
116
116
|
onConfirm?: ((val: MouseEvent) => any) | undefined;
|
|
117
117
|
}>, {}, {}, {}, {}, {
|
|
118
118
|
width: string | number;
|
|
119
|
-
teleported: boolean;
|
|
120
119
|
icon: string | import("vft/es/vft").IconProps;
|
|
120
|
+
teleported: boolean;
|
|
121
121
|
hideAfter: number;
|
|
122
122
|
persistent: boolean;
|
|
123
123
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -135,14 +135,14 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
135
135
|
type: import("vue").PropType<string | number>;
|
|
136
136
|
default: number;
|
|
137
137
|
};
|
|
138
|
-
teleported: {
|
|
139
|
-
type: import("vue").PropType<boolean>;
|
|
140
|
-
default: boolean;
|
|
141
|
-
};
|
|
142
138
|
icon: {
|
|
143
139
|
type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
|
|
144
140
|
default: string;
|
|
145
141
|
};
|
|
142
|
+
teleported: {
|
|
143
|
+
type: import("vue").PropType<boolean>;
|
|
144
|
+
default: boolean;
|
|
145
|
+
};
|
|
146
146
|
hideAfter: {
|
|
147
147
|
type: import("vue").PropType<number>;
|
|
148
148
|
default: number;
|
|
@@ -180,8 +180,8 @@ export declare const VftPopconfirm: import("vft/es/utils").SFCWithInstall<{
|
|
|
180
180
|
cancel: (val: MouseEvent) => void;
|
|
181
181
|
}, string, {
|
|
182
182
|
width: string | number;
|
|
183
|
-
teleported: boolean;
|
|
184
183
|
icon: string | import("vft/es/vft").IconProps;
|
|
184
|
+
teleported: boolean;
|
|
185
185
|
hideAfter: number;
|
|
186
186
|
persistent: boolean;
|
|
187
187
|
confirmButtonType: import("vft/es/vft").ButtonType;
|
|
@@ -43,8 +43,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
43
43
|
onConfirm?: ((val: MouseEvent) => any) | undefined;
|
|
44
44
|
}>, {
|
|
45
45
|
width: string | number;
|
|
46
|
-
teleported: boolean;
|
|
47
46
|
icon: string | IconProps;
|
|
47
|
+
teleported: boolean;
|
|
48
48
|
hideAfter: number;
|
|
49
49
|
persistent: boolean;
|
|
50
50
|
confirmButtonType: ButtonType;
|
|
@@ -46,11 +46,11 @@ export declare const usePopperContent: (props: PopperContentProps) => {
|
|
|
46
46
|
popperEscapeOffsets: import("@popperjs/core").SideObject;
|
|
47
47
|
};
|
|
48
48
|
offset?: {
|
|
49
|
-
|
|
50
|
-
bottom?: import("@popperjs/core").Offsets | undefined;
|
|
49
|
+
auto?: import("@popperjs/core").Offsets | undefined;
|
|
51
50
|
left?: import("@popperjs/core").Offsets | undefined;
|
|
52
51
|
right?: import("@popperjs/core").Offsets | undefined;
|
|
53
|
-
|
|
52
|
+
bottom?: import("@popperjs/core").Offsets | undefined;
|
|
53
|
+
top?: import("@popperjs/core").Offsets | undefined;
|
|
54
54
|
"auto-start"?: import("@popperjs/core").Offsets | undefined;
|
|
55
55
|
"auto-end"?: import("@popperjs/core").Offsets | undefined;
|
|
56
56
|
"top-start"?: import("@popperjs/core").Offsets | undefined;
|