vft 0.0.485 → 0.0.487

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 (45) hide show
  1. package/attributes.json +1 -1
  2. package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
  3. package/es/components/autocomplete/index.d.ts +6 -6
  4. package/es/components/button/index.d.ts +9 -9
  5. package/es/components/carousel/use-carousel.js +1 -1
  6. package/es/components/config-provider/hooks/use-global-config.js +3 -3
  7. package/es/components/input/input.vue2.js +4 -4
  8. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  9. package/es/components/modal/index.d.ts +72 -3
  10. package/es/components/modal/modal.vue.d.ts +27 -3
  11. package/es/components/modal/modal.vue2.js +58 -57
  12. package/es/components/modal/types.d.ts +2 -0
  13. package/es/components/popconfirm/index.d.ts +15 -15
  14. package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
  15. package/es/components/router-view-content/index.d.ts +6 -0
  16. package/es/components/router-view-content/router-view-content.vue.d.ts +1 -0
  17. package/es/components/router-view-content/router-view-content.vue2.js +19 -18
  18. package/es/components/select/index.d.ts +4 -4
  19. package/es/components/select/select.vue.d.ts +4 -4
  20. package/es/components/select/useSelect.d.ts +4 -4
  21. package/es/components/super-form/super-form-item.vue2.js +1 -1
  22. package/es/package.json.d.ts +1 -1
  23. package/es/package.json.js +1 -1
  24. package/es/utils/vue/vnode.js +1 -1
  25. package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
  26. package/lib/components/autocomplete/index.d.ts +6 -6
  27. package/lib/components/button/index.d.ts +9 -9
  28. package/lib/components/input/input.vue2.cjs +1 -1
  29. package/lib/components/modal/index.d.ts +72 -3
  30. package/lib/components/modal/modal.vue.d.ts +27 -3
  31. package/lib/components/modal/modal.vue2.cjs +1 -1
  32. package/lib/components/modal/types.d.ts +2 -0
  33. package/lib/components/popconfirm/index.d.ts +15 -15
  34. package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
  35. package/lib/components/router-view-content/index.d.ts +6 -0
  36. package/lib/components/router-view-content/router-view-content.vue.d.ts +1 -0
  37. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  38. package/lib/components/select/index.d.ts +4 -4
  39. package/lib/components/select/select.vue.d.ts +4 -4
  40. package/lib/components/select/useSelect.d.ts +4 -4
  41. package/lib/package.json.cjs +1 -1
  42. package/lib/package.json.d.ts +1 -1
  43. package/package.json +5 -5
  44. package/tags.json +1 -1
  45. package/web-types.json +1 -1
@@ -62,9 +62,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
62
62
  readonly placement?: import("@popperjs/core").Placement | undefined;
63
63
  readonly strategy?: "fixed" | "absolute" | undefined;
64
64
  readonly effect?: "light" | "dark" | undefined;
65
- readonly visible?: boolean | null | undefined;
66
65
  readonly teleported?: boolean | undefined;
67
66
  readonly open?: boolean | undefined;
67
+ readonly visible?: boolean | null | undefined;
68
68
  readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
69
69
  readonly arrowOffset?: number | undefined;
70
70
  readonly gpuAcceleration?: boolean | undefined;
@@ -480,9 +480,9 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
480
480
  readonly placement?: import("@popperjs/core").Placement | undefined;
481
481
  readonly strategy?: "fixed" | "absolute" | undefined;
482
482
  readonly effect?: "light" | "dark" | undefined;
483
- readonly visible?: boolean | null | undefined;
484
483
  readonly teleported?: boolean | undefined;
485
484
  readonly open?: boolean | undefined;
485
+ readonly visible?: boolean | null | undefined;
486
486
  readonly trigger?: import("vft/es/components/tooltip").TooltipTriggerType | undefined;
487
487
  readonly arrowOffset?: number | undefined;
488
488
  readonly gpuAcceleration?: boolean | undefined;
@@ -85,9 +85,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
85
85
  readonly placement?: import("@popperjs/core").Placement | undefined;
86
86
  readonly strategy?: "fixed" | "absolute" | undefined;
87
87
  readonly effect?: "light" | "dark" | undefined;
88
- readonly visible?: boolean | null | undefined;
89
88
  readonly teleported?: boolean | undefined;
90
89
  readonly open?: boolean | undefined;
90
+ readonly visible?: boolean | null | undefined;
91
91
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
92
92
  readonly arrowOffset?: number | undefined;
93
93
  readonly gpuAcceleration?: boolean | undefined;
@@ -503,9 +503,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
503
503
  readonly placement?: import("@popperjs/core").Placement | undefined;
504
504
  readonly strategy?: "fixed" | "absolute" | undefined;
505
505
  readonly effect?: "light" | "dark" | undefined;
506
- readonly visible?: boolean | null | undefined;
507
506
  readonly teleported?: boolean | undefined;
508
507
  readonly open?: boolean | undefined;
508
+ readonly visible?: boolean | null | undefined;
509
509
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
510
510
  readonly arrowOffset?: number | undefined;
511
511
  readonly gpuAcceleration?: boolean | undefined;
@@ -1006,9 +1006,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
1006
1006
  readonly placement?: import("@popperjs/core").Placement | undefined;
1007
1007
  readonly strategy?: "fixed" | "absolute" | undefined;
1008
1008
  readonly effect?: "light" | "dark" | undefined;
1009
- readonly visible?: boolean | null | undefined;
1010
1009
  readonly teleported?: boolean | undefined;
1011
1010
  readonly open?: boolean | undefined;
1011
+ readonly visible?: boolean | null | undefined;
1012
1012
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
1013
1013
  readonly arrowOffset?: number | undefined;
1014
1014
  readonly gpuAcceleration?: boolean | undefined;
@@ -1424,9 +1424,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
1424
1424
  readonly placement?: import("@popperjs/core").Placement | undefined;
1425
1425
  readonly strategy?: "fixed" | "absolute" | undefined;
1426
1426
  readonly effect?: "light" | "dark" | undefined;
1427
- readonly visible?: boolean | null | undefined;
1428
1427
  readonly teleported?: boolean | undefined;
1429
1428
  readonly open?: boolean | undefined;
1429
+ readonly visible?: boolean | null | undefined;
1430
1430
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
1431
1431
  readonly arrowOffset?: number | undefined;
1432
1432
  readonly gpuAcceleration?: boolean | undefined;
@@ -1916,9 +1916,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
1916
1916
  readonly placement?: import("@popperjs/core").Placement | undefined;
1917
1917
  readonly strategy?: "fixed" | "absolute" | undefined;
1918
1918
  readonly effect?: "light" | "dark" | undefined;
1919
- readonly visible?: boolean | null | undefined;
1920
1919
  readonly teleported?: boolean | undefined;
1921
1920
  readonly open?: boolean | undefined;
1921
+ readonly visible?: boolean | null | undefined;
1922
1922
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
1923
1923
  readonly arrowOffset?: number | undefined;
1924
1924
  readonly gpuAcceleration?: boolean | undefined;
@@ -2334,9 +2334,9 @@ export declare const VftAutocomplete: import("vft/es/utils").SFCWithInstall<{
2334
2334
  readonly placement?: import("@popperjs/core").Placement | undefined;
2335
2335
  readonly strategy?: "fixed" | "absolute" | undefined;
2336
2336
  readonly effect?: "light" | "dark" | undefined;
2337
- readonly visible?: boolean | null | undefined;
2338
2337
  readonly teleported?: boolean | undefined;
2339
2338
  readonly open?: boolean | undefined;
2339
+ readonly visible?: boolean | null | undefined;
2340
2340
  readonly trigger?: import("vft/es/vft").TooltipTriggerType | undefined;
2341
2341
  readonly arrowOffset?: number | undefined;
2342
2342
  readonly gpuAcceleration?: boolean | undefined;
@@ -24,12 +24,12 @@ export declare const VftButton: import("vft/es/utils").SFCWithInstall<{
24
24
  autofocus: {
25
25
  type: import("vue").PropType<boolean>;
26
26
  };
27
- icon: {
28
- type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
29
- };
30
27
  dark: {
31
28
  type: import("vue").PropType<boolean>;
32
29
  };
30
+ icon: {
31
+ type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
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
  autofocus: {
115
115
  type: import("vue").PropType<boolean>;
116
116
  };
117
- icon: {
118
- type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
119
- };
120
117
  dark: {
121
118
  type: import("vue").PropType<boolean>;
122
119
  };
120
+ icon: {
121
+ type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
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
  autofocus: {
200
200
  type: import("vue").PropType<boolean>;
201
201
  };
202
- icon: {
203
- type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
204
- };
205
202
  dark: {
206
203
  type: import("vue").PropType<boolean>;
207
204
  };
205
+ icon: {
206
+ type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
207
+ };
208
208
  loading: {
209
209
  type: import("vue").PropType<boolean>;
210
210
  };
@@ -11,7 +11,7 @@ import "../../hooks/use-model-toggle/index.js";
11
11
  import { useOrderedChildren as ge } from "../../hooks/use-ordered-children/index.js";
12
12
  import "@popperjs/core";
13
13
  import "../../hooks/use-z-index/index.js";
14
- import { CAROUSEL_ITEM_NAME as H, carouselContextKey as Se } from "./constants.js";
14
+ import { carouselContextKey as Se, CAROUSEL_ITEM_NAME as H } from "./constants.js";
15
15
  const L = 300, ze = (t, O, M) => {
16
16
  const {
17
17
  children: o,
@@ -1,7 +1,7 @@
1
1
  import { keysOf as f } from "@vft/utils";
2
2
  import "@vueuse/core";
3
3
  import { debugWarn as v } from "../../../utils/error.js";
4
- import { ref as g, getCurrentInstance as l, computed as i, unref as p, provide as C, inject as x } from "vue";
4
+ import { getCurrentInstance as l, computed as i, unref as p, provide as g, ref as C, inject as x } from "vue";
5
5
  import "lodash-es";
6
6
  import "../../form/index.js";
7
7
  import { namespaceContextKey as I, useNamespace as b, defaultNamespace as y } from "../../../hooks/use-namespace/index.js";
@@ -9,7 +9,7 @@ import "../../../hooks/use-model-toggle/index.js";
9
9
  import "@popperjs/core";
10
10
  import { zIndexContextKey as G, useZIndex as z, defaultInitialZIndex as K } from "../../../hooks/use-z-index/index.js";
11
11
  import { configProviderContextKey as m } from "../constants.js";
12
- const a = g();
12
+ const a = C();
13
13
  function d(o, e = void 0) {
14
14
  const n = l() ? x(m, a) : a;
15
15
  return o ? i(() => n?.value?.[o] ?? e) : n;
@@ -27,7 +27,7 @@ function B(o) {
27
27
  };
28
28
  }
29
29
  const S = (o, e, n = !1) => {
30
- const t = !!l(), r = t ? d() : void 0, u = e?.provide ?? (t ? C : void 0);
30
+ const t = !!l(), r = t ? d() : void 0, u = e?.provide ?? (t ? g : void 0);
31
31
  if (!u) {
32
32
  v(
33
33
  "provideGlobalConfig",
@@ -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 he } from "./utils.js";
16
- import { useFormSize as et, useFormDisabled as tt } from "../form/hooks/use-form-common-props.js";
17
- import { useFormItem as at, useFormItemInputId as nt } from "../form/hooks/use-form-item.js";
16
+ import { useFormItem as et, useFormItemInputId as tt } from "../form/hooks/use-form-item.js";
17
+ import { useFormSize as at, useFormDisabled as nt } from "../form/hooks/use-form-common-props.js";
18
18
  const ot = ["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 ot = ["role"], lt = ["id", "type", "disabled", "formatter", "parser", "rea
85
85
  n.is("focus", v.value)
86
86
  ]), d = Ze({
87
87
  excludeKeys: l(() => Object.keys(X.value))
88
- }), { form: Ce, formItem: F } = at(), { inputId: Y } = nt(we.props, {
88
+ }), { form: Ce, formItem: F } = et(), { inputId: Y } = tt(we.props, {
89
89
  formItemContext: F
90
- }), ke = et(), x = tt(), n = ye("input"), Z = ye("textarea"), M = H(), p = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || p.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 = at(), x = nt(), n = ye("input"), Z = ye("textarea"), M = H(), p = H(), v = S(!1), N = S(!1), C = S(!1), K = S(!1), _ = S(), O = H(e.inputStyle), k = l(() => M.value || p.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, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
3
+ import { CHANGE_EVENT as i, UPDATE_MODEL_EVENT as d, INPUT_EVENT as H } 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";
@@ -32,6 +32,9 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
32
32
  type: import("vue").PropType<boolean>;
33
33
  default: boolean;
34
34
  };
35
+ scrollTop: {
36
+ type: import("vue").PropType<boolean>;
37
+ };
35
38
  modelValue: {
36
39
  type: import("vue").PropType<boolean>;
37
40
  default: boolean;
@@ -138,7 +141,31 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
138
141
  confirmLoading: {
139
142
  type: import("vue").PropType<boolean>;
140
143
  };
141
- }>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
144
+ }>> & Readonly<{
145
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
146
+ onClose?: ((event?: Event | undefined) => any) | undefined;
147
+ onSubmit?: (() => any) | undefined;
148
+ onOpen?: (() => any) | undefined;
149
+ onOpened?: (() => any) | undefined;
150
+ "onVisible-change"?: ((value: boolean) => any) | undefined;
151
+ onClosed?: (() => any) | undefined;
152
+ onOpenAutoFocus?: (() => any) | undefined;
153
+ onCloseAutoFocus?: (() => any) | undefined;
154
+ onRegister?: ((methods: import("./types").ModalMethods, uid: number) => any) | undefined;
155
+ onOk?: (() => any) | undefined;
156
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
157
+ "visible-change": (value: boolean) => void;
158
+ close: (event?: Event | undefined) => void;
159
+ ok: () => void;
160
+ register: (methods: import("./types").ModalMethods, uid: number) => void;
161
+ "update:modelValue": (value: boolean) => void;
162
+ submit: () => void;
163
+ open: () => void;
164
+ opened: () => void;
165
+ closed: () => void;
166
+ openAutoFocus: () => void;
167
+ closeAutoFocus: () => void;
168
+ }, import("vue").PublicProps, {
142
169
  title: string;
143
170
  center: boolean;
144
171
  fullscreen: boolean;
@@ -198,6 +225,9 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
198
225
  type: import("vue").PropType<boolean>;
199
226
  default: boolean;
200
227
  };
228
+ scrollTop: {
229
+ type: import("vue").PropType<boolean>;
230
+ };
201
231
  modelValue: {
202
232
  type: import("vue").PropType<boolean>;
203
233
  default: boolean;
@@ -304,7 +334,19 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
304
334
  confirmLoading: {
305
335
  type: import("vue").PropType<boolean>;
306
336
  };
307
- }>> & Readonly<{}>, {}, {}, {}, {}, {
337
+ }>> & Readonly<{
338
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
339
+ onClose?: ((event?: Event | undefined) => any) | undefined;
340
+ onSubmit?: (() => any) | undefined;
341
+ onOpen?: (() => any) | undefined;
342
+ onOpened?: (() => any) | undefined;
343
+ "onVisible-change"?: ((value: boolean) => any) | undefined;
344
+ onClosed?: (() => any) | undefined;
345
+ onOpenAutoFocus?: (() => any) | undefined;
346
+ onCloseAutoFocus?: (() => any) | undefined;
347
+ onRegister?: ((methods: import("./types").ModalMethods, uid: number) => any) | undefined;
348
+ onOk?: (() => any) | undefined;
349
+ }>, {}, {}, {}, {}, {
308
350
  title: string;
309
351
  center: boolean;
310
352
  fullscreen: boolean;
@@ -361,6 +403,9 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
361
403
  type: import("vue").PropType<boolean>;
362
404
  default: boolean;
363
405
  };
406
+ scrollTop: {
407
+ type: import("vue").PropType<boolean>;
408
+ };
364
409
  modelValue: {
365
410
  type: import("vue").PropType<boolean>;
366
411
  default: boolean;
@@ -467,7 +512,31 @@ export declare const VftModal: import("vft/es/utils").SFCWithInstall<{
467
512
  confirmLoading: {
468
513
  type: import("vue").PropType<boolean>;
469
514
  };
470
- }>> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
515
+ }>> & Readonly<{
516
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
517
+ onClose?: ((event?: Event | undefined) => any) | undefined;
518
+ onSubmit?: (() => any) | undefined;
519
+ onOpen?: (() => any) | undefined;
520
+ onOpened?: (() => any) | undefined;
521
+ "onVisible-change"?: ((value: boolean) => any) | undefined;
522
+ onClosed?: (() => any) | undefined;
523
+ onOpenAutoFocus?: (() => any) | undefined;
524
+ onCloseAutoFocus?: (() => any) | undefined;
525
+ onRegister?: ((methods: import("./types").ModalMethods, uid: number) => any) | undefined;
526
+ onOk?: (() => any) | undefined;
527
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
528
+ "visible-change": (value: boolean) => void;
529
+ close: (event?: Event | undefined) => void;
530
+ ok: () => void;
531
+ register: (methods: import("./types").ModalMethods, uid: number) => void;
532
+ "update:modelValue": (value: boolean) => void;
533
+ submit: () => void;
534
+ open: () => void;
535
+ opened: () => void;
536
+ closed: () => void;
537
+ openAutoFocus: () => void;
538
+ closeAutoFocus: () => void;
539
+ }, string, {
471
540
  title: string;
472
541
  center: boolean;
473
542
  fullscreen: boolean;
@@ -1,4 +1,4 @@
1
- import type { ModalActionProps, ModalProps } from './types';
1
+ import type { ModalActionProps, ModalMethods, ModalProps } from './types';
2
2
  declare function __VLS_template(): {
3
3
  default?(_: {}): any;
4
4
  };
@@ -23,7 +23,19 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
23
23
  showActionButtonGroup: boolean;
24
24
  showSubmitButton: boolean;
25
25
  showCancelButton: boolean;
26
- }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ModalProps & ModalActionProps>, {
26
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
+ "visible-change": (value: boolean) => void;
28
+ close: (event?: Event | undefined) => void;
29
+ ok: () => void;
30
+ register: (methods: ModalMethods, uid: number) => void;
31
+ "update:modelValue": (value: boolean) => void;
32
+ submit: () => void;
33
+ open: () => void;
34
+ opened: () => void;
35
+ closed: () => void;
36
+ openAutoFocus: () => void;
37
+ closeAutoFocus: () => void;
38
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ModalProps & ModalActionProps>, {
27
39
  center: boolean;
28
40
  customClass: string;
29
41
  draggable: boolean;
@@ -44,7 +56,19 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
44
56
  showActionButtonGroup: boolean;
45
57
  showSubmitButton: boolean;
46
58
  showCancelButton: boolean;
47
- }>>> & Readonly<{}>, {
59
+ }>>> & Readonly<{
60
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
61
+ onClose?: ((event?: Event | undefined) => any) | undefined;
62
+ onSubmit?: (() => any) | undefined;
63
+ onOpen?: (() => any) | undefined;
64
+ onOpened?: (() => any) | undefined;
65
+ "onVisible-change"?: ((value: boolean) => any) | undefined;
66
+ onClosed?: (() => any) | undefined;
67
+ onOpenAutoFocus?: (() => any) | undefined;
68
+ onCloseAutoFocus?: (() => any) | undefined;
69
+ onRegister?: ((methods: ModalMethods, uid: number) => any) | undefined;
70
+ onOk?: (() => any) | undefined;
71
+ }>, {
48
72
  title: string;
49
73
  center: boolean;
50
74
  fullscreen: boolean;
@@ -1,14 +1,15 @@
1
- import { defineComponent as O, useAttrs as M, ref as r, getCurrentInstance as F, computed as i, unref as t, watchEffect as P, watch as R, nextTick as d, createBlock as B, openBlock as b, mergeProps as S, createSlots as T, withCtx as y, renderSlot as A, createCommentVNode as x } from "vue";
1
+ import { defineComponent as k, useAttrs as A, ref as f, getCurrentInstance as $, computed as r, unref as l, watchEffect as M, watch as P, nextTick as m, createBlock as b, openBlock as y, mergeProps as T, createSlots as R, withCtx as C, renderSlot as S, createCommentVNode as x } from "vue";
2
2
  import { deepMerge as D, isFunction as G } from "@vft/utils";
3
3
  import { VftDialog as I } from "../dialog/index.js";
4
- import $ from "./modal-footer-action.vue2.js";
5
- const N = /* @__PURE__ */ O({
4
+ import E from "./modal-footer-action.vue2.js";
5
+ const W = /* @__PURE__ */ k({
6
6
  __name: "modal",
7
7
  props: {
8
8
  closeFunc: {},
9
9
  showActionButtonGroup: { type: Boolean, default: !1 },
10
10
  confirmLoading: { type: Boolean },
11
11
  loading: { type: Boolean },
12
+ scrollTop: { type: Boolean },
12
13
  appendToBody: { type: Boolean, default: !1 },
13
14
  appendTo: {},
14
15
  beforeClose: {},
@@ -45,81 +46,81 @@ const N = /* @__PURE__ */ O({
45
46
  cancelButtonOptions: {},
46
47
  actionRowOptions: {}
47
48
  },
48
- emits: {
49
- "visible-change": [],
50
- close: [],
51
- ok: [],
52
- register: [],
53
- "update:modelValue": [],
54
- submit: []
55
- },
56
- setup(n, { emit: h }) {
57
- const o = n, a = h, C = M(), c = r(null), l = r(!1), s = r(null), f = {
58
- setModalProps: V,
49
+ emits: ["visible-change", "close", "ok", "register", "update:modelValue", "submit", "open", "opened", "closed", "openAutoFocus", "closeAutoFocus"],
50
+ setup(a, { emit: g }) {
51
+ const n = a, t = g, w = A(), d = f(null), s = f(!1), u = f(null), p = {
52
+ setModalProps: O,
59
53
  emitVisible: void 0,
60
54
  redoModalHeight: () => {
61
- d(() => {
62
- t(s) && t(s).setModalHeight();
55
+ m(() => {
56
+ l(u) && l(u).setModalHeight();
63
57
  });
64
58
  }
65
- }, u = F();
66
- u && a("register", f, u.uid);
67
- const g = i(() => ({
68
- ...o,
69
- ...t(c)
70
- })), w = i(() => ({
71
- ...C,
72
- ...t(g),
73
- modelValue: t(l)
59
+ }, i = $();
60
+ i && t("register", p, i.uid);
61
+ const v = r(() => ({
62
+ ...n,
63
+ ...l(d)
64
+ })), h = r(() => ({
65
+ ...w,
66
+ ...l(v),
67
+ modelValue: l(s)
74
68
  }));
75
- P(() => {
76
- l.value = !!o.modelValue;
77
- }), R(
78
- () => t(l),
69
+ M(() => {
70
+ s.value = !!n.modelValue;
71
+ }), P(
72
+ () => l(s),
79
73
  (e) => {
80
- a("visible-change", e), a("update:modelValue", e), u && d(() => {
81
- f.emitVisible(e, u.uid);
82
- }), d(() => {
83
- o.scrollTop && e && t(s) && t(s).scrollTop();
74
+ t("visible-change", e), t("update:modelValue", e), i && p.emitVisible && m(() => {
75
+ p.emitVisible(e, i.uid);
76
+ }), m(() => {
77
+ n.scrollTop && e && l(u) && l(u).scrollTop();
84
78
  });
85
79
  },
86
80
  {
87
81
  immediate: !1
88
82
  }
89
83
  );
90
- async function p(e) {
91
- if (e?.stopPropagation(), o.closeFunc && G(o.closeFunc)) {
92
- const m = await o.closeFunc();
93
- l.value = !m;
84
+ async function B(e) {
85
+ if (e?.stopPropagation(), n.closeFunc && G(n.closeFunc)) {
86
+ const o = await n.closeFunc();
87
+ s.value = !o;
94
88
  return;
95
89
  }
96
- l.value = !1, a("close", e);
90
+ s.value = !1, t("close", e);
97
91
  }
98
- function V(e) {
99
- c.value = D(t(c) || {}, e), Reflect.has(e, "modelValue") && (l.value = !!e.modelValue);
92
+ function O(e) {
93
+ d.value = D(l(d) || {}, e), Reflect.has(e, "modelValue") && (s.value = !!e.modelValue);
100
94
  }
101
- const v = i(() => ({
102
- onClick: (e) => p(e),
103
- ...o.cancelButtonOptions
104
- })), k = i(() => ({
105
- onClick: () => a("submit"),
106
- ...o.submitButtonOptions
95
+ const V = r(() => ({
96
+ onClick: (e) => B(e),
97
+ ...n.cancelButtonOptions
98
+ })), F = r(() => ({
99
+ onClick: () => t("submit"),
100
+ ...n.submitButtonOptions
107
101
  }));
108
- return (e, m) => (b(), B(t(I), S(w.value, { onClose: p }), T({
109
- default: y(() => [
110
- A(e.$slots, "default")
102
+ return (e, o) => (y(), b(l(I), T(h.value, {
103
+ onClose: B,
104
+ onOpen: o[0] || (o[0] = (c) => t("open")),
105
+ onOpened: o[1] || (o[1] = (c) => t("opened")),
106
+ onClosed: o[2] || (o[2] = (c) => t("closed")),
107
+ onOpenAutoFocus: o[3] || (o[3] = (c) => t("openAutoFocus")),
108
+ onCloseAutoFocus: o[4] || (o[4] = (c) => t("closeAutoFocus"))
109
+ }), R({
110
+ default: C(() => [
111
+ S(e.$slots, "default")
111
112
  ]),
112
113
  _: 2
113
114
  }, [
114
- e.$slots.footer || n.showActionButtonGroup ? {
115
+ e.$slots.footer || a.showActionButtonGroup ? {
115
116
  name: "footer",
116
- fn: y(() => [
117
- n.showActionButtonGroup ? (b(), B($, {
117
+ fn: C(() => [
118
+ a.showActionButtonGroup ? (y(), b(E, {
118
119
  key: 0,
119
- "show-cancel-button": n.showCancelButton,
120
- "show-submit-button": n.showSubmitButton,
121
- "cancel-button-options": v.value,
122
- "submit-button-options": k.value
120
+ "show-cancel-button": a.showCancelButton,
121
+ "show-submit-button": a.showSubmitButton,
122
+ "cancel-button-options": V.value,
123
+ "submit-button-options": F.value
123
124
  }, null, 8, ["show-cancel-button", "show-submit-button", "cancel-button-options", "submit-button-options"])) : x("", !0)
124
125
  ]),
125
126
  key: "0"
@@ -128,5 +129,5 @@ const N = /* @__PURE__ */ O({
128
129
  }
129
130
  });
130
131
  export {
131
- N as default
132
+ W as default
132
133
  };
@@ -12,6 +12,8 @@ export interface ModalProps extends DialogProps {
12
12
  confirmLoading?: boolean;
13
13
  /** 整个 Modal 的加载状态 */
14
14
  loading?: boolean;
15
+ /** 是否在打开时滚动到顶部 */
16
+ scrollTop?: boolean;
15
17
  }
16
18
  /** Modal 操作按钮配置接口 */
17
19
  export interface ModalActionProps {
@@ -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
- icon: {
11
- type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
12
- default: string;
13
- };
14
10
  teleported: {
15
11
  type: import("vue").PropType<boolean>;
16
12
  default: boolean;
17
13
  };
14
+ icon: {
15
+ type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
16
+ default: string;
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
- icon: string | import("vft/es/vft").IconProps;
56
55
  teleported: boolean;
56
+ icon: string | import("vft/es/vft").IconProps;
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
- icon: {
78
- type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
79
- default: string;
80
- };
81
77
  teleported: {
82
78
  type: import("vue").PropType<boolean>;
83
79
  default: boolean;
84
80
  };
81
+ icon: {
82
+ type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
83
+ default: string;
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
- icon: string | import("vft/es/vft").IconProps;
120
119
  teleported: boolean;
120
+ icon: string | import("vft/es/vft").IconProps;
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
- icon: {
139
- type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
140
- default: string;
141
- };
142
138
  teleported: {
143
139
  type: import("vue").PropType<boolean>;
144
140
  default: boolean;
145
141
  };
142
+ icon: {
143
+ type: import("vue").PropType<string | import("vft/es/vft").IconProps>;
144
+ default: string;
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
- icon: string | import("vft/es/vft").IconProps;
184
183
  teleported: boolean;
184
+ icon: string | import("vft/es/vft").IconProps;
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
- icon: string | IconProps;
47
46
  teleported: boolean;
47
+ icon: string | IconProps;
48
48
  hideAfter: number;
49
49
  persistent: boolean;
50
50
  confirmButtonType: ButtonType;