vft 0.0.514 → 0.0.516

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 (67) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/icon/icon.vue.d.ts +5 -1
  3. package/es/components/icon/icon.vue2.js +23 -21
  4. package/es/components/icon/index.d.ts +6 -2
  5. package/es/components/image/image.vue2.js +25 -24
  6. package/es/components/image/index.d.ts +9 -0
  7. package/es/components/image/types.d.ts +2 -0
  8. package/es/components/image-viewer/image-viewer.vue.d.ts +1 -12
  9. package/es/components/image-viewer/types.d.ts +22 -0
  10. package/es/components/md-comment/md-comment.vue2.js +50 -28
  11. package/es/components/modal/modal.vue2.js +31 -30
  12. package/es/components/select/index.d.ts +6 -2
  13. package/es/components/select/select.vue.d.ts +6 -2
  14. package/es/components/table/index.d.ts +12 -12
  15. package/es/components/table/table.vue2.js +126 -121
  16. package/es/components/table/vxe-runtime.d.ts +16 -0
  17. package/es/components/table/vxe-runtime.js +16 -0
  18. package/es/components/tree/tree-node.vue.d.ts +6 -2
  19. package/es/components/upload/index.d.ts +2 -2
  20. package/es/components/upload/upload.vue.d.ts +2 -2
  21. package/es/hooks/use-z-index/index.js +3 -3
  22. package/es/package.json.d.ts +1 -1
  23. package/es/package.json.js +1 -1
  24. package/lib/components/icon/icon.vue.d.ts +5 -1
  25. package/lib/components/icon/icon.vue2.cjs +1 -1
  26. package/lib/components/icon/index.d.ts +6 -2
  27. package/lib/components/image/image.vue2.cjs +1 -1
  28. package/lib/components/image/index.d.ts +9 -0
  29. package/lib/components/image/types.d.ts +2 -0
  30. package/lib/components/image-viewer/image-viewer.vue.d.ts +1 -12
  31. package/lib/components/image-viewer/types.d.ts +22 -0
  32. package/lib/components/md-comment/md-comment.vue2.cjs +1 -1
  33. package/lib/components/modal/modal.vue2.cjs +1 -1
  34. package/lib/components/select/index.d.ts +6 -2
  35. package/lib/components/select/select.vue.d.ts +6 -2
  36. package/lib/components/table/index.d.ts +12 -12
  37. package/lib/components/table/table.vue2.cjs +1 -1
  38. package/lib/components/table/vxe-runtime.cjs +1 -0
  39. package/lib/components/table/vxe-runtime.d.ts +16 -0
  40. package/lib/components/tree/tree-node.vue.d.ts +6 -2
  41. package/lib/components/upload/index.d.ts +2 -2
  42. package/lib/components/upload/upload.vue.d.ts +2 -2
  43. package/lib/package.json.cjs +1 -1
  44. package/lib/package.json.d.ts +1 -1
  45. package/package.json +3 -3
  46. package/theme-style/index.css +1 -1
  47. package/theme-style/vft-autocomplete.css +1 -1
  48. package/theme-style/vft-button-group.css +1 -1
  49. package/theme-style/vft-button.css +1 -1
  50. package/theme-style/vft-cascader.css +1 -1
  51. package/theme-style/vft-checkbox.css +1 -1
  52. package/theme-style/vft-color-picker.css +1 -1
  53. package/theme-style/vft-date-picker.css +1 -1
  54. package/theme-style/vft-dropdown.css +1 -1
  55. package/theme-style/vft-input.css +1 -1
  56. package/theme-style/vft-link.css +1 -1
  57. package/theme-style/vft-md-container.css +1 -1
  58. package/theme-style/vft-md-vue-playground.css +1 -1
  59. package/theme-style/vft-multiple-tabs.css +1 -1
  60. package/theme-style/vft-popper.css +1 -1
  61. package/theme-style/vft-radio.css +1 -1
  62. package/theme-style/vft-result.css +1 -1
  63. package/theme-style/vft-select.css +1 -1
  64. package/theme-style/vft-tag.css +1 -1
  65. package/theme-style/vft-time-picker.css +1 -1
  66. package/theme-style/vft-time-select.css +1 -1
  67. package/web-types.json +1 -1
@@ -1,5 +1,9 @@
1
1
  import type { IconProps } from './types';
2
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ error: (event: Event) => void;
4
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<IconProps>>> & Readonly<{
5
+ onError?: ((event: Event) => any) | undefined;
6
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
3
7
  export default _default;
4
8
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
5
9
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -1,20 +1,20 @@
1
- import { defineComponent as f, computed as t, openBlock as c, createElementBlock as s, normalizeStyle as l, normalizeClass as m, unref as i } from "vue";
2
- import { isString as y } from "@vft/utils";
1
+ import { defineComponent as u, computed as t, openBlock as l, createElementBlock as c, normalizeStyle as m, normalizeClass as f, unref as i } from "vue";
2
+ import { isString as z } from "@vft/utils";
3
3
  import "../config-provider/index.js";
4
4
  import "@vueuse/core";
5
- import { addUnit as C } from "../../utils/helper.js";
6
- import { generateCssVars as g } from "../../utils/ns-cover.js";
5
+ import { addUnit as I } from "../../utils/helper.js";
6
+ import { generateCssVars as h } from "../../utils/ns-cover.js";
7
7
  import "lodash-es";
8
8
  import "../form/index.js";
9
- import { useNamespace as p } from "../../hooks/use-namespace/index.js";
9
+ import { useNamespace as k } from "../../hooks/use-namespace/index.js";
10
10
  import "../../hooks/use-model-toggle/index.js";
11
11
  import "@popperjs/core";
12
12
  import "../../hooks/use-z-index/index.js";
13
- import { useGlobalConfig as h } from "../config-provider/hooks/use-global-config.js";
14
- const z = ["src"], I = f({
13
+ import { useGlobalConfig as x } from "../config-provider/hooks/use-global-config.js";
14
+ const B = ["src"], S = u({
15
15
  name: "vft-icon"
16
- }), w = /* @__PURE__ */ f({
17
- ...I,
16
+ }), F = /* @__PURE__ */ u({
17
+ ...S,
18
18
  props: {
19
19
  icon: {},
20
20
  size: {},
@@ -24,11 +24,12 @@ const z = ["src"], I = f({
24
24
  pointer: { type: Boolean },
25
25
  hoverColor: {}
26
26
  },
27
- setup(o) {
28
- const n = p("icon"), e = h(), r = t(
29
- () => g(
27
+ emits: ["error"],
28
+ setup(o, { emit: v }) {
29
+ const d = v, n = k("icon"), e = x(), r = t(
30
+ () => h(
30
31
  {
31
- size: C(o.size),
32
+ size: I(o.size),
32
33
  color: o.color,
33
34
  hoverColor: o.hoverColor,
34
35
  cursor: o.pointer ? "pointer" : void 0,
@@ -36,20 +37,21 @@ const z = ["src"], I = f({
36
37
  },
37
38
  "icon"
38
39
  )
39
- ), u = (a) => a?.includes("/"), v = t(() => u(o.icon)), d = t(() => e.value?.iconifyPrefixClass && o.icon && y(o.icon) ? o.icon.startsWith(e.value?.iconifyPrefixClass) : !1).value ? "" : e.value?.iconfontClass || "";
40
- return (a, x) => v.value ? (c(), s("img", {
40
+ ), y = (s) => s?.includes("/"), C = t(() => y(o.icon)), g = t(() => e.value?.iconifyPrefixClass && o.icon && z(o.icon) ? o.icon.startsWith(e.value?.iconifyPrefixClass) : !1).value ? "" : e.value?.iconfontClass || "";
41
+ return (s, a) => C.value ? (l(), c("img", {
41
42
  key: 0,
42
- class: m(i(n).e("image")),
43
+ class: f(i(n).e("image")),
43
44
  src: o.icon,
44
45
  alt: "",
45
- style: l(r.value)
46
- }, null, 14, z)) : (c(), s("i", {
46
+ style: m(r.value),
47
+ onError: a[0] || (a[0] = (p) => d("error", p))
48
+ }, null, 46, B)) : (l(), c("i", {
47
49
  key: 1,
48
- class: m([i(n).b(), o.icon, i(d)]),
49
- style: l(r.value)
50
+ class: f([i(n).b(), o.icon, i(g)]),
51
+ style: m(r.value)
50
52
  }, null, 6));
51
53
  }
52
54
  });
53
55
  export {
54
- w as default
56
+ F as default
55
57
  };
@@ -21,7 +21,9 @@ export declare const VftIcon: import("vft/es/utils").SFCWithInstall<import("vue"
21
21
  hoverColor: {
22
22
  type: import("vue").PropType<string>;
23
23
  };
24
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
24
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
25
+ error: (event: Event) => void;
26
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
25
27
  icon: {
26
28
  type: import("vue").PropType<string>;
27
29
  required: true;
@@ -44,6 +46,8 @@ export declare const VftIcon: import("vft/es/utils").SFCWithInstall<import("vue"
44
46
  hoverColor: {
45
47
  type: import("vue").PropType<string>;
46
48
  };
47
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
49
+ }>> & Readonly<{
50
+ onError?: ((event: Event) => any) | undefined;
51
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
48
52
  export * from './types';
49
53
  export default VftIcon;
@@ -13,7 +13,7 @@ import "../../hooks/use-z-index/index.js";
13
13
  const ue = ["src", "loading"], ce = { key: 0 }, de = T({
14
14
  name: "vft-image",
15
15
  inheritAttrs: !1
16
- }), Ie = /* @__PURE__ */ T({
16
+ }), xe = /* @__PURE__ */ T({
17
17
  ...de,
18
18
  props: {
19
19
  hideOnClickModal: { type: Boolean, default: !1 },
@@ -27,41 +27,42 @@ const ue = ["src", "loading"], ce = { key: 0 }, de = T({
27
27
  zIndex: {},
28
28
  initialIndex: { default: 0 },
29
29
  infinite: { type: Boolean, default: !0 },
30
- closeOnPressEscape: { type: Boolean, default: !0 }
30
+ closeOnPressEscape: { type: Boolean, default: !0 },
31
+ zoomRate: { default: 1.2 }
31
32
  },
32
33
  emits: ["load", "error", "switch", "close", "show"],
33
34
  setup(e, { expose: $, emit: b }) {
34
35
  const c = b, i = se("image");
35
36
  let C = "";
36
37
  const M = W(), O = te(), w = o(), r = o(!1), n = o(!0), h = o(!1), m = o(), a = o(), H = v && "loading" in HTMLImageElement.prototype;
37
- let z, p;
38
+ let z, S;
38
39
  const F = d(() => M.style), N = d(() => v && e.fit ? { objectFit: e.fit } : {}), g = d(() => Array.isArray(e.previewSrcList) && e.previewSrcList.length > 0), P = d(() => {
39
40
  let t = e.initialIndex;
40
41
  return e.initialIndex > e.previewSrcList.length - 1 && (t = 0), t;
41
- }), S = d(() => e.loading === "eager" ? !1 : !H && e.loading === "lazy" || e.lazy), L = () => {
42
+ }), p = d(() => e.loading === "eager" ? !1 : !H && e.loading === "lazy" || e.lazy), L = () => {
42
43
  v && (n.value = !0, r.value = !1, w.value = e.src);
43
44
  };
44
45
  function D(t) {
45
46
  n.value = !1, r.value = !1, c("load", t);
46
47
  }
47
- function Y(t) {
48
+ function R(t) {
48
49
  n.value = !1, r.value = !0, c("error", t);
49
50
  }
50
- function I() {
51
+ function x() {
51
52
  le(m.value, a.value) && (L(), B());
52
53
  }
53
- const x = oe(I, 200);
54
+ const I = oe(x, 200);
54
55
  async function E() {
55
56
  v && (await ee(), ne(e.scrollContainer) ? a.value = e.scrollContainer : ae(e.scrollContainer) && e.scrollContainer !== "" ? a.value = document.querySelector(e.scrollContainer) ?? void 0 : m.value && (a.value = ie(m.value)), a.value && (z = V(
56
57
  a,
57
58
  "scroll",
58
- x
59
- ), setTimeout(() => I(), 100)));
59
+ I
60
+ ), setTimeout(() => x(), 100)));
60
61
  }
61
62
  function B() {
62
- !v || !a.value || !x || (z?.(), a.value = void 0);
63
+ !v || !a.value || !I || (z?.(), a.value = void 0);
63
64
  }
64
- function j(t) {
65
+ function Y(t) {
65
66
  if (t.ctrlKey) {
66
67
  if (t.deltaY < 0)
67
68
  return t.preventDefault(), !1;
@@ -69,24 +70,24 @@ const ue = ["src", "loading"], ce = { key: 0 }, de = T({
69
70
  return t.preventDefault(), !1;
70
71
  }
71
72
  }
72
- function q() {
73
- g.value && (p = V("wheel", j, {
73
+ function j() {
74
+ g.value && (S = V("wheel", Y, {
74
75
  passive: !1
75
76
  }), C = document.body.style.overflow, document.body.style.overflow = "hidden", h.value = !0, c("show"));
76
77
  }
77
- function K() {
78
- p?.(), document.body.style.overflow = C, h.value = !1, c("close");
78
+ function q() {
79
+ console.log(11122), S?.(), document.body.style.overflow = C, h.value = !1, c("close");
79
80
  }
80
- function R(t) {
81
+ function K(t) {
81
82
  c("switch", t);
82
83
  }
83
84
  return G(
84
85
  () => e.src,
85
86
  () => {
86
- S.value ? (n.value = !0, r.value = !1, B(), E()) : L();
87
+ p.value ? (n.value = !0, r.value = !1, B(), E()) : L();
87
88
  }
88
89
  ), J(() => {
89
- S.value ? E() : L();
90
+ p.value ? E() : L();
90
91
  }), $({
91
92
  isLoading: n
92
93
  }), (t, fe) => (s(), f("div", {
@@ -104,9 +105,9 @@ const ue = ["src", "loading"], ce = { key: 0 }, de = T({
104
105
  g.value && l(i).e("preview"),
105
106
  n.value && l(i).is("loading")
106
107
  ],
107
- onClick: q,
108
+ onClick: j,
108
109
  onLoad: D,
109
- onError: Y,
110
+ onError: R,
110
111
  alt: ""
111
112
  }), null, 16, ue)) : u("", !0),
112
113
  n.value || r.value ? (s(), f("div", {
@@ -129,13 +130,13 @@ const ue = ["src", "loading"], ce = { key: 0 }, de = T({
129
130
  "z-index": e.zIndex,
130
131
  "initial-index": P.value,
131
132
  infinite: e.infinite,
132
- "zoom-rate": t.zoomRate,
133
+ "zoom-rate": e.zoomRate,
133
134
  "url-list": e.previewSrcList,
134
135
  "hide-on-click-modal": e.hideOnClickModal,
135
136
  teleported: e.previewTeleported,
136
137
  "close-on-press-escape": e.closeOnPressEscape,
137
- onClose: K,
138
- onSwitch: R
138
+ onClose: q,
139
+ onSwitch: K
139
140
  }, {
140
141
  default: _(() => [
141
142
  t.$slots.viewer ? (s(), f("div", ce, [
@@ -149,5 +150,5 @@ const ue = ["src", "loading"], ce = { key: 0 }, de = T({
149
150
  }
150
151
  });
151
152
  export {
152
- Ie as default
153
+ xe as default
153
154
  };
@@ -36,6 +36,9 @@ export declare const VftImage: import("vft/es/utils").SFCWithInstall<{
36
36
  closeOnPressEscape: {
37
37
  type: import("vue").PropType<boolean>;
38
38
  };
39
+ zoomRate: {
40
+ type: import("vue").PropType<number>;
41
+ };
39
42
  }>> & Readonly<{
40
43
  onSwitch?: ((...args: any[]) => any) | undefined;
41
44
  onClose?: ((...args: any[]) => any) | undefined;
@@ -94,6 +97,9 @@ export declare const VftImage: import("vft/es/utils").SFCWithInstall<{
94
97
  closeOnPressEscape: {
95
98
  type: import("vue").PropType<boolean>;
96
99
  };
100
+ zoomRate: {
101
+ type: import("vue").PropType<number>;
102
+ };
97
103
  }>> & Readonly<{
98
104
  onSwitch?: ((...args: any[]) => any) | undefined;
99
105
  onClose?: ((...args: any[]) => any) | undefined;
@@ -143,6 +149,9 @@ export declare const VftImage: import("vft/es/utils").SFCWithInstall<{
143
149
  closeOnPressEscape: {
144
150
  type: import("vue").PropType<boolean>;
145
151
  };
152
+ zoomRate: {
153
+ type: import("vue").PropType<number>;
154
+ };
146
155
  }>> & Readonly<{
147
156
  onSwitch?: ((...args: any[]) => any) | undefined;
148
157
  onClose?: ((...args: any[]) => any) | undefined;
@@ -13,4 +13,6 @@ export interface ImageProps {
13
13
  initialIndex?: number;
14
14
  infinite?: boolean;
15
15
  closeOnPressEscape?: boolean;
16
+ /** 预览图缩放倍率(每次滚轮/按钮缩放的步长),透传给 vft-image-viewer */
17
+ zoomRate?: number;
16
18
  }
@@ -1,15 +1,4 @@
1
- export interface ImageViewerProps {
2
- urlList?: string[];
3
- zIndex?: number;
4
- initialIndex?: number;
5
- infinite?: boolean;
6
- hideOnClickModal?: boolean;
7
- teleported?: boolean;
8
- closeOnPressEscape?: boolean;
9
- zoomRate?: number;
10
- referrerpolicy?: 'no-referrer' | 'no-referrer-when-downgrade' | 'same-origin' | 'origin' | 'strict-origin' | 'origin-when-cross-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
11
- crossorigin?: 'anonymous' | 'use-credentials';
12
- }
1
+ import type { ImageViewerProps } from './types';
13
2
  declare function setActiveItem(index: number): void;
14
3
  declare function __VLS_template(): {
15
4
  default?(_: {}): any;
@@ -1 +1,23 @@
1
1
  export type ImageViewerAction = 'zoomIn' | 'zoomOut' | 'clockwise' | 'anticlockwise';
2
+ export interface ImageViewerProps {
3
+ /** 图片地址列表 */
4
+ urlList?: string[];
5
+ /** 层级 */
6
+ zIndex?: number;
7
+ /** 初始预览的下标 */
8
+ initialIndex?: number;
9
+ /** 是否循环切换 */
10
+ infinite?: boolean;
11
+ /** 点击遮罩层是否关闭 */
12
+ hideOnClickModal?: boolean;
13
+ /** 是否将节点 teleport 到 body */
14
+ teleported?: boolean;
15
+ /** 是否支持 Esc 关闭 */
16
+ closeOnPressEscape?: boolean;
17
+ /** 缩放倍率(每次滚轮/按钮放大缩小的步长) */
18
+ zoomRate?: number;
19
+ /** referrer policy */
20
+ referrerpolicy?: 'no-referrer' | 'no-referrer-when-downgrade' | 'same-origin' | 'origin' | 'strict-origin' | 'origin-when-cross-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
21
+ /** crossorigin */
22
+ crossorigin?: 'anonymous' | 'use-credentials';
23
+ }
@@ -1,41 +1,63 @@
1
- import { defineComponent as i, onMounted as m, openBlock as n, createElementBlock as t, normalizeClass as r, unref as o, createElementVNode as p } from "vue";
1
+ import { defineComponent as m, onMounted as r, nextTick as c, onBeforeUnmount as a, openBlock as l, createElementBlock as s, normalizeClass as p, unref as i, createElementVNode as u } from "vue";
2
2
  import "@vueuse/core";
3
3
  import "@vft/utils";
4
4
  import "../config-provider/hooks/use-global-config.js";
5
5
  import "lodash-es";
6
6
  import "../form/index.js";
7
- import { useNamespace as a } from "../../hooks/use-namespace/index.js";
7
+ import { useNamespace as d } from "../../hooks/use-namespace/index.js";
8
8
  import "../../hooks/use-model-toggle/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../hooks/use-z-index/index.js";
11
- import { init as c } from "@waline/client";
12
- const l = ["id"], s = i({
11
+ import { init as f } from "@waline/client";
12
+ const w = ["id"], _ = m({
13
13
  name: "vft-md-comment"
14
- }), C = /* @__PURE__ */ i({
15
- ...s,
16
- setup(u) {
17
- const e = a("md-comment");
18
- return m(() => {
19
- c({
20
- el: `#${e.e("waline")}`,
21
- serverURL: "https://waline.wflynn.cn/",
22
- pageview: !0,
23
- reaction: !0,
24
- emoji: [
25
- "//unpkg.com/@waline/emojis@1.1.0/weibo",
26
- "//unpkg.com/@waline/emojis@1.1.0/bilibili",
27
- "//unpkg.com/@waline/emojis@1.1.0/bmoji",
28
- "//unpkg.com/@waline/emojis@1.1.0/qq",
29
- "//unpkg.com/@waline/emojis@1.1.0/tieba",
30
- "//unpkg.com/@waline/emojis@1.1.0/tw-emoji"
31
- ]
32
- });
33
- }), (w, d) => (n(), t("div", {
34
- class: r(o(e).b())
14
+ }), C = /* @__PURE__ */ m({
15
+ ..._,
16
+ setup(j) {
17
+ const t = d("md-comment");
18
+ let e = null;
19
+ return r(async () => {
20
+ await c();
21
+ const n = `#${t.e("waline")}`, o = document.querySelector(n);
22
+ if (o) {
23
+ if (o.innerHTML && (o.innerHTML = ""), e) {
24
+ try {
25
+ e.destroy();
26
+ } catch {
27
+ }
28
+ e = null;
29
+ }
30
+ setTimeout(() => {
31
+ e = f({
32
+ el: n,
33
+ serverURL: "https://waline.wflynn.cn/",
34
+ pageview: !0,
35
+ reaction: !0,
36
+ emoji: [
37
+ "//unpkg.com/@waline/emojis@1.1.0/weibo",
38
+ "//unpkg.com/@waline/emojis@1.1.0/bilibili",
39
+ "//unpkg.com/@waline/emojis@1.1.0/bmoji",
40
+ "//unpkg.com/@waline/emojis@1.1.0/qq",
41
+ "//unpkg.com/@waline/emojis@1.1.0/tieba",
42
+ "//unpkg.com/@waline/emojis@1.1.0/tw-emoji"
43
+ ]
44
+ });
45
+ }, 0);
46
+ }
47
+ }), a(() => {
48
+ if (e) {
49
+ try {
50
+ e.destroy();
51
+ } catch {
52
+ }
53
+ e = null;
54
+ }
55
+ }), (n, o) => (l(), s("div", {
56
+ class: p(i(t).b())
35
57
  }, [
36
- p("div", {
37
- id: o(e).e("waline")
38
- }, null, 8, l)
58
+ u("div", {
59
+ id: i(t).e("waline")
60
+ }, null, 8, w)
39
61
  ], 2));
40
62
  }
41
63
  });
@@ -1,4 +1,4 @@
1
- import { defineComponent as A, useAttrs as $, ref as m, getCurrentInstance as M, computed as d, unref as l, watchEffect as P, watch as T, nextTick as B, openBlock as y, createBlock as C, mergeProps as R, createSlots as S, withCtx as g, renderSlot as w, createCommentVNode as D } from "vue";
1
+ import { defineComponent as A, useAttrs as $, ref as m, getCurrentInstance as M, computed as d, unref as t, watchEffect as P, watch as T, nextTick as B, openBlock as C, createBlock as g, mergeProps as R, createSlots as S, withCtx as w, renderSlot as h, createCommentVNode as D } from "vue";
2
2
  import { VftDialog as G } from "../dialog/index.js";
3
3
  import { deepMerge as I, isFunction as x } from "@vft/utils";
4
4
  import E from "./modal-footer-action.vue2.js";
@@ -47,75 +47,76 @@ const W = /* @__PURE__ */ A({
47
47
  actionRowOptions: {}
48
48
  },
49
49
  emits: ["visible-change", "close", "ok", "register", "update:modelValue", "submit", "open", "opened", "closed", "openAutoFocus", "closeAutoFocus"],
50
- setup(s, { emit: h }) {
51
- const n = s, t = h, V = $(), c = m(null), a = m(!1), u = m(null), f = {
50
+ setup(s, { emit: V }) {
51
+ const n = s, l = V, v = $(), c = m(null), a = m(!1), u = m(null), f = {
52
52
  setModalProps: p,
53
53
  emitVisible: void 0,
54
54
  redoModalHeight: () => {
55
55
  B(() => {
56
- l(u) && l(u).setModalHeight();
56
+ t(u) && t(u).setModalHeight();
57
57
  });
58
58
  }
59
59
  }, i = M();
60
- i && t("register", f, i.uid);
61
- const v = d(() => ({
60
+ i && l("register", f, i.uid);
61
+ const b = d(() => ({
62
62
  ...n,
63
- ...l(c)
63
+ ...t(c)
64
64
  })), O = d(() => ({
65
- ...V,
66
- ...l(v),
67
- modelValue: l(a)
65
+ ...v,
66
+ ...t(b),
67
+ modelValue: t(a)
68
68
  }));
69
69
  P(() => {
70
70
  a.value = !!n.modelValue;
71
71
  }), T(
72
- () => l(a),
72
+ () => t(a),
73
73
  (e) => {
74
- t("visible-change", e), t("update:modelValue", e), i && f.emitVisible && B(() => {
74
+ l("visible-change", e), l("update:modelValue", e), i && f.emitVisible && B(() => {
75
75
  f.emitVisible(e, i.uid);
76
76
  }), B(() => {
77
- n.scrollTop && e && l(u) && l(u).scrollTop();
77
+ n.scrollTop && e && t(u) && t(u).scrollTop();
78
78
  });
79
79
  },
80
80
  {
81
81
  immediate: !1
82
82
  }
83
83
  );
84
- async function b(e) {
84
+ async function y(e) {
85
85
  if (e?.stopPropagation(), n.closeFunc && x(n.closeFunc)) {
86
86
  await n.closeFunc() || p({ modelValue: !1 });
87
87
  return;
88
88
  }
89
- p({ modelValue: !1 }), t("close", e);
89
+ p({ modelValue: !1 }), l("close", e);
90
90
  }
91
91
  function p(e) {
92
- c.value = I(l(c) || {}, e), Reflect.has(e, "modelValue") && (a.value = !!e.modelValue);
92
+ c.value = I(t(c) || {}, e), Reflect.has(e, "modelValue") && (a.value = !!e.modelValue);
93
93
  }
94
94
  const F = d(() => ({
95
- onClick: (e) => b(e),
95
+ onClick: (e) => y(e),
96
96
  ...n.cancelButtonOptions
97
97
  })), k = d(() => ({
98
- onClick: () => t("submit"),
98
+ onClick: () => l("submit"),
99
+ loading: t(b).confirmLoading,
99
100
  ...n.submitButtonOptions
100
101
  }));
101
- return (e, o) => (y(), C(l(G), R(O.value, {
102
- onClose: b,
103
- onOpen: o[0] || (o[0] = (r) => t("open")),
104
- onOpened: o[1] || (o[1] = (r) => t("opened")),
105
- onClosed: o[2] || (o[2] = (r) => t("closed")),
106
- onOpenAutoFocus: o[3] || (o[3] = (r) => t("openAutoFocus")),
107
- onCloseAutoFocus: o[4] || (o[4] = (r) => t("closeAutoFocus"))
102
+ return (e, o) => (C(), g(t(G), R(O.value, {
103
+ onClose: y,
104
+ onOpen: o[0] || (o[0] = (r) => l("open")),
105
+ onOpened: o[1] || (o[1] = (r) => l("opened")),
106
+ onClosed: o[2] || (o[2] = (r) => l("closed")),
107
+ onOpenAutoFocus: o[3] || (o[3] = (r) => l("openAutoFocus")),
108
+ onCloseAutoFocus: o[4] || (o[4] = (r) => l("closeAutoFocus"))
108
109
  }), S({
109
- default: g(() => [
110
- w(e.$slots, "default")
110
+ default: w(() => [
111
+ h(e.$slots, "default")
111
112
  ]),
112
113
  _: 2
113
114
  }, [
114
115
  e.$slots.footer || s.showActionButtonGroup ? {
115
116
  name: "footer",
116
- fn: g(() => [
117
- w(e.$slots, "footer", {}, () => [
118
- s.showActionButtonGroup ? (y(), C(E, {
117
+ fn: w(() => [
118
+ h(e.$slots, "footer", {}, () => [
119
+ s.showActionButtonGroup ? (C(), g(E, {
119
120
  key: 0,
120
121
  "show-cancel-button": s.showCancelButton,
121
122
  "show-submit-button": s.showSubmitButton,
@@ -2764,7 +2764,9 @@ export declare const VftSelect: SFCWithInstall<import("vue").DefineComponent<imp
2764
2764
  hoverColor: {
2765
2765
  type: import("vue").PropType<string>;
2766
2766
  };
2767
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
2767
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2768
+ error: (event: Event) => void;
2769
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
2768
2770
  icon: {
2769
2771
  type: import("vue").PropType<string>;
2770
2772
  required: true;
@@ -2787,7 +2789,9 @@ export declare const VftSelect: SFCWithInstall<import("vue").DefineComponent<imp
2787
2789
  hoverColor: {
2788
2790
  type: import("vue").PropType<string>;
2789
2791
  };
2790
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
2792
+ }>> & Readonly<{
2793
+ onError?: ((event: Event) => any) | undefined;
2794
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
2791
2795
  }, {
2792
2796
  ClickOutside: import("vue").ObjectDirective<any, any, string, any>;
2793
2797
  }, string, import("vue").ComponentProvideOptions, true, {}, any>>;
@@ -2760,7 +2760,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2760
2760
  hoverColor: {
2761
2761
  type: import("vue").PropType<string>;
2762
2762
  };
2763
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
2763
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
2764
+ error: (event: Event) => void;
2765
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
2764
2766
  icon: {
2765
2767
  type: import("vue").PropType<string>;
2766
2768
  required: true;
@@ -2783,7 +2785,9 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2783
2785
  hoverColor: {
2784
2786
  type: import("vue").PropType<string>;
2785
2787
  };
2786
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
2788
+ }>> & Readonly<{
2789
+ onError?: ((event: Event) => any) | undefined;
2790
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
2787
2791
  }, {
2788
2792
  ClickOutside: import("vue").ObjectDirective<any, any, string, any>;
2789
2793
  }, string, import("vue").ComponentProvideOptions, true, {}, any>;