vft 0.0.442 → 0.0.445
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/attributes.json +1 -1
- package/dist/index.css +2 -2
- 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 +22 -22
- package/es/components/autocomplete/index.d.ts +64 -64
- 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 +33 -33
- package/es/components/button/use-button.d.ts +1 -1
- package/es/components/cascader/cascader.d.ts +2 -2
- package/es/components/cascader/cascader.vue.d.ts +9 -9
- package/es/components/checkbox/index.d.ts +54 -54
- package/es/components/col/col.vue.d.ts +1 -1
- package/es/components/col/index.d.ts +9 -9
- package/es/components/collapse/collapse-item.vue.d.ts +1 -1
- package/es/components/color-picker/index.d.ts +12 -12
- package/es/components/config-provider/config-provider.vue.d.ts +1 -1
- package/es/components/config-provider/config-provider.vue2.js +8 -9
- 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 +2 -2
- package/es/components/dropdown/index.d.ts +39 -39
- package/es/components/form/index.d.ts +27 -27
- package/es/components/input/index.d.ts +13 -13
- package/es/components/input/input.vue.d.ts +4 -4
- package/es/components/input-number/index.d.ts +4 -4
- package/es/components/input-number/input-number.vue.d.ts +2 -2
- package/es/components/input-tag/input-tag.d.ts +1 -1
- package/es/components/input-tag/input-tag.vue.d.ts +9 -9
- package/es/components/md-container/md-container.vue2.js +15 -15
- package/es/components/message/message.vue.d.ts +1 -18
- package/es/components/message/message.vue2.js +62 -54
- package/es/components/message/types.d.ts +23 -7
- package/es/components/modal/index.d.ts +15 -15
- package/es/components/modal/modal.vue.d.ts +1 -1
- 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 +60 -60
- package/es/components/radio/radio.d.ts +1 -1
- package/es/components/radio/radio.vue.d.ts +5 -5
- package/es/components/search/index.d.ts +9 -9
- package/es/components/search/search.vue.d.ts +2 -2
- package/es/components/segmented/index.d.ts +6 -6
- package/es/components/segmented/segmented.d.ts +1 -1
- package/es/components/segmented/segmented.vue.d.ts +3 -3
- package/es/components/select/index.d.ts +45 -45
- package/es/components/select/select.vue.d.ts +45 -45
- package/es/components/select/useSelect.d.ts +36 -36
- package/es/components/slider/index.d.ts +2 -2
- package/es/components/slider/slider.vue.d.ts +2 -2
- package/es/components/space/index.d.ts +3 -3
- package/es/components/space/space.d.ts +4 -4
- package/es/components/steps/index.d.ts +3 -3
- package/es/components/super-form/component-map.js +25 -25
- package/es/components/super-form/index.d.ts +3 -3
- package/es/components/super-form/super-form-item.vue2.js +184 -184
- package/es/components/super-form/use/helper.js +34 -34
- package/es/components/super-form/use/use-auto-focus.js +4 -4
- package/es/components/super-form/use/use-form-events.js +56 -56
- package/es/components/switch/index.d.ts +21 -21
- package/es/components/switch/switch.vue.d.ts +3 -3
- package/es/components/table/table.vue.d.ts +1 -1
- package/es/components/table/table.vue2.js +18 -18
- package/es/components/tabs/index.d.ts +4 -4
- package/es/components/tabs/tabs.vue.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 +8 -8
- 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/tooltip/index.d.ts +5 -5
- package/es/components/tooltip/tooltip.vue.d.ts +2 -2
- package/es/components/tree/tree-node.vue.d.ts +39 -39
- package/es/components/upload/index.d.ts +18 -18
- package/es/components/verify-code/useImageVerify.js +1 -1
- package/es/components/verify-code/verify-code.vue2.js +16 -16
- package/es/hooks/use-popper/index.d.ts +3 -3
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/form-register.d.ts +28 -28
- package/es/utils/form-register.js +44 -44
- 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 +22 -22
- package/lib/components/autocomplete/index.d.ts +64 -64
- 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 +33 -33
- package/lib/components/button/use-button.d.ts +1 -1
- package/lib/components/cascader/cascader.d.ts +2 -2
- package/lib/components/cascader/cascader.vue.d.ts +9 -9
- package/lib/components/checkbox/index.d.ts +54 -54
- package/lib/components/col/col.vue.d.ts +1 -1
- package/lib/components/col/index.d.ts +9 -9
- package/lib/components/collapse/collapse-item.vue.d.ts +1 -1
- package/lib/components/color-picker/index.d.ts +12 -12
- package/lib/components/config-provider/config-provider.vue.d.ts +1 -1
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- 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 +2 -2
- package/lib/components/dropdown/index.d.ts +39 -39
- package/lib/components/form/index.d.ts +27 -27
- package/lib/components/input/index.d.ts +13 -13
- package/lib/components/input/input.vue.d.ts +4 -4
- package/lib/components/input-number/index.d.ts +4 -4
- package/lib/components/input-number/input-number.vue.d.ts +2 -2
- package/lib/components/input-tag/input-tag.d.ts +1 -1
- package/lib/components/input-tag/input-tag.vue.d.ts +9 -9
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/message/message.vue.d.ts +1 -18
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/message/types.d.ts +23 -7
- package/lib/components/modal/index.d.ts +15 -15
- package/lib/components/modal/modal.vue.d.ts +1 -1
- 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 +60 -60
- package/lib/components/radio/radio.d.ts +1 -1
- package/lib/components/radio/radio.vue.d.ts +5 -5
- package/lib/components/search/index.d.ts +9 -9
- package/lib/components/search/search.vue.d.ts +2 -2
- package/lib/components/segmented/index.d.ts +6 -6
- package/lib/components/segmented/segmented.d.ts +1 -1
- package/lib/components/segmented/segmented.vue.d.ts +3 -3
- package/lib/components/select/index.d.ts +45 -45
- package/lib/components/select/select.vue.d.ts +45 -45
- package/lib/components/select/useSelect.d.ts +36 -36
- package/lib/components/slider/index.d.ts +2 -2
- package/lib/components/slider/slider.vue.d.ts +2 -2
- package/lib/components/space/index.d.ts +3 -3
- package/lib/components/space/space.d.ts +4 -4
- package/lib/components/steps/index.d.ts +3 -3
- package/lib/components/super-form/component-map.cjs +1 -1
- package/lib/components/super-form/index.d.ts +3 -3
- package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
- package/lib/components/super-form/use/helper.cjs +1 -1
- package/lib/components/super-form/use/use-auto-focus.cjs +1 -1
- package/lib/components/super-form/use/use-form-events.cjs +1 -1
- package/lib/components/switch/index.d.ts +21 -21
- package/lib/components/switch/switch.vue.d.ts +3 -3
- package/lib/components/table/table.vue.d.ts +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/tabs/index.d.ts +4 -4
- package/lib/components/tabs/tabs.vue.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 +8 -8
- 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/tooltip/index.d.ts +5 -5
- package/lib/components/tooltip/tooltip.vue.d.ts +2 -2
- package/lib/components/tree/tree-node.vue.d.ts +39 -39
- package/lib/components/upload/index.d.ts +18 -18
- package/lib/components/verify-code/useImageVerify.cjs +1 -1
- package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/hooks/use-popper/index.d.ts +3 -3
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/lib/utils/form-register.cjs +1 -1
- package/lib/utils/form-register.d.ts +28 -28
- package/package.json +5 -5
- package/tags.json +1 -1
- package/theme-style/base.css +1 -1
- package/theme-style/dark/css-vars.css +1 -1
- package/theme-style/index.css +2 -2
- package/theme-style/src/common/var.scss +7 -7
- package/theme-style/src/dark/css-vars.scss +7 -1
- package/theme-style/src/icon.scss +1 -0
- package/theme-style/src/md-container.scss +1 -1
- package/theme-style/src/message.scss +8 -14
- package/theme-style/src/mixins/_var.scss +9 -0
- package/theme-style/src/var.scss +2 -1
- package/theme-style/vft-date-picker.css +1 -1
- package/theme-style/vft-icon.css +1 -1
- package/theme-style/vft-input.css +1 -1
- package/theme-style/vft-md-container.css +1 -1
- package/theme-style/vft-message.css +1 -1
- package/theme-style/vft-time-picker.css +1 -1
- package/theme-style/vft-time-select.css +1 -1
- package/theme-style/vft-var.css +1 -1
- package/web-types.json +1 -1
|
@@ -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">;
|
|
@@ -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">;
|
|
@@ -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">;
|
|
@@ -194,9 +194,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
194
194
|
})> & {
|
|
195
195
|
FormItem: {
|
|
196
196
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
197
|
-
size: {
|
|
198
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
199
|
-
};
|
|
200
197
|
label: {
|
|
201
198
|
type: import("vue").PropType<string>;
|
|
202
199
|
};
|
|
@@ -206,6 +203,9 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
206
203
|
prop: {
|
|
207
204
|
type: import("vue").PropType<string | string[]>;
|
|
208
205
|
};
|
|
206
|
+
size: {
|
|
207
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
208
|
+
};
|
|
209
209
|
required: {
|
|
210
210
|
type: import("vue").PropType<boolean>;
|
|
211
211
|
default: undefined;
|
|
@@ -214,7 +214,7 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
214
214
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
215
215
|
};
|
|
216
216
|
labelPosition: {
|
|
217
|
-
type: import("vue").PropType<"
|
|
217
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
218
218
|
};
|
|
219
219
|
labelWidth: {
|
|
220
220
|
type: import("vue").PropType<string | number>;
|
|
@@ -266,9 +266,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
266
266
|
M: {};
|
|
267
267
|
Defaults: {};
|
|
268
268
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
269
|
-
size: {
|
|
270
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
271
|
-
};
|
|
272
269
|
label: {
|
|
273
270
|
type: import("vue").PropType<string>;
|
|
274
271
|
};
|
|
@@ -278,6 +275,9 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
278
275
|
prop: {
|
|
279
276
|
type: import("vue").PropType<string | string[]>;
|
|
280
277
|
};
|
|
278
|
+
size: {
|
|
279
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
280
|
+
};
|
|
281
281
|
required: {
|
|
282
282
|
type: import("vue").PropType<boolean>;
|
|
283
283
|
default: undefined;
|
|
@@ -286,7 +286,7 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
286
286
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
287
287
|
};
|
|
288
288
|
labelPosition: {
|
|
289
|
-
type: import("vue").PropType<"
|
|
289
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
290
290
|
};
|
|
291
291
|
labelWidth: {
|
|
292
292
|
type: import("vue").PropType<string | number>;
|
|
@@ -333,9 +333,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
333
333
|
__isTeleport?: never;
|
|
334
334
|
__isSuspense?: never;
|
|
335
335
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
336
|
-
size: {
|
|
337
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
338
|
-
};
|
|
339
336
|
label: {
|
|
340
337
|
type: import("vue").PropType<string>;
|
|
341
338
|
};
|
|
@@ -345,6 +342,9 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
345
342
|
prop: {
|
|
346
343
|
type: import("vue").PropType<string | string[]>;
|
|
347
344
|
};
|
|
345
|
+
size: {
|
|
346
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
347
|
+
};
|
|
348
348
|
required: {
|
|
349
349
|
type: import("vue").PropType<boolean>;
|
|
350
350
|
default: undefined;
|
|
@@ -353,7 +353,7 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
353
353
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
354
354
|
};
|
|
355
355
|
labelPosition: {
|
|
356
|
-
type: import("vue").PropType<"
|
|
356
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
357
357
|
};
|
|
358
358
|
labelWidth: {
|
|
359
359
|
type: import("vue").PropType<string | number>;
|
|
@@ -411,9 +411,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
|
|
|
411
411
|
};
|
|
412
412
|
export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
413
413
|
new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("vue").ExtractPropTypes<{
|
|
414
|
-
size: {
|
|
415
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
416
|
-
};
|
|
417
414
|
label: {
|
|
418
415
|
type: import("vue").PropType<string>;
|
|
419
416
|
};
|
|
@@ -423,6 +420,9 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
423
420
|
prop: {
|
|
424
421
|
type: import("vue").PropType<string | string[]>;
|
|
425
422
|
};
|
|
423
|
+
size: {
|
|
424
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
425
|
+
};
|
|
426
426
|
required: {
|
|
427
427
|
type: import("vue").PropType<boolean>;
|
|
428
428
|
default: undefined;
|
|
@@ -431,7 +431,7 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
431
431
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
432
432
|
};
|
|
433
433
|
labelPosition: {
|
|
434
|
-
type: import("vue").PropType<"
|
|
434
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
435
435
|
};
|
|
436
436
|
labelWidth: {
|
|
437
437
|
type: import("vue").PropType<string | number>;
|
|
@@ -483,9 +483,6 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
483
483
|
M: {};
|
|
484
484
|
Defaults: {};
|
|
485
485
|
}, Readonly<import("vue").ExtractPropTypes<{
|
|
486
|
-
size: {
|
|
487
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
488
|
-
};
|
|
489
486
|
label: {
|
|
490
487
|
type: import("vue").PropType<string>;
|
|
491
488
|
};
|
|
@@ -495,6 +492,9 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
495
492
|
prop: {
|
|
496
493
|
type: import("vue").PropType<string | string[]>;
|
|
497
494
|
};
|
|
495
|
+
size: {
|
|
496
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
497
|
+
};
|
|
498
498
|
required: {
|
|
499
499
|
type: import("vue").PropType<boolean>;
|
|
500
500
|
default: undefined;
|
|
@@ -503,7 +503,7 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
503
503
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
504
504
|
};
|
|
505
505
|
labelPosition: {
|
|
506
|
-
type: import("vue").PropType<"
|
|
506
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
507
507
|
};
|
|
508
508
|
labelWidth: {
|
|
509
509
|
type: import("vue").PropType<string | number>;
|
|
@@ -550,9 +550,6 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
550
550
|
__isTeleport?: never;
|
|
551
551
|
__isSuspense?: never;
|
|
552
552
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
553
|
-
size: {
|
|
554
|
-
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
555
|
-
};
|
|
556
553
|
label: {
|
|
557
554
|
type: import("vue").PropType<string>;
|
|
558
555
|
};
|
|
@@ -562,6 +559,9 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
562
559
|
prop: {
|
|
563
560
|
type: import("vue").PropType<string | string[]>;
|
|
564
561
|
};
|
|
562
|
+
size: {
|
|
563
|
+
type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
|
|
564
|
+
};
|
|
565
565
|
required: {
|
|
566
566
|
type: import("vue").PropType<boolean>;
|
|
567
567
|
default: undefined;
|
|
@@ -570,7 +570,7 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
|
|
|
570
570
|
type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
|
|
571
571
|
};
|
|
572
572
|
labelPosition: {
|
|
573
|
-
type: import("vue").PropType<"
|
|
573
|
+
type: import("vue").PropType<"left" | "right" | "top">;
|
|
574
574
|
};
|
|
575
575
|
labelWidth: {
|
|
576
576
|
type: import("vue").PropType<string | number>;
|
|
@@ -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>;
|
|
@@ -77,10 +77,10 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
77
77
|
type: import("vue").PropType<string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null>;
|
|
78
78
|
};
|
|
79
79
|
}>> & Readonly<{
|
|
80
|
-
onInput?: ((value: string) => any) | undefined;
|
|
81
|
-
onClear?: (() => any) | undefined;
|
|
82
80
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
83
81
|
onChange?: ((value: string) => any) | undefined;
|
|
82
|
+
onInput?: ((value: string) => any) | undefined;
|
|
83
|
+
onClear?: (() => any) | undefined;
|
|
84
84
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
85
85
|
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
86
86
|
onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
|
|
@@ -107,10 +107,10 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
107
107
|
clear: () => void;
|
|
108
108
|
resizeTextarea: () => void;
|
|
109
109
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
110
|
-
input: (value: string) => void;
|
|
111
|
-
clear: () => void;
|
|
112
110
|
"update:modelValue": (value: string) => void;
|
|
113
111
|
change: (value: string) => void;
|
|
112
|
+
input: (value: string) => void;
|
|
113
|
+
clear: () => void;
|
|
114
114
|
blur: (evt: FocusEvent) => void;
|
|
115
115
|
compositionend: (evt: CompositionEvent) => void;
|
|
116
116
|
compositionstart: (evt: CompositionEvent) => void;
|
|
@@ -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>;
|
|
@@ -206,10 +206,10 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
206
206
|
type: import("vue").PropType<string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null>;
|
|
207
207
|
};
|
|
208
208
|
}>> & Readonly<{
|
|
209
|
-
onInput?: ((value: string) => any) | undefined;
|
|
210
|
-
onClear?: (() => any) | undefined;
|
|
211
209
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
212
210
|
onChange?: ((value: string) => any) | undefined;
|
|
211
|
+
onInput?: ((value: string) => any) | undefined;
|
|
212
|
+
onClear?: (() => any) | undefined;
|
|
213
213
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
214
214
|
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
215
215
|
onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
|
|
@@ -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>;
|
|
@@ -316,10 +316,10 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
316
316
|
type: import("vue").PropType<string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null>;
|
|
317
317
|
};
|
|
318
318
|
}>> & Readonly<{
|
|
319
|
-
onInput?: ((value: string) => any) | undefined;
|
|
320
|
-
onClear?: (() => any) | undefined;
|
|
321
319
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
322
320
|
onChange?: ((value: string) => any) | undefined;
|
|
321
|
+
onInput?: ((value: string) => any) | undefined;
|
|
322
|
+
onClear?: (() => any) | undefined;
|
|
323
323
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
324
324
|
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
325
325
|
onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
|
|
@@ -346,10 +346,10 @@ export declare const VftInput: import("vft/es/utils").SFCWithInstall<{
|
|
|
346
346
|
clear: () => void;
|
|
347
347
|
resizeTextarea: () => void;
|
|
348
348
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
349
|
-
input: (value: string) => void;
|
|
350
|
-
clear: () => void;
|
|
351
349
|
"update:modelValue": (value: string) => void;
|
|
352
350
|
change: (value: string) => void;
|
|
351
|
+
input: (value: string) => void;
|
|
352
|
+
clear: () => void;
|
|
353
353
|
blur: (evt: FocusEvent) => void;
|
|
354
354
|
compositionend: (evt: CompositionEvent) => void;
|
|
355
355
|
compositionstart: (evt: CompositionEvent) => void;
|
|
@@ -60,10 +60,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
60
60
|
/** @description resize textarea. */
|
|
61
61
|
resizeTextarea: () => void;
|
|
62
62
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
63
|
-
input: (value: string) => void;
|
|
64
|
-
clear: () => void;
|
|
65
63
|
"update:modelValue": (value: string) => void;
|
|
66
64
|
change: (value: string) => void;
|
|
65
|
+
input: (value: string) => void;
|
|
66
|
+
clear: () => void;
|
|
67
67
|
blur: (evt: FocusEvent) => void;
|
|
68
68
|
compositionend: (evt: CompositionEvent) => void;
|
|
69
69
|
compositionstart: (evt: CompositionEvent) => void;
|
|
@@ -76,10 +76,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
76
76
|
prefixClick: (value: any) => void;
|
|
77
77
|
enter: () => void;
|
|
78
78
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<InputProps>>> & Readonly<{
|
|
79
|
-
onInput?: ((value: string) => any) | undefined;
|
|
80
|
-
onClear?: (() => any) | undefined;
|
|
81
79
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
82
80
|
onChange?: ((value: string) => any) | undefined;
|
|
81
|
+
onInput?: ((value: string) => any) | undefined;
|
|
82
|
+
onClear?: (() => any) | undefined;
|
|
83
83
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
84
84
|
onCompositionend?: ((evt: CompositionEvent) => any) | undefined;
|
|
85
85
|
onCompositionstart?: ((evt: CompositionEvent) => any) | undefined;
|
|
@@ -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>;
|
|
@@ -56,9 +56,9 @@ export declare const VftInputNumber: import("vft/es/utils").SFCWithInstall<impor
|
|
|
56
56
|
focus: () => void;
|
|
57
57
|
blur: () => void;
|
|
58
58
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
59
|
-
input: (val: number | null | undefined) => void;
|
|
60
59
|
"update:modelValue": (val: number | undefined) => void;
|
|
61
60
|
change: (cur: number | undefined, prev: number | undefined) => void;
|
|
61
|
+
input: (val: number | null | undefined) => void;
|
|
62
62
|
blur: (e: FocusEvent) => void;
|
|
63
63
|
focus: (e: FocusEvent) => void;
|
|
64
64
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -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>;
|
|
@@ -114,9 +114,9 @@ export declare const VftInputNumber: import("vft/es/utils").SFCWithInstall<impor
|
|
|
114
114
|
type: import("vue").PropType<boolean>;
|
|
115
115
|
};
|
|
116
116
|
}>> & Readonly<{
|
|
117
|
-
onInput?: ((val: number | null | undefined) => any) | undefined;
|
|
118
117
|
"onUpdate:modelValue"?: ((val: number | undefined) => any) | undefined;
|
|
119
118
|
onChange?: ((cur: number | undefined, prev: number | undefined) => any) | undefined;
|
|
119
|
+
onInput?: ((val: number | null | undefined) => any) | undefined;
|
|
120
120
|
onBlur?: ((e: FocusEvent) => any) | undefined;
|
|
121
121
|
onFocus?: ((e: FocusEvent) => any) | undefined;
|
|
122
122
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
|
|
@@ -74,15 +74,15 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
74
74
|
/** @description remove focus the input component */
|
|
75
75
|
blur: () => void;
|
|
76
76
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
77
|
-
input: (val: number | null | undefined) => void;
|
|
78
77
|
"update:modelValue": (val: number | undefined) => void;
|
|
79
78
|
change: (cur: number | undefined, prev: number | undefined) => void;
|
|
79
|
+
input: (val: number | null | undefined) => void;
|
|
80
80
|
blur: (e: FocusEvent) => void;
|
|
81
81
|
focus: (e: FocusEvent) => void;
|
|
82
82
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<InputNumberProps>>> & Readonly<{
|
|
83
|
-
onInput?: ((val: number | null | undefined) => any) | undefined;
|
|
84
83
|
"onUpdate:modelValue"?: ((val: number | undefined) => any) | undefined;
|
|
85
84
|
onChange?: ((cur: number | undefined, prev: number | undefined) => any) | undefined;
|
|
85
|
+
onInput?: ((val: number | null | undefined) => any) | undefined;
|
|
86
86
|
onBlur?: ((e: FocusEvent) => any) | undefined;
|
|
87
87
|
onFocus?: ((e: FocusEvent) => any) | undefined;
|
|
88
88
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -19,7 +19,7 @@ export declare const inputTagProps: {
|
|
|
19
19
|
readonly draggable: BooleanConstructor;
|
|
20
20
|
readonly delimiter: import("vft/es/utils").EpPropFinalized<readonly [StringConstructor, RegExpConstructor], unknown, unknown, "", boolean>;
|
|
21
21
|
readonly size: {
|
|
22
|
-
readonly type: PropType<import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => "" | "
|
|
22
|
+
readonly type: PropType<import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => "" | "default" | "small" | "large") | (() => ComponentSize) | (((new (...args: any[]) => "" | "default" | "small" | "large") | (() => ComponentSize)) | null)[], unknown, unknown>>;
|
|
23
23
|
readonly required: false;
|
|
24
24
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
25
25
|
__epPropKey: true;
|
|
@@ -25,7 +25,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
25
25
|
readonly draggable: BooleanConstructor;
|
|
26
26
|
readonly delimiter: import("vft/es/utils").EpPropFinalized<readonly [StringConstructor, RegExpConstructor], unknown, unknown, "", boolean>;
|
|
27
27
|
readonly size: {
|
|
28
|
-
readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => "" | "
|
|
28
|
+
readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => "" | "default" | "small" | "large") | (() => import("vft/es/constants").ComponentSize) | (((new (...args: any[]) => "" | "default" | "small" | "large") | (() => import("vft/es/constants").ComponentSize)) | null)[], unknown, unknown>>;
|
|
29
29
|
readonly required: false;
|
|
30
30
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
31
31
|
__epPropKey: true;
|
|
@@ -57,10 +57,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
57
57
|
focus: () => void;
|
|
58
58
|
blur: () => void;
|
|
59
59
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
60
|
-
input: (value: string) => void;
|
|
61
|
-
clear: () => void;
|
|
62
60
|
"update:modelValue": (value?: string[] | undefined) => void;
|
|
63
61
|
change: (value?: string[] | undefined) => void;
|
|
62
|
+
input: (value: string) => void;
|
|
63
|
+
clear: () => void;
|
|
64
64
|
blur: (evt: FocusEvent) => void;
|
|
65
65
|
focus: (evt: FocusEvent) => void;
|
|
66
66
|
"remove-tag": (value: string) => void;
|
|
@@ -84,7 +84,7 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
84
84
|
readonly draggable: BooleanConstructor;
|
|
85
85
|
readonly delimiter: import("vft/es/utils").EpPropFinalized<readonly [StringConstructor, RegExpConstructor], unknown, unknown, "", boolean>;
|
|
86
86
|
readonly size: {
|
|
87
|
-
readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => "" | "
|
|
87
|
+
readonly type: import("vue").PropType<import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => "" | "default" | "small" | "large") | (() => import("vft/es/constants").ComponentSize) | (((new (...args: any[]) => "" | "default" | "small" | "large") | (() => import("vft/es/constants").ComponentSize)) | null)[], unknown, unknown>>;
|
|
88
88
|
readonly required: false;
|
|
89
89
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
90
90
|
__epPropKey: true;
|
|
@@ -113,23 +113,23 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
|
|
|
113
113
|
readonly saveOnBlur: import("vft/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
114
114
|
readonly ariaLabel: StringConstructor;
|
|
115
115
|
}>> & Readonly<{
|
|
116
|
-
onInput?: ((value: string) => any) | undefined;
|
|
117
|
-
onClear?: (() => any) | undefined;
|
|
118
116
|
"onUpdate:modelValue"?: ((value?: string[] | undefined) => any) | undefined;
|
|
119
117
|
onChange?: ((value?: string[] | undefined) => any) | undefined;
|
|
118
|
+
onInput?: ((value: string) => any) | undefined;
|
|
119
|
+
onClear?: (() => any) | undefined;
|
|
120
120
|
onBlur?: ((evt: FocusEvent) => any) | undefined;
|
|
121
121
|
onFocus?: ((evt: FocusEvent) => any) | undefined;
|
|
122
122
|
"onRemove-tag"?: ((value: string) => any) | undefined;
|
|
123
123
|
"onAdd-tag"?: ((value: string | string[]) => any) | undefined;
|
|
124
124
|
}>, {
|
|
125
|
-
readonly autocomplete: string;
|
|
126
|
-
readonly disabled: import("vft/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
127
125
|
readonly draggable: boolean;
|
|
128
126
|
readonly id: string;
|
|
129
127
|
readonly autofocus: boolean;
|
|
128
|
+
readonly autocomplete: string;
|
|
129
|
+
readonly disabled: import("vft/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
130
130
|
readonly tabindex: import("vft/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>;
|
|
131
|
-
readonly readonly: boolean;
|
|
132
131
|
readonly trigger: import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => "Enter" | "Space") | (() => "Enter" | "Space") | (((new (...args: any[]) => "Enter" | "Space") | (() => "Enter" | "Space")) | null)[], unknown, unknown>;
|
|
132
|
+
readonly readonly: boolean;
|
|
133
133
|
readonly validateEvent: import("vft/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
134
134
|
readonly clearable: boolean;
|
|
135
135
|
readonly tagType: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../icon/index.cjs"),E=require("../icon-text/index.cjs"),N=require("../md-comment/index.cjs"),S=require("../side-menu/index.cjs"),b=require("../tag/index.cjs");require("@vueuse/core");const s=require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");const _=require("../../utils/ns-cover.cjs"),T=require("lodash-es");require("../form/index.cjs");const D=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const $=require("@vft/router"),B=require("@vft/use"),L=require("@vft/use/photoswipe"),g=require("@vft/utils/date"),M=require("./use/useCopyCode.cjs"),w=require("./utils.cjs"),z={class:"info-container"},
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),p=require("../icon/index.cjs"),E=require("../icon-text/index.cjs"),N=require("../md-comment/index.cjs"),S=require("../side-menu/index.cjs"),b=require("../tag/index.cjs");require("@vueuse/core");const s=require("@vft/utils");require("../config-provider/hooks/use-global-config.cjs");const _=require("../../utils/ns-cover.cjs"),T=require("lodash-es");require("../form/index.cjs");const D=require("../../hooks/use-namespace/index.cjs");require("../../hooks/use-model-toggle/index.cjs");require("@popperjs/core");require("../../hooks/use-z-index/index.cjs");const $=require("@vft/router"),B=require("@vft/use"),L=require("@vft/use/photoswipe"),g=require("@vft/utils/date"),M=require("./use/useCopyCode.cjs"),w=require("./utils.cjs"),z={class:"info-container"},R={key:0,class:"left"},P={class:"infos"},I={class:"reading",title:"阅读量"},A=["data-path"],j=e.defineComponent({name:"vft-md-container"}),O=e.defineComponent({...j,props:{tocList:{},scrollDom:{default:".layout-content"}},setup(i){const l=D.useNamespace("md-container"),v=e.getCurrentInstance(),a=e.ref(),c=e.computed(()=>i.tocList&&i.tocList!=="undefined"?JSON.parse(i.tocList):""),{initPhotoSwipe:y}=L.usePhotoSwipe(`.${l.e("content")} img`);y(),M.useCopyCode();const u=v.appContext.config.globalProperties.$router,r=u.currentRoute.value,h=_.primaryColor(),C=s.isClient?location.pathname:"",{go:q}=$.useRouterHelper(u);function k(n){q(`/?classify=${n}`)}const x=e.computed(()=>r.meta.category?.includes("api")),d=T.debounce(()=>s.handleScrollPosition({scrollDom:".layout-content",contentDom:".header-anchor",selectAttrName:"href",offset:130,callback:n=>{a.value?.menuRef&&(a.value.menuRef.activeIndex=n.slice(1))}}),100),m=n=>{s.jumpElement(`#${n.index}`,i.scrollDom,120)},f=()=>{const n=document.querySelector(i.scrollDom);n&&n.removeEventListener("scroll",d)};return e.onMounted(()=>{e.nextTick(()=>{setTimeout(()=>{s.jumpElement(encodeURI(r.hash))}),setTimeout(()=>{const t=document.querySelector(".layout-content");t&&t.addEventListener("scroll",d)},1500);const n=document.querySelectorAll(".item.expand"),o=document.querySelectorAll("div.language-vue");for(let t=0;t<n.length;t++)B.useEventListener(n[t],"click",()=>{o[t].offsetHeight===0?(o[t].style.height="auto",o[t].style.visibility="visible"):(o[t].style.height="0px",o[t].style.visibility="hidden")})})}),e.onDeactivated(()=>{f()}),e.onBeforeMount(()=>{f()}),(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l).b(),e.unref(l).is("api",x.value)])},[c.value?.length?(e.openBlock(),e.createBlock(e.unref(S.VftSideMenu),{key:0,ref_key:"sideMenuRef",ref:a,"default-active":c.value[0].slug,class:"toc-side-menu",menus:c.value,"is-fixed-left":!1,"default-openeds-level":"","unique-opened":!1,"disable-sub-menu-action":"","attr-mapping":{index:"slug"},onSelect:m,onSubMenuClick:m},null,8,["default-active","menus"])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("header"))},[e.createElementVNode("h1",{class:e.normalizeClass(e.unref(l).e("title"))},e.toDisplayString(e.unref(r).meta?.title),3),e.createElementVNode("div",z,[e.unref(r).meta?.category?.length?(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(e.unref(p.VftIcon),{size:14,color:e.unref(h),icon:"icon-category"},null,8,["color"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).meta?.category,(t,V)=>(e.openBlock(),e.createBlock(e.unref(b.VftTag),{size:"small",class:"tag",type:e.unref(s.getRandomElementForArr)(e.unref(w.COMP_TYPE),1)[0],key:V,onClick:F=>k(t)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t),1)]),_:2},1032,["type","onClick"]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",P,[e.createVNode(e.unref(E.VftIconText),{title:"发布时间",icon:"icon-date",size:12,class:"mr-10px",distance:5,text:e.unref(g.formatToDateTime)((e.unref(r).meta?.date?new Date(e.unref(r).meta.date).getTime():new Date().getTime())-e.unref(g.getDayTimestamp)())},null,8,["text"]),e.createElementVNode("div",I,[e.createVNode(e.unref(p.VftIcon),{icon:"icon-reading",size:14,class:"mr-5px"}),e.createElementVNode("div",{class:"waline-pageview-count lh-1","data-path":e.unref(C)},"0",8,A)])])])],2),e.createElementVNode("div",{class:e.normalizeClass(e.unref(l).e("content"))},[e.renderSlot(n.$slots,"default")],2),e.createVNode(e.unref(N.VftMdComment)),o[0]||(o[0]=e.createElementVNode("ins",{class:"adsbygoogle",style:{display:"block","text-align":"center"},"data-ad-layout":"in-article","data-ad-format":"fluid","data-ad-client":"ca-pub-4046301015031382","data-ad-slot":"6525439078"},null,-1))],2))}});exports.default=O;
|
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { MessageType } from './types';
|
|
3
|
-
export interface MessageProps {
|
|
4
|
-
customClass?: string;
|
|
5
|
-
center?: boolean;
|
|
6
|
-
dangerouslyUseHTMLString?: boolean;
|
|
7
|
-
duration: number;
|
|
8
|
-
icon?: string;
|
|
9
|
-
id: string;
|
|
10
|
-
message?: string | VNode | (() => VNode);
|
|
11
|
-
onClose?: Function;
|
|
12
|
-
showClose?: boolean;
|
|
13
|
-
type: MessageType;
|
|
14
|
-
offset: number;
|
|
15
|
-
zIndex?: number;
|
|
16
|
-
grouping?: boolean;
|
|
17
|
-
repeatNum?: number;
|
|
18
|
-
}
|
|
1
|
+
import type { MessageProps } from './types';
|
|
19
2
|
declare function close(): void;
|
|
20
3
|
declare function __VLS_template(): {
|
|
21
4
|
default?(_: {}): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../icon/index.cjs"),x=require("@vft/constants"),I=require("@vft/use"),y=require("@vft/utils"),p=require("@vueuse/core");require("../config-provider/index.cjs");const C=require("./instance.cjs"),L=require("../config-provider/hooks/use-global-config.cjs"),E=["id"],N=["innerHTML"],V=e.defineComponent({__name:"message",props:{customClass:{},center:{type:Boolean},dangerouslyUseHTMLString:{type:Boolean},duration:{},icon:{},closeIcon:{},id:{},message:{type:[String,Object,Function]},onClose:{type:Function},showClose:{type:Boolean},type:{},offset:{},zIndex:{},grouping:{type:Boolean},repeatNum:{}},emits:["destroy"],setup(n,{expose:k}){const o=n,{ns:t,zIndex:B}=L.useGlobalComponentSettings("message"),{currentZIndex:b,nextZIndex:h}=B,i=e.ref(),c=e.ref(!1),a=e.ref(0);let u;const w=new Map([["success",{icon:"icon-success-filled"}],["error",{icon:"icon-circle-close-filled"}],["warning",{icon:"icon-warning-filled"}]]),f=e.computed(()=>y.singleAttrToObj(o.icon,"icon",{icon:w.get(o.type)?.icon})),T=e.computed(()=>y.singleAttrToObj(o.icon,"icon",{icon:"icon-close"})),M=e.computed(()=>{const s=o.type;return{[t.bm("icon",s)]:s}}),S=e.computed(()=>C.getLastOffset(o.id)),d=e.computed(()=>C.getOffsetOrSpace(o.id,o.offset)+S.value),z=e.computed(()=>a.value+d.value),O=e.computed(()=>({top:`${d.value}px`,zIndex:b.value}));function r(){o.duration!==0&&({stop:u}=p.useTimeoutFn(()=>{l()},o.duration))}function m(){u?.()}function l(){c.value=!1}function q({code:s}){s===x.EVENT_CODE.esc&&l()}return e.onMounted(()=>{r(),h(),c.value=!0}),e.watch(()=>o.repeatNum,()=>{m(),r()}),I.useEventListener(document,"keydown",q),p.useResizeObserver(i,()=>{a.value=i.value.getBoundingClientRect().height}),k({visible:c,bottom:z,close:l}),(s,g)=>(e.openBlock(),e.createBlock(e.Transition,{name:e.unref(t).b("fade"),onBeforeLeave:n.onClose,onAfterLeave:g[0]||(g[0]=R=>s.$emit("destroy"))},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{id:n.id,ref_key:"messageRef",ref:i,class:e.normalizeClass([e.unref(t).b(),{[e.unref(t).m(n.type)]:n.type&&!n.icon},e.unref(t).is("center",n.center),e.unref(t).is("closable",n.showClose),n.customClass]),style:e.normalizeStyle(O.value),role:"alert",onMouseenter:m,onMouseleave:r},[f.value?.icon?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(t).e("icon"),M.value])},[e.createVNode(e.unref(v.VftIcon),e.normalizeProps(e.guardReactiveProps(f.value)),null,16)],2)):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"default",{},()=>[n.dangerouslyUseHTMLString?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass(e.unref(t).e("content")),innerHTML:n.message},null,10,N)):(e.openBlock(),e.createElementBlock("p",{key:0,class:e.normalizeClass(e.unref(t).e("content"))},e.toDisplayString(n.message),3))]),n.showClose?(e.openBlock(),e.createBlock(e.unref(v.VftIcon),e.mergeProps({key:1,class:e.unref(t).e("closeBtn")},T.value,{onClick:e.withModifiers(l,["stop"])}),null,16,["class"])):e.createCommentVNode("",!0)],46,E),[[e.vShow,c.value]])]),_:3},8,["name","onBeforeLeave"]))}});exports.default=V;
|
|
@@ -45,20 +45,36 @@ export declare const messageDefaults: {
|
|
|
45
45
|
appendTo: HTMLElement;
|
|
46
46
|
};
|
|
47
47
|
export interface MessageProps {
|
|
48
|
+
/** 自定义类名 */
|
|
48
49
|
customClass?: string;
|
|
50
|
+
/** 是否居中布局 */
|
|
49
51
|
center?: boolean;
|
|
52
|
+
/** 是否将 message 属性作为 HTML 片段处理 */
|
|
50
53
|
dangerouslyUseHTMLString?: boolean;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
/** 显示时间,单位毫秒。设为 0 则不会自动关闭 */
|
|
55
|
+
duration: number;
|
|
56
|
+
/** 自定义图标,该属性会覆盖 type 的图标 */
|
|
57
|
+
icon?: any;
|
|
58
|
+
/** 自定义关闭图标 */
|
|
59
|
+
closeIcon?: any;
|
|
60
|
+
/** 消息的唯一标识 */
|
|
61
|
+
id: string;
|
|
62
|
+
/** 消息文字 */
|
|
54
63
|
message?: string | VNode | (() => VNode);
|
|
55
|
-
|
|
64
|
+
/** 关闭时的回调函数 */
|
|
65
|
+
onClose?: () => void;
|
|
66
|
+
/** 是否显示关闭按钮 */
|
|
56
67
|
showClose?: boolean;
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
/** 消息类型 */
|
|
69
|
+
type: MessageType;
|
|
70
|
+
/** 消息距离窗口顶部的偏移量 */
|
|
71
|
+
offset: number;
|
|
72
|
+
/** 消息的层级 */
|
|
59
73
|
zIndex?: number;
|
|
74
|
+
/** 合并内容相同的消息,不支持 VNode 类型的消息 */
|
|
60
75
|
grouping?: boolean;
|
|
61
|
-
|
|
76
|
+
/** 重复次数,类似于 Badge。当和 grouping 属性一起使用时作为初始数量使用 */
|
|
77
|
+
repeatNum?: number;
|
|
62
78
|
}
|
|
63
79
|
export type MessageOptions = Partial<Omit<MessageProps, 'id'> & {
|
|
64
80
|
appendTo?: HTMLElement | string;
|