vft 0.0.383 → 0.0.385

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.
Files changed (40) hide show
  1. package/es/components/button/index.d.ts +9 -9
  2. package/es/components/carousel/use-carousel.js +1 -1
  3. package/es/components/config-provider/config-provider.vue.d.ts +1 -1
  4. package/es/components/form/form-item.vue.d.ts +1 -1
  5. package/es/components/form/index.d.ts +30 -30
  6. package/es/components/input/input.vue2.js +4 -4
  7. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  8. package/es/components/message/method.js +61 -58
  9. package/es/components/message/types.d.ts +22 -0
  10. package/es/components/popconfirm/index.d.ts +15 -15
  11. package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
  12. package/es/components/super-form/super-form-item.vue2.js +1 -1
  13. package/es/components/super-form/use/helper.js +1 -1
  14. package/es/components/upload/index.d.ts +6 -0
  15. package/es/components/upload/upload-content.vue.d.ts +3 -0
  16. package/es/components/upload/upload-content.vue2.js +1 -1
  17. package/es/components/upload/upload.vue.d.ts +3 -0
  18. package/es/components/upload/upload.vue2.js +18 -18
  19. package/es/package.json.d.ts +1 -1
  20. package/es/package.json.js +1 -1
  21. package/es/utils/vue/vnode.js +1 -1
  22. package/lib/components/button/index.d.ts +9 -9
  23. package/lib/components/config-provider/config-provider.vue.d.ts +1 -1
  24. package/lib/components/form/form-item.vue.d.ts +1 -1
  25. package/lib/components/form/index.d.ts +30 -30
  26. package/lib/components/input/input.vue2.cjs +1 -1
  27. package/lib/components/message/method.cjs +1 -1
  28. package/lib/components/message/types.d.ts +22 -0
  29. package/lib/components/popconfirm/index.d.ts +15 -15
  30. package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
  31. package/lib/components/upload/index.d.ts +6 -0
  32. package/lib/components/upload/upload-content.vue.d.ts +3 -0
  33. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  34. package/lib/components/upload/upload.vue.d.ts +3 -0
  35. package/lib/components/upload/upload.vue2.cjs +1 -1
  36. package/lib/package.json.cjs +1 -1
  37. package/lib/package.json.d.ts +1 -1
  38. package/package.json +4 -4
  39. package/web-types.json +1 -1
  40. package/theme-style/vft-p-image.css +0 -1
@@ -24,12 +24,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
24
24
  size: {
25
25
  type: import("vue").PropType<import("../types").ComponentSize>;
26
26
  };
27
- dark: {
28
- type: import("vue").PropType<boolean>;
29
- };
30
27
  icon: {
31
28
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
32
29
  };
30
+ dark: {
31
+ type: import("vue").PropType<boolean>;
32
+ };
33
33
  loading: {
34
34
  type: import("vue").PropType<boolean>;
35
35
  };
@@ -114,12 +114,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
114
114
  size: {
115
115
  type: import("vue").PropType<import("../types").ComponentSize>;
116
116
  };
117
- dark: {
118
- type: import("vue").PropType<boolean>;
119
- };
120
117
  icon: {
121
118
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
122
119
  };
120
+ dark: {
121
+ type: import("vue").PropType<boolean>;
122
+ };
123
123
  loading: {
124
124
  type: import("vue").PropType<boolean>;
125
125
  };
@@ -199,12 +199,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
199
199
  size: {
200
200
  type: import("vue").PropType<import("../types").ComponentSize>;
201
201
  };
202
- dark: {
203
- type: import("vue").PropType<boolean>;
204
- };
205
202
  icon: {
206
203
  type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
207
204
  };
205
+ dark: {
206
+ type: import("vue").PropType<boolean>;
207
+ };
208
208
  loading: {
209
209
  type: import("vue").PropType<boolean>;
210
210
  };
@@ -10,7 +10,7 @@ import "../../hooks/use-model-toggle/index.js";
10
10
  import { useOrderedChildren as Ie } from "../../hooks/use-ordered-children/index.js";
11
11
  import "@popperjs/core";
12
12
  import "../../hooks/use-z-index/index.js";
13
- import { carouselContextKey as ge, CAROUSEL_ITEM_NAME as H } from "./constants.js";
13
+ import { CAROUSEL_ITEM_NAME as H, carouselContextKey as ge } from "./constants.js";
14
14
  const L = 300, _e = (t, O, M) => {
15
15
  const {
16
16
  children: o,
@@ -16,7 +16,7 @@ export interface ConfigProviderProps {
16
16
  namespace?: string;
17
17
  /** 设置所有弹窗类组件的 z-index */
18
18
  zIndex?: number;
19
- /** 可同时显示的消息最大数量 */
19
+ /** Message 组件全局配置 */
20
20
  message?: MessageConfigContext;
21
21
  projectCfg?: Record<string, any>;
22
22
  button?: ButtonConfigContext;
@@ -32,10 +32,10 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
32
32
  }>>> & Readonly<{
33
33
  "onUpdate:error"?: ((val: string) => any) | undefined;
34
34
  }>, {
35
+ required: boolean;
35
36
  labelWidth: string | number;
36
37
  inlineMessage: string | boolean;
37
38
  showMessage: boolean;
38
- required: boolean;
39
39
  hideLabel: boolean;
40
40
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
41
41
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
@@ -206,6 +206,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
206
206
  size: {
207
207
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
208
208
  };
209
+ required: {
210
+ type: import("vue").PropType<boolean>;
211
+ default: undefined;
212
+ };
209
213
  rules: {
210
214
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
211
215
  };
@@ -227,10 +231,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
227
231
  hideRequiredAsterisk: {
228
232
  type: import("vue").PropType<boolean>;
229
233
  };
230
- required: {
231
- type: import("vue").PropType<boolean>;
232
- default: undefined;
233
- };
234
234
  for: {
235
235
  type: import("vue").PropType<string>;
236
236
  };
@@ -253,10 +253,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
253
253
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
254
254
  "update:error": (val: string) => void;
255
255
  }, import("vue").PublicProps, {
256
+ required: boolean;
256
257
  labelWidth: string | number;
257
258
  inlineMessage: string | boolean;
258
259
  showMessage: boolean;
259
- required: boolean;
260
260
  hideLabel: boolean;
261
261
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
262
262
  P: {};
@@ -278,6 +278,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
278
278
  size: {
279
279
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
280
280
  };
281
+ required: {
282
+ type: import("vue").PropType<boolean>;
283
+ default: undefined;
284
+ };
281
285
  rules: {
282
286
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
283
287
  };
@@ -299,10 +303,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
299
303
  hideRequiredAsterisk: {
300
304
  type: import("vue").PropType<boolean>;
301
305
  };
302
- required: {
303
- type: import("vue").PropType<boolean>;
304
- default: undefined;
305
- };
306
306
  for: {
307
307
  type: import("vue").PropType<string>;
308
308
  };
@@ -323,10 +323,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
323
323
  clearValidate: () => void;
324
324
  resetField: () => void;
325
325
  }, {}, {}, {}, {
326
+ required: boolean;
326
327
  labelWidth: string | number;
327
328
  inlineMessage: string | boolean;
328
329
  showMessage: boolean;
329
- required: boolean;
330
330
  hideLabel: boolean;
331
331
  }>;
332
332
  __isFragment?: never;
@@ -345,6 +345,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
345
345
  size: {
346
346
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
347
347
  };
348
+ required: {
349
+ type: import("vue").PropType<boolean>;
350
+ default: undefined;
351
+ };
348
352
  rules: {
349
353
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
350
354
  };
@@ -366,10 +370,6 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
366
370
  hideRequiredAsterisk: {
367
371
  type: import("vue").PropType<boolean>;
368
372
  };
369
- required: {
370
- type: import("vue").PropType<boolean>;
371
- default: undefined;
372
- };
373
373
  for: {
374
374
  type: import("vue").PropType<string>;
375
375
  };
@@ -392,10 +392,10 @@ export declare const VftForm: import("vft/es/utils").SFCWithInstall<{
392
392
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
393
393
  "update:error": (val: string) => void;
394
394
  }, string, {
395
+ required: boolean;
395
396
  labelWidth: string | number;
396
397
  inlineMessage: string | boolean;
397
398
  showMessage: boolean;
398
- required: boolean;
399
399
  hideLabel: boolean;
400
400
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
401
401
  $slots: {
@@ -423,6 +423,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
423
423
  size: {
424
424
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
425
425
  };
426
+ required: {
427
+ type: import("vue").PropType<boolean>;
428
+ default: undefined;
429
+ };
426
430
  rules: {
427
431
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
428
432
  };
@@ -444,10 +448,6 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
444
448
  hideRequiredAsterisk: {
445
449
  type: import("vue").PropType<boolean>;
446
450
  };
447
- required: {
448
- type: import("vue").PropType<boolean>;
449
- default: undefined;
450
- };
451
451
  for: {
452
452
  type: import("vue").PropType<string>;
453
453
  };
@@ -470,10 +470,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
470
470
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
471
471
  "update:error": (val: string) => void;
472
472
  }, import("vue").PublicProps, {
473
+ required: boolean;
473
474
  labelWidth: string | number;
474
475
  inlineMessage: string | boolean;
475
476
  showMessage: boolean;
476
- required: boolean;
477
477
  hideLabel: boolean;
478
478
  }, true, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
479
479
  P: {};
@@ -495,6 +495,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
495
495
  size: {
496
496
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
497
497
  };
498
+ required: {
499
+ type: import("vue").PropType<boolean>;
500
+ default: undefined;
501
+ };
498
502
  rules: {
499
503
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
500
504
  };
@@ -516,10 +520,6 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
516
520
  hideRequiredAsterisk: {
517
521
  type: import("vue").PropType<boolean>;
518
522
  };
519
- required: {
520
- type: import("vue").PropType<boolean>;
521
- default: undefined;
522
- };
523
523
  for: {
524
524
  type: import("vue").PropType<string>;
525
525
  };
@@ -540,10 +540,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
540
540
  clearValidate: () => void;
541
541
  resetField: () => void;
542
542
  }, {}, {}, {}, {
543
+ required: boolean;
543
544
  labelWidth: string | number;
544
545
  inlineMessage: string | boolean;
545
546
  showMessage: boolean;
546
- required: boolean;
547
547
  hideLabel: boolean;
548
548
  }>;
549
549
  __isFragment?: never;
@@ -562,6 +562,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
562
562
  size: {
563
563
  type: import("vue").PropType<import("vft/es/constants").ComponentSize>;
564
564
  };
565
+ required: {
566
+ type: import("vue").PropType<boolean>;
567
+ default: undefined;
568
+ };
565
569
  rules: {
566
570
  type: import("vue").PropType<import("vft/es/utils").Arrayable<import("./types").FormItemRule>>;
567
571
  };
@@ -583,10 +587,6 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
583
587
  hideRequiredAsterisk: {
584
588
  type: import("vue").PropType<boolean>;
585
589
  };
586
- required: {
587
- type: import("vue").PropType<boolean>;
588
- default: undefined;
589
- };
590
590
  for: {
591
591
  type: import("vue").PropType<string>;
592
592
  };
@@ -609,10 +609,10 @@ export declare const VftFormItem: import("vft/es/utils").SFCWithInstall<{
609
609
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
610
610
  "update:error": (val: string) => void;
611
611
  }, string, {
612
+ required: boolean;
612
613
  labelWidth: string | number;
613
614
  inlineMessage: string | boolean;
614
615
  showMessage: boolean;
615
- required: boolean;
616
616
  hideLabel: boolean;
617
617
  }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
618
618
  $slots: {
@@ -13,8 +13,8 @@ import "../../hooks/use-z-index/index.js";
13
13
  import { UPDATE_MODEL_EVENT as Q } from "@vft/constants";
14
14
  import { useAttrs as Ze, useCursor as _e } from "@vft/use";
15
15
  import { calcTextareaHeight as ye } from "./utils.js";
16
- import { useFormItem as et, useFormItemInputId as tt } from "../form/hooks/use-form-item.js";
17
- import { useFormSize as at, useFormDisabled as ot } from "../form/hooks/use-form-common-props.js";
16
+ import { useFormSize as et, useFormDisabled as tt } from "../form/hooks/use-form-common-props.js";
17
+ import { useFormItem as at, useFormItemInputId as ot } from "../form/hooks/use-form-item.js";
18
18
  const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form"], st = ["id", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form"], It = /* @__PURE__ */ Oe({
19
19
  __name: "input",
20
20
  props: {
@@ -85,9 +85,9 @@ const nt = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
85
85
  o.is("focus", v.value)
86
86
  ]), d = Ze({
87
87
  excludeKeys: l(() => Object.keys(X.value))
88
- }), { form: Ce, formItem: F } = et(), { inputId: Y } = tt(xe.props, {
88
+ }), { form: Ce, formItem: F } = at(), { inputId: Y } = ot(xe.props, {
89
89
  formItemContext: F
90
- }), ke = at(), h = ot(), o = pe("input"), Z = pe("textarea"), M = H(), b = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || b.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
90
+ }), ke = et(), h = tt(), o = pe("input"), Z = pe("textarea"), M = H(), b = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || b.value), T = l(() => G(e.prefixIcon, "icon", { size: 16 })), ee = l(() => G(e.suffixIcon, "icon", { size: 16 })), Ie = l(() => G(e.clearIcon, "icon", {
91
91
  icon: "icon-circle-close",
92
92
  size: 16
93
93
  })), te = l(() => Ce?.statusIcon ?? !1), I = l(() => F?.validateState || ""), ae = l(
@@ -1,6 +1,6 @@
1
1
  import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
2
2
  import { EVENT_CODE as g } from "../../../constants/aria.js";
3
- import { CHANGE_EVENT as i, UPDATE_MODEL_EVENT as d, INPUT_EVENT as H } from "../../../constants/event.js";
3
+ import { CHANGE_EVENT as i, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
4
4
  import "@vueuse/core";
5
5
  import { isUndefined as K } from "@vft/utils";
6
6
  import { debugWarn as C } from "../../../utils/error.js";
@@ -1,100 +1,103 @@
1
- import { isNumber as T, isString as f, isFunction as a, isElement as v } from "@vft/utils";
2
- import { isVNode as h, createVNode as C, render as u } from "vue";
1
+ import { isNumber as T, isString as u, isFunction as m, isElement as v } from "@vft/utils";
2
+ import { isVNode as h, createVNode as C, render as g } from "vue";
3
3
  import "../config-provider/index.js";
4
4
  import { isClient as b } from "@vueuse/core";
5
5
  import { debugWarn as y } from "../../utils/error.js";
6
6
  import "../config-provider/hooks/use-global-config.js";
7
7
  import "lodash-es";
8
- import { instances as t } from "./instance.js";
8
+ import { instances as r } from "./instance.js";
9
9
  import E from "./message.vue2.js";
10
10
  import { messageDefaults as _, messageTypes as z } from "./types.js";
11
- import { messageConfig as g } from "../config-provider/constants.js";
12
- let M = 1;
11
+ import { messageConfig as p } from "../config-provider/constants.js";
12
+ let D = 1;
13
13
  const x = (e) => {
14
- const n = !e || f(e) || h(e) || a(e) ? { message: e } : e, o = {
15
- ..._,
16
- ...n
14
+ const o = !e || u(e) || h(e) || m(e) ? { message: e } : e, n = {
15
+ ...{
16
+ ..._,
17
+ ...p
18
+ },
19
+ ...o
17
20
  };
18
- if (!o.appendTo)
19
- o.appendTo = document.body;
20
- else if (f(o.appendTo)) {
21
- let s = document.querySelector(o.appendTo);
22
- v(s) || (y(
21
+ if (!n.appendTo)
22
+ n.appendTo = document.body;
23
+ else if (u(n.appendTo)) {
24
+ let t = document.querySelector(n.appendTo);
25
+ v(t) || (y(
23
26
  "VftMessage",
24
27
  "the appendTo option is not an HTMLElement. Falling back to document.body."
25
- ), s = document.body), o.appendTo = s;
28
+ ), t = document.body), n.appendTo = t;
26
29
  }
27
- return o;
28
- }, N = (e) => {
29
- const n = t.indexOf(e);
30
- if (n === -1) return;
31
- t.splice(n, 1);
32
- const { handler: o } = e;
33
- o.close();
34
- }, O = ({ appendTo: e, ...n }, o) => {
35
- const s = `message_${M++}`, r = n.onClose, c = document.createElement("div"), i = {
36
- ...n,
37
- id: s,
30
+ return n;
31
+ }, M = (e) => {
32
+ const o = r.indexOf(e);
33
+ if (o === -1) return;
34
+ r.splice(o, 1);
35
+ const { handler: s } = e;
36
+ s.close();
37
+ }, N = ({ appendTo: e, ...o }, s) => {
38
+ const n = `message_${D++}`, t = o.onClose, l = document.createElement("div"), i = {
39
+ ...o,
40
+ id: n,
38
41
  onClose: () => {
39
- r?.(), N(d);
42
+ t?.(), M(f);
40
43
  },
41
44
  // 清除 message element 防止内存泄漏
42
45
  onDestroy: () => {
43
- u(null, c);
46
+ g(null, l);
44
47
  }
45
- }, l = C(
48
+ }, c = C(
46
49
  E,
47
50
  i,
48
- a(i.message) || h(i.message) ? {
49
- default: a(i.message) ? i.message : () => i.message
51
+ m(i.message) || h(i.message) ? {
52
+ default: m(i.message) ? i.message : () => i.message
50
53
  } : null
51
54
  );
52
- l.appContext = o || p._context, u(l, c), e.appendChild(c.firstElementChild);
53
- const m = l.component, d = {
54
- id: s,
55
- vnode: l,
56
- vm: m,
55
+ c.appContext = s || a._context, g(c, l), e.appendChild(l.firstElementChild);
56
+ const d = c.component, f = {
57
+ id: n,
58
+ vnode: c,
59
+ vm: d,
57
60
  handler: {
58
61
  // instead of calling the onClose function directly,
59
62
  // setting this value so that we can have the full lifecycle
60
63
  // for out component, so that all closing steps will not be skipped.
61
64
  close: () => {
62
- m.exposed.visible.value = !1;
65
+ d.exposed.visible.value = !1;
63
66
  }
64
67
  },
65
- props: l.component.props
68
+ props: c.component.props
66
69
  };
67
- return d;
68
- }, p = (e = {}, n) => {
70
+ return f;
71
+ }, a = (e = {}, o) => {
69
72
  if (!b) return { close: () => {
70
73
  } };
71
- if (T(g.max) && t.length >= g.max)
74
+ if (T(p.max) && r.length >= p.max)
72
75
  return { close: () => {
73
76
  } };
74
- const o = x(e);
75
- if (o.grouping && t.length) {
76
- const r = t.find(
77
- ({ vnode: c }) => c.props?.message === o.message
77
+ const s = x(e);
78
+ if (s.grouping && r.length) {
79
+ const t = r.find(
80
+ ({ vnode: l }) => l.props?.message === s.message
78
81
  );
79
- if (r)
80
- return r.props.repeatNum += 1, r.props.type = o.type, r.handler;
82
+ if (t)
83
+ return t.props.repeatNum += 1, t.props.type = s.type, t.handler;
81
84
  }
82
- const s = O(o, n);
83
- return t.push(s), s.handler;
85
+ const n = N(s, o);
86
+ return r.push(n), n.handler;
84
87
  };
85
88
  z.forEach((e) => {
86
- p[e] = (n = {}, o) => {
87
- const s = x(n);
88
- return p({ ...s, type: e }, o);
89
+ a[e] = (o = {}, s) => {
90
+ const n = x(o);
91
+ return a({ ...n, type: e }, s);
89
92
  };
90
93
  });
91
- function V(e) {
92
- for (const n of t)
93
- (!e || e === n.props.type) && n.handler.close();
94
+ function O(e) {
95
+ for (const o of r)
96
+ (!e || e === o.props.type) && o.handler.close();
94
97
  }
95
- p.closeAll = V;
96
- p._context = null;
98
+ a.closeAll = O;
99
+ a._context = null;
97
100
  export {
98
- V as closeAll,
99
- p as default
101
+ O as closeAll,
102
+ a as default
100
103
  };
@@ -4,6 +4,28 @@ export type MessageType = 'success' | 'warning' | 'info' | 'error';
4
4
  export interface MessageConfigContext {
5
5
  /** 可同时显示的消息最大数量 */
6
6
  max?: number;
7
+ /** 默认自定义类名 */
8
+ customClass?: string;
9
+ /** 默认是否居中布局 */
10
+ center?: boolean;
11
+ /** 默认是否允许 HTML 字符串 */
12
+ dangerouslyUseHTMLString?: boolean;
13
+ /** 默认显示时间,单位毫秒。设为 0 则不会自动关闭 */
14
+ duration?: number;
15
+ /** 默认图标 */
16
+ icon?: string;
17
+ /** 默认是否显示关闭按钮 */
18
+ showClose?: boolean;
19
+ /** 默认消息类型 */
20
+ type?: MessageType;
21
+ /** 默认偏移量 */
22
+ offset?: number;
23
+ /** 默认层级 */
24
+ zIndex?: number;
25
+ /** 默认是否开启分组 */
26
+ grouping?: boolean;
27
+ /** 默认追加到的元素 */
28
+ appendTo?: HTMLElement | string;
7
29
  }
8
30
  export declare const messageDefaults: {
9
31
  customClass: string;
@@ -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;
@@ -1,4 +1,4 @@
1
- import { defineComponent as Q, computed as v, ref as re, unref as c, useSlots as oe, createVNode as s, mergeProps as L, withDirectives as ie, vShow as ne, createTextVNode as G, isVNode as le, resolveComponent as V } from "vue";
1
+ import { defineComponent as Q, computed as v, ref as re, unref as c, useSlots as oe, createVNode as s, mergeProps as L, withDirectives as ie, vShow as ne, isVNode as le, createTextVNode as G, resolveComponent as V } from "vue";
2
2
  import "../alert/index.js";
3
3
  import "../avatar/index.js";
4
4
  import "../avatar-stack/index.js";
@@ -1,5 +1,5 @@
1
1
  import { isNumber as n } from "@vft/utils";
2
- import { isInput as u, FormCompEnum as e } from "../component-map.js";
2
+ import { FormCompEnum as e, isInput as u } from "../component-map.js";
3
3
  function T(r, E = "") {
4
4
  return E = (E || "").replace(":", "") || "", [
5
5
  e.INPUT,
@@ -56,6 +56,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
56
56
  };
57
57
  fileList: {
58
58
  type: import("vue").PropType<import("./types").UploadUserFile[]>;
59
+ default: never[];
59
60
  };
60
61
  withCredentials: {
61
62
  type: import("vue").PropType<boolean>;
@@ -175,6 +176,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
175
176
  sizeHeight: number;
176
177
  action: string;
177
178
  accept: string;
179
+ fileList: import("./types").UploadUserFile[];
178
180
  showFileList: boolean;
179
181
  autoUpload: boolean;
180
182
  listType: import("./types").ListType;
@@ -247,6 +249,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
247
249
  };
248
250
  fileList: {
249
251
  type: import("vue").PropType<import("./types").UploadUserFile[]>;
252
+ default: never[];
250
253
  };
251
254
  withCredentials: {
252
255
  type: import("vue").PropType<boolean>;
@@ -366,6 +369,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
366
369
  sizeHeight: number;
367
370
  action: string;
368
371
  accept: string;
372
+ fileList: import("./types").UploadUserFile[];
369
373
  showFileList: boolean;
370
374
  autoUpload: boolean;
371
375
  listType: import("./types").ListType;
@@ -435,6 +439,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
435
439
  };
436
440
  fileList: {
437
441
  type: import("vue").PropType<import("./types").UploadUserFile[]>;
442
+ default: never[];
438
443
  };
439
444
  withCredentials: {
440
445
  type: import("vue").PropType<boolean>;
@@ -554,6 +559,7 @@ export declare const VftUpload: import("vft/es/utils").SFCWithInstall<{
554
559
  sizeHeight: number;
555
560
  action: string;
556
561
  accept: string;
562
+ fileList: import("./types").UploadUserFile[];
557
563
  showFileList: boolean;
558
564
  autoUpload: boolean;
559
565
  listType: import("./types").ListType;