vft 0.0.429 → 0.0.430

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 (218) hide show
  1. package/attributes.json +1 -1
  2. package/es/components/alert/alert.vue2.js +38 -38
  3. package/es/components/autocomplete/autocomplete.vue2.js +82 -82
  4. package/es/components/avatar/avatar.vue2.js +23 -23
  5. package/es/components/avatar-stack/avatar-stack.vue2.js +25 -25
  6. package/es/components/breadcrumb/breadcrumb-item.vue2.js +19 -19
  7. package/es/components/button/button.vue2.js +37 -37
  8. package/es/components/card/card.vue2.js +19 -19
  9. package/es/components/carousel/carousel.vue2.js +75 -75
  10. package/es/components/carousel/use-carousel.js +1 -1
  11. package/es/components/cascader-panel/index.vue2.js +2 -2
  12. package/es/components/cascader-panel/menu.vue2.js +2 -2
  13. package/es/components/cascader-panel/node.vue2.js +3 -4
  14. package/es/components/checkbox/checkbox-button.vue2.js +52 -52
  15. package/es/components/checkbox/checkbox-group.vue2.js +26 -26
  16. package/es/components/checkbox/checkbox.vue2.js +57 -57
  17. package/es/components/clamp/clamp.vue2.js +14 -14
  18. package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
  19. package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +19 -19
  20. package/es/components/col/col.vue2.js +20 -20
  21. package/es/components/color-picker/color-picker.vue2.js +126 -128
  22. package/es/components/color-picker/components/sv-panel.vue.js +2 -2
  23. package/es/components/config-provider/hooks/use-global-config.js +3 -3
  24. package/es/components/context-menu/context-menu.vue2.js +18 -18
  25. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +37 -39
  26. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +8 -10
  27. package/es/components/date-picker/date-picker.d.ts +1 -1
  28. package/es/components/date-picker/index.d.ts +2 -2
  29. package/es/components/descriptions/description.vue2.js +44 -44
  30. package/es/components/descriptions/descriptions-row.vue2.js +12 -12
  31. package/es/components/dialog/dialog-content.vue2.js +31 -31
  32. package/es/components/dialog/dialog.vue2.js +46 -46
  33. package/es/components/divider/divider.vue2.js +19 -19
  34. package/es/components/drawer/drawer.vue2.js +41 -41
  35. package/es/components/dropdown/dropdown-item-impl.vue2.js +40 -40
  36. package/es/components/dropdown/dropdown-item.vue2.js +28 -28
  37. package/es/components/dropdown/dropdown.vue2.js +124 -124
  38. package/es/components/form/form-item.vue2.js +71 -71
  39. package/es/components/header-layout/header-layout.vue2.js +25 -25
  40. package/es/components/icon/icon.vue2.js +15 -15
  41. package/es/components/icon-text/icon-text.vue2.js +28 -28
  42. package/es/components/iframe-layout/iframe-layout.vue2.js +13 -13
  43. package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
  44. package/es/components/image/image.vue2.js +63 -63
  45. package/es/components/image-viewer/image-viewer.vue2.js +88 -88
  46. package/es/components/infinite-scroll/index.d.ts +1 -1
  47. package/es/components/input/input.vue2.js +112 -112
  48. package/es/components/input-number/input-number.vue2.js +100 -100
  49. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  50. package/es/components/link/link.vue2.js +20 -20
  51. package/es/components/list-cell/list-cell.vue2.js +19 -19
  52. package/es/components/logo/logo.vue2.js +22 -22
  53. package/es/components/menu/menu-item-group.vue2.js +8 -8
  54. package/es/components/menu/menu-item.vue2.js +48 -48
  55. package/es/components/message/message.vue2.js +66 -66
  56. package/es/components/modal/modal-footer-action.vue2.js +25 -25
  57. package/es/components/modal/modal.vue2.js +40 -40
  58. package/es/components/multiple-tabs/multiple-tabs.vue2.js +30 -30
  59. package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
  60. package/es/components/pagination/components/jumper.vue2.js +18 -18
  61. package/es/components/pagination/components/next.vue2.js +11 -11
  62. package/es/components/pagination/components/pager.vue2.js +74 -74
  63. package/es/components/pagination/components/prev.vue2.js +9 -9
  64. package/es/components/pagination/components/sizes.vue2.js +18 -18
  65. package/es/components/pagination/components/total.vue2.js +8 -8
  66. package/es/components/popconfirm/popconfirm.vue2.js +47 -47
  67. package/es/components/popover/popover.vue2.js +28 -28
  68. package/es/components/popper/trigger.vue2.js +9 -9
  69. package/es/components/progress/progress.vue2.js +87 -87
  70. package/es/components/qrcode/qrcode.vue2.js +31 -31
  71. package/es/components/radio/radio-button.vue2.js +17 -17
  72. package/es/components/radio/radio-group.vue2.js +35 -35
  73. package/es/components/router-view-content/router-view-content.vue2.js +25 -25
  74. package/es/components/roving-focus-group/roving-focus-item.vue2.js +30 -30
  75. package/es/components/row/row.vue2.js +5 -5
  76. package/es/components/scrollbar/bar.vue2.js +16 -16
  77. package/es/components/scrollbar/scrollbar.vue2.js +48 -48
  78. package/es/components/scrollbar/thumb.vue2.js +27 -27
  79. package/es/components/search/search.vue2.js +29 -29
  80. package/es/components/select/index.d.ts +1 -1
  81. package/es/components/select/select.vue.d.ts +1 -1
  82. package/es/components/side-menu/index.d.ts +2 -8
  83. package/es/components/side-menu/side-menu.vue.d.ts +5 -59
  84. package/es/components/side-menu/types.d.ts +107 -0
  85. package/es/components/skeleton/skeleton-item.vue2.js +9 -9
  86. package/es/components/skeleton/skeleton.vue2.js +14 -14
  87. package/es/components/slider/button.vue2.js +54 -54
  88. package/es/components/slider/slider.vue2.js +106 -106
  89. package/es/components/steps/item.vue2.js +56 -56
  90. package/es/components/steps/steps.vue2.js +16 -16
  91. package/es/components/super-form/super-form-action.vue2.js +28 -28
  92. package/es/components/super-form/super-form-item.vue2.js +1 -1
  93. package/es/components/switch/switch.vue2.js +108 -108
  94. package/es/components/table/field.d.ts +4 -4
  95. package/es/components/teleport/teleport.vue2.js +6 -6
  96. package/es/components/time-picker/common/picker.vue.d.ts +1 -1
  97. package/es/components/time-picker/index.d.ts +2 -2
  98. package/es/components/time-picker/time-picker.d.ts +1 -1
  99. package/es/components/timeline/timeline-item.vue2.js +20 -20
  100. package/es/components/tooltip/content.vue2.js +57 -57
  101. package/es/components/tooltip/tooltip.vue2.js +66 -66
  102. package/es/components/tooltip/trigger.vue2.js +42 -42
  103. package/es/components/tree/tree.vue2.js +72 -72
  104. package/es/components/upload/upload-content.vue2.js +85 -85
  105. package/es/components/upload/upload-list.vue2.js +70 -70
  106. package/es/components/upload/upload.vue2.js +86 -86
  107. package/es/components/verify-code/verify-code.vue2.js +18 -18
  108. package/es/package.json.d.ts +1 -1
  109. package/es/package.json.js +1 -1
  110. package/es/utils/vue/vnode.js +1 -1
  111. package/lib/components/alert/alert.vue2.cjs +1 -1
  112. package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
  113. package/lib/components/avatar/avatar.vue2.cjs +1 -1
  114. package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -1
  115. package/lib/components/breadcrumb/breadcrumb-item.vue2.cjs +1 -1
  116. package/lib/components/button/button.vue2.cjs +1 -1
  117. package/lib/components/card/card.vue2.cjs +1 -1
  118. package/lib/components/carousel/carousel.vue2.cjs +1 -1
  119. package/lib/components/cascader-panel/index.vue2.cjs +1 -1
  120. package/lib/components/cascader-panel/menu.vue2.cjs +1 -1
  121. package/lib/components/cascader-panel/node.vue2.cjs +1 -1
  122. package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
  123. package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
  124. package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
  125. package/lib/components/clamp/clamp.vue2.cjs +1 -1
  126. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  127. package/lib/components/clamp-tooltip/clamp-tooltip.vue2.cjs +1 -1
  128. package/lib/components/col/col.vue2.cjs +1 -1
  129. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  130. package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
  131. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  132. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  133. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  134. package/lib/components/date-picker/date-picker.d.ts +1 -1
  135. package/lib/components/date-picker/index.d.ts +2 -2
  136. package/lib/components/descriptions/description.vue2.cjs +1 -1
  137. package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
  138. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  139. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  140. package/lib/components/divider/divider.vue2.cjs +1 -1
  141. package/lib/components/drawer/drawer.vue2.cjs +1 -1
  142. package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
  143. package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
  144. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  145. package/lib/components/form/form-item.vue2.cjs +1 -1
  146. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  147. package/lib/components/icon/icon.vue2.cjs +1 -1
  148. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  149. package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
  150. package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
  151. package/lib/components/image/image.vue2.cjs +1 -1
  152. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  153. package/lib/components/infinite-scroll/index.d.ts +1 -1
  154. package/lib/components/input/input.vue2.cjs +1 -1
  155. package/lib/components/input-number/input-number.vue2.cjs +1 -1
  156. package/lib/components/link/link.vue2.cjs +1 -1
  157. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  158. package/lib/components/logo/logo.vue2.cjs +1 -1
  159. package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
  160. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  161. package/lib/components/message/message.vue2.cjs +1 -1
  162. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  163. package/lib/components/modal/modal.vue2.cjs +1 -1
  164. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  165. package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
  166. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  167. package/lib/components/pagination/components/next.vue2.cjs +1 -1
  168. package/lib/components/pagination/components/pager.vue2.cjs +1 -1
  169. package/lib/components/pagination/components/prev.vue2.cjs +1 -1
  170. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  171. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  172. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  173. package/lib/components/popover/popover.vue2.cjs +1 -1
  174. package/lib/components/popper/trigger.vue2.cjs +1 -1
  175. package/lib/components/progress/progress.vue2.cjs +5 -5
  176. package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
  177. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  178. package/lib/components/radio/radio-group.vue2.cjs +1 -1
  179. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  180. package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
  181. package/lib/components/row/row.vue2.cjs +1 -1
  182. package/lib/components/scrollbar/bar.vue2.cjs +1 -1
  183. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  184. package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
  185. package/lib/components/search/search.vue2.cjs +1 -1
  186. package/lib/components/select/index.d.ts +1 -1
  187. package/lib/components/select/select.vue.d.ts +1 -1
  188. package/lib/components/side-menu/index.d.ts +2 -8
  189. package/lib/components/side-menu/side-menu.vue.d.ts +5 -59
  190. package/lib/components/side-menu/types.d.ts +107 -0
  191. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  192. package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
  193. package/lib/components/slider/button.vue2.cjs +1 -1
  194. package/lib/components/slider/slider.vue2.cjs +1 -1
  195. package/lib/components/steps/item.vue2.cjs +1 -1
  196. package/lib/components/steps/steps.vue2.cjs +1 -1
  197. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  198. package/lib/components/switch/switch.vue2.cjs +1 -1
  199. package/lib/components/table/field.d.ts +4 -4
  200. package/lib/components/teleport/teleport.vue2.cjs +1 -1
  201. package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
  202. package/lib/components/time-picker/index.d.ts +2 -2
  203. package/lib/components/time-picker/time-picker.d.ts +1 -1
  204. package/lib/components/timeline/timeline-item.vue2.cjs +1 -1
  205. package/lib/components/tooltip/content.vue2.cjs +1 -1
  206. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  207. package/lib/components/tooltip/trigger.vue2.cjs +1 -1
  208. package/lib/components/tree/tree.vue2.cjs +1 -1
  209. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  210. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  211. package/lib/components/upload/upload.vue2.cjs +1 -1
  212. package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
  213. package/lib/package.json.cjs +1 -1
  214. package/lib/package.json.d.ts +1 -1
  215. package/package.json +5 -5
  216. package/tags.json +1 -1
  217. package/theme-style/src/mixins/mixins.scss +1 -0
  218. package/web-types.json +1 -1
@@ -1,22 +1,22 @@
1
- import { defineComponent as E, getCurrentInstance as F, useAttrs as O, inject as N, computed as a, reactive as q, onMounted as G, onBeforeUnmount as H, createElementBlock as p, openBlock as o, Fragment as k, createBlock as l, createCommentVNode as m, createElementVNode as b, unref as e, normalizeClass as M, withCtx as $, renderSlot as y, normalizeProps as I, mergeProps as V, createVNode as J } from "vue";
1
+ import { defineComponent as P, getCurrentInstance as F, useAttrs as O, inject as N, computed as a, reactive as q, onMounted as G, onBeforeUnmount as H, createElementBlock as k, openBlock as n, Fragment as b, createBlock as s, createCommentVNode as m, createElementVNode as M, unref as t, normalizeClass as y, withCtx as $, renderSlot as A, normalizeProps as I, mergeProps as V, createVNode as J } from "vue";
2
2
  import { singleAttrToObj as K, renderTNode as L, VNode as Q } from "@vft/utils";
3
3
  import { VftIcon as h } from "../icon/index.js";
4
4
  import { VftDivider as j } from "../divider/index.js";
5
5
  import { VftTooltip as R } from "../tooltip/index.js";
6
6
  import "@vueuse/core";
7
- import { throwError as P } from "../../utils/error.js";
7
+ import { throwError as p } from "../../utils/error.js";
8
8
  import "../config-provider/hooks/use-global-config.js";
9
9
  import "lodash-es";
10
10
  import "../form/index.js";
11
- import { useNamespace as A } from "../../hooks/use-namespace/index.js";
11
+ import { useNamespace as x } from "../../hooks/use-namespace/index.js";
12
12
  import "../../hooks/use-model-toggle/index.js";
13
13
  import "@popperjs/core";
14
14
  import "../../hooks/use-z-index/index.js";
15
15
  import W from "./use-menu.js";
16
- const X = ["title"], Y = E({
16
+ const X = ["title"], Y = P({
17
17
  name: "vft-menu-item",
18
18
  inheritAttrs: !1
19
- }), fe = /* @__PURE__ */ E({
19
+ }), fe = /* @__PURE__ */ P({
20
20
  ...Y,
21
21
  props: {
22
22
  index: {},
@@ -30,79 +30,79 @@ const X = ["title"], Y = E({
30
30
  reverse: { type: Boolean }
31
31
  },
32
32
  emits: ["click", "mouseenter", "mouseleave"],
33
- setup(t, { emit: S }) {
34
- const d = S, c = A("menu-item"), g = F(), T = O(), w = A("menu"), f = A("menu-item"), i = t.isAloneUse ? null : N("rootMenu");
35
- !i && !t.isAloneUse && P(c.b(), "can not inject root menu");
33
+ setup(e, { emit: E }) {
34
+ const c = E, d = x("menu-item"), g = F(), S = O(), T = x("menu"), f = x("menu-item"), o = e.isAloneUse ? null : N("rootMenu");
35
+ !o && !e.isAloneUse && p(d.b(), "can not inject root menu");
36
36
  const { parentMenu: U, indexPath: B } = W(
37
37
  g,
38
- a(() => t.index)
39
- ), v = t.isAloneUse ? null : N(`subMenu:${U.value.uid}`);
40
- !v && !t.isAloneUse && P(c.b(), "can not inject sub menu");
41
- const C = a(() => t.index === i?.activeIndex), s = q({
42
- index: t.index,
38
+ a(() => e.index)
39
+ ), v = e.isAloneUse ? null : N(`subMenu:${U.value.uid}`);
40
+ !v && !e.isAloneUse && p(d.b(), "can not inject sub menu");
41
+ const C = a(() => e.index === o?.activeIndex), i = q({
42
+ index: e.index,
43
43
  indexPath: B,
44
44
  active: C
45
- }), x = () => {
46
- t.disabled || (i?.handleMenuItemClick({
47
- ...T,
48
- index: t.index,
45
+ }), w = () => {
46
+ e.disabled || (o?.handleMenuItemClick({
47
+ ...S,
48
+ index: e.index,
49
49
  indexPath: B.value,
50
- route: t.route
51
- }), d("click", s));
52
- }, r = a(() => K(t.icon, "icon")), z = a(() => L(g, "title"));
50
+ route: e.route
51
+ }), c("click", i));
52
+ }, r = a(() => K(e.icon, "icon")), z = a(() => L(g, "title"));
53
53
  return G(() => {
54
- t.isAloneUse || (v?.addSubMenu(s), i?.addMenuItem(s));
54
+ e.isAloneUse || (v?.addSubMenu(i), o?.addMenuItem(i));
55
55
  }), H(() => {
56
- t.isAloneUse || (v?.removeSubMenu(s), i?.removeMenuItem(s));
57
- }), (n, u) => (o(), p(k, null, [
58
- n.reverse && n.divider ? (o(), l(e(j), {
56
+ e.isAloneUse || (v?.removeSubMenu(i), o?.removeMenuItem(i));
57
+ }), (l, u) => (n(), k(b, null, [
58
+ e.reverse && e.divider ? (n(), s(t(j), {
59
59
  key: 0,
60
60
  "margin-y": "0"
61
61
  })) : m("", !0),
62
- b("li", {
63
- class: M([
64
- n.className,
65
- e(f).b(),
66
- e(f).is("active", n.isAloneUse ? !1 : C.value),
67
- e(f).is("disabled", n.disabled)
62
+ M("li", {
63
+ class: y([
64
+ e.className,
65
+ t(f).b(),
66
+ t(f).is("active", e.isAloneUse ? !1 : C.value),
67
+ t(f).is("disabled", e.disabled)
68
68
  ]),
69
- onMouseenter: u[0] || (u[0] = (D) => d("mouseenter")),
70
- onMouseleave: u[1] || (u[1] = (D) => d("mouseleave")),
69
+ onMouseenter: u[0] || (u[0] = (D) => c("mouseenter")),
70
+ onMouseleave: u[1] || (u[1] = (D) => c("mouseleave")),
71
71
  role: "menuitem",
72
72
  tabindex: "-1",
73
- onClick: x
73
+ onClick: w
74
74
  }, [
75
- e(U)?.type?.name === "vft-menu" && e(i)?.props.collapse && n.$slots.title ? (o(), l(e(R), {
75
+ t(U)?.type?.name === "vft-menu" && t(o)?.props.collapse && l.$slots.title ? (n(), s(t(R), {
76
76
  key: 0,
77
77
  placement: "right",
78
78
  "fallback-placements": ["left"],
79
- persistent: e(i).props.persistent
79
+ persistent: t(o).props.persistent
80
80
  }, {
81
81
  content: $(() => [
82
- y(n.$slots, "title")
82
+ A(l.$slots, "title")
83
83
  ]),
84
84
  default: $(() => [
85
- b("div", {
86
- class: M(e(w).be("tooltip", "trigger"))
85
+ M("div", {
86
+ class: y(t(T).be("tooltip", "trigger"))
87
87
  }, [
88
- r.value?.icon ? (o(), l(e(h), I(V({ key: 0 }, r.value)), null, 16)) : m("", !0),
89
- y(n.$slots, "default")
88
+ r.value?.icon ? (n(), s(t(h), I(V({ key: 0 }, r.value)), null, 16)) : m("", !0),
89
+ A(l.$slots, "default")
90
90
  ], 2)
91
91
  ]),
92
92
  _: 3
93
- }, 8, ["persistent"])) : (o(), p(k, { key: 1 }, [
94
- n.$slots?.default ? y(n.$slots, "default", { key: 0 }) : (o(), p(k, { key: 1 }, [
95
- r.value?.icon ? (o(), l(e(h), I(V({ key: 0 }, r.value)), null, 16)) : m("", !0),
96
- b("span", {
97
- class: M(e(c).e("text")),
98
- title: n.title
93
+ }, 8, ["persistent"])) : (n(), k(b, { key: 1 }, [
94
+ l.$slots?.default ? A(l.$slots, "default", { key: 0 }) : (n(), k(b, { key: 1 }, [
95
+ r.value?.icon ? (n(), s(t(h), I(V({ key: 0 }, r.value)), null, 16)) : m("", !0),
96
+ M("span", {
97
+ class: y(t(d).e("text")),
98
+ title: e.title
99
99
  }, [
100
- J(e(Q), { content: z.value }, null, 8, ["content"])
100
+ J(t(Q), { content: z.value }, null, 8, ["content"])
101
101
  ], 10, X)
102
102
  ], 64))
103
103
  ], 64))
104
104
  ], 34),
105
- !n.reverse && n.divider ? (o(), l(e(j), {
105
+ !e.reverse && e.divider ? (n(), s(t(j), {
106
106
  key: 1,
107
107
  "margin-y": "0"
108
108
  })) : m("", !0)
@@ -1,13 +1,13 @@
1
- import { defineComponent as R, ref as f, computed as s, onMounted as V, watch as H, createBlock as $, openBlock as i, Transition as D, unref as n, withCtx as F, withDirectives as j, createElementVNode as P, normalizeStyle as U, normalizeClass as r, createElementBlock as c, createCommentVNode as h, renderSlot as Z, createVNode as w, normalizeProps as A, guardReactiveProps as G, toDisplayString as q, withModifiers as J, vShow as K } from "vue";
2
- import { EVENT_CODE as Q } from "@vft/constants";
3
- import { useEventListener as W } from "@vft/use";
4
- import { isObject as X } from "@vft/utils";
5
- import { VftIcon as k } from "../icon/index.js";
6
- import { useResizeObserver as Y, useTimeoutFn as _ } from "@vueuse/core";
1
+ import { defineComponent as N, ref as d, computed as i, onMounted as R, watch as V, createBlock as H, openBlock as c, Transition as $, unref as o, withCtx as D, withDirectives as F, createElementVNode as j, normalizeStyle as P, normalizeClass as r, createElementBlock as u, createCommentVNode as w, renderSlot as U, createVNode as k, normalizeProps as Z, guardReactiveProps as A, toDisplayString as G, withModifiers as q, vShow as J } from "vue";
2
+ import { EVENT_CODE as K } from "@vft/constants";
3
+ import { useEventListener as Q } from "@vft/use";
4
+ import { isObject as W } from "@vft/utils";
5
+ import { VftIcon as B } from "../icon/index.js";
6
+ import { useResizeObserver as X, useTimeoutFn as Y } from "@vueuse/core";
7
7
  import "../config-provider/index.js";
8
- import { getLastOffset as x, getOffsetOrSpace as ee } from "./instance.js";
9
- import { useGlobalComponentSettings as oe } from "../config-provider/hooks/use-global-config.js";
10
- const ne = ["id"], te = ["innerHTML"], de = /* @__PURE__ */ R({
8
+ import { getLastOffset as _, getOffsetOrSpace as ee } from "./instance.js";
9
+ import { useGlobalComponentSettings as te } from "../config-provider/hooks/use-global-config.js";
10
+ const oe = ["id"], ne = ["innerHTML"], ge = /* @__PURE__ */ N({
11
11
  __name: "message",
12
12
  props: {
13
13
  customClass: {},
@@ -26,96 +26,96 @@ const ne = ["id"], te = ["innerHTML"], de = /* @__PURE__ */ R({
26
26
  repeatNum: {}
27
27
  },
28
28
  emits: ["destroy"],
29
- setup(B, { expose: b }) {
30
- const o = B, { ns: t, zIndex: M } = oe("message"), { currentZIndex: S, nextZIndex: T } = M, u = f(), l = f(!1), p = f(0);
31
- let d;
32
- const L = /* @__PURE__ */ new Map([
29
+ setup(e, { expose: b }) {
30
+ const t = e, { ns: n, zIndex: M } = te("message"), { currentZIndex: S, nextZIndex: T } = M, m = d(), l = d(!1), g = d(0);
31
+ let v;
32
+ const x = /* @__PURE__ */ new Map([
33
33
  ["success", { icon: "icon-success-filled" }],
34
34
  ["error", { icon: "icon-circle-close-filled" }],
35
35
  ["warning", { icon: "icon-warning-filled" }]
36
- ]), g = s(() => (o.icon ? X(o.icon) ? o.icon : { icon: o.icon } : "") || L.get(o.type) || ""), O = s(() => {
37
- const e = o.type;
38
- return { [t.bm("icon", e)]: e };
39
- }), z = s(() => x(o.id)), v = s(
40
- () => ee(o.id, o.offset) + z.value
41
- ), E = s(() => p.value + v.value), I = s(() => ({
42
- top: `${v.value}px`,
36
+ ]), y = i(() => (t.icon ? W(t.icon) ? t.icon : { icon: t.icon } : "") || x.get(t.type) || ""), L = i(() => {
37
+ const s = t.type;
38
+ return { [n.bm("icon", s)]: s };
39
+ }), O = i(() => _(t.id)), p = i(
40
+ () => ee(t.id, t.offset) + O.value
41
+ ), z = i(() => g.value + p.value), E = i(() => ({
42
+ top: `${p.value}px`,
43
43
  zIndex: S.value
44
44
  }));
45
- function m() {
46
- o.duration !== 0 && ({ stop: d } = _(() => {
45
+ function f() {
46
+ t.duration !== 0 && ({ stop: v } = Y(() => {
47
47
  a();
48
- }, o.duration));
48
+ }, t.duration));
49
49
  }
50
- function y() {
51
- d?.();
50
+ function C() {
51
+ v?.();
52
52
  }
53
53
  function a() {
54
54
  l.value = !1;
55
55
  }
56
- function N({ code: e }) {
57
- e === Q.esc && a();
56
+ function I({ code: s }) {
57
+ s === K.esc && a();
58
58
  }
59
- return V(() => {
60
- m(), T(), l.value = !0;
61
- }), H(
62
- () => o.repeatNum,
59
+ return R(() => {
60
+ f(), T(), l.value = !0;
61
+ }), V(
62
+ () => t.repeatNum,
63
63
  () => {
64
- y(), m();
64
+ C(), f();
65
65
  }
66
- ), W(document, "keydown", N), Y(u, () => {
67
- p.value = u.value.getBoundingClientRect().height;
66
+ ), Q(document, "keydown", I), X(m, () => {
67
+ g.value = m.value.getBoundingClientRect().height;
68
68
  }), b({
69
69
  visible: l,
70
- bottom: E,
70
+ bottom: z,
71
71
  close: a
72
- }), (e, C) => (i(), $(D, {
73
- name: n(t).b("fade"),
72
+ }), (s, h) => (c(), H($, {
73
+ name: o(n).b("fade"),
74
74
  onBeforeLeave: e.onClose,
75
- onAfterLeave: C[0] || (C[0] = (se) => e.$emit("destroy"))
75
+ onAfterLeave: h[0] || (h[0] = (se) => s.$emit("destroy"))
76
76
  }, {
77
- default: F(() => [
78
- j(P("div", {
77
+ default: D(() => [
78
+ F(j("div", {
79
79
  id: e.id,
80
80
  ref_key: "messageRef",
81
- ref: u,
81
+ ref: m,
82
82
  class: r([
83
- n(t).b(),
84
- { [n(t).m(e.type)]: e.type && !e.icon },
85
- n(t).is("center", e.center),
86
- n(t).is("closable", e.showClose),
83
+ o(n).b(),
84
+ { [o(n).m(e.type)]: e.type && !e.icon },
85
+ o(n).is("center", e.center),
86
+ o(n).is("closable", e.showClose),
87
87
  e.customClass
88
88
  ]),
89
- style: U(I.value),
89
+ style: P(E.value),
90
90
  role: "alert",
91
- onMouseenter: y,
92
- onMouseleave: m
91
+ onMouseenter: C,
92
+ onMouseleave: f
93
93
  }, [
94
- g.value?.icon ? (i(), c("div", {
94
+ y.value?.icon ? (c(), u("div", {
95
95
  key: 0,
96
- class: r([n(t).e("icon"), O.value])
96
+ class: r([o(n).e("icon"), L.value])
97
97
  }, [
98
- w(n(k), A(G(g.value)), null, 16)
99
- ], 2)) : h("", !0),
100
- Z(e.$slots, "default", {}, () => [
101
- e.dangerouslyUseHTMLString ? (i(), c("p", {
98
+ k(o(B), Z(A(y.value)), null, 16)
99
+ ], 2)) : w("", !0),
100
+ U(s.$slots, "default", {}, () => [
101
+ e.dangerouslyUseHTMLString ? (c(), u("p", {
102
102
  key: 1,
103
- class: r(n(t).e("content")),
103
+ class: r(o(n).e("content")),
104
104
  innerHTML: e.message
105
- }, null, 10, te)) : (i(), c("p", {
105
+ }, null, 10, ne)) : (c(), u("p", {
106
106
  key: 0,
107
- class: r(n(t).e("content"))
108
- }, q(e.message), 3))
107
+ class: r(o(n).e("content"))
108
+ }, G(e.message), 3))
109
109
  ]),
110
- e.showClose ? (i(), c("div", {
110
+ e.showClose ? (c(), u("div", {
111
111
  key: 1,
112
- class: r(n(t).e("closeBtn")),
113
- onClick: J(a, ["stop"])
112
+ class: r(o(n).e("closeBtn")),
113
+ onClick: q(a, ["stop"])
114
114
  }, [
115
- w(n(k), { icon: "icon-circle-close" })
116
- ], 2)) : h("", !0)
117
- ], 46, ne), [
118
- [K, l.value]
115
+ k(o(B), { icon: "icon-circle-close" })
116
+ ], 2)) : w("", !0)
117
+ ], 46, oe), [
118
+ [J, l.value]
119
119
  ])
120
120
  ]),
121
121
  _: 3
@@ -123,5 +123,5 @@ const ne = ["id"], te = ["innerHTML"], de = /* @__PURE__ */ R({
123
123
  }
124
124
  });
125
125
  export {
126
- de as default
126
+ ge as default
127
127
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as O, computed as n, createBlock as s, openBlock as i, unref as t, normalizeProps as w, guardReactiveProps as y, withCtx as r, createCommentVNode as p, renderSlot as c, mergeProps as l, createTextVNode as f, toDisplayString as B } from "vue";
1
+ import { defineComponent as O, computed as e, createBlock as n, openBlock as i, unref as o, normalizeProps as w, guardReactiveProps as y, withCtx as s, createCommentVNode as c, renderSlot as p, mergeProps as l, createTextVNode as f, toDisplayString as B } from "vue";
2
2
  import { VftRow as g } from "../row/index.js";
3
3
  import { VftButton as b } from "../button/index.js";
4
4
  import "../super-form/index.js";
@@ -12,7 +12,7 @@ import { useNamespace as h } from "../../hooks/use-namespace/index.js";
12
12
  import "../../hooks/use-model-toggle/index.js";
13
13
  import "@popperjs/core";
14
14
  import "../../hooks/use-z-index/index.js";
15
- const D = /* @__PURE__ */ O({
15
+ const q = /* @__PURE__ */ O({
16
16
  __name: "modal-footer-action",
17
17
  props: {
18
18
  showSubmitButton: { type: Boolean },
@@ -21,42 +21,42 @@ const D = /* @__PURE__ */ O({
21
21
  cancelButtonOptions: {},
22
22
  actionRowOptions: {}
23
23
  },
24
- setup(e) {
25
- const a = h("form-action"), d = n(() => ({
24
+ setup(t) {
25
+ const a = h("form-action"), d = e(() => ({
26
26
  justify: "end",
27
- ...e.actionRowOptions
28
- })), m = n(
29
- () => Object.assign({ btnText: "确认" }, e.submitButtonOptions)
30
- ), u = n(
31
- () => Object.assign({ btnText: "取消" }, e.cancelButtonOptions)
27
+ ...t.actionRowOptions
28
+ })), r = e(
29
+ () => Object.assign({ btnText: "确认" }, t.submitButtonOptions)
30
+ ), m = e(
31
+ () => Object.assign({ btnText: "取消" }, t.cancelButtonOptions)
32
32
  );
33
- return (o, v) => (i(), s(t(g), w(y(d.value)), {
34
- default: r(() => [
35
- o.showCancelButton ? (i(), s(t(b), l({ key: 0 }, u.value, {
36
- class: t(a).e("cancel")
33
+ return (u, v) => (i(), n(o(g), w(y(d.value)), {
34
+ default: s(() => [
35
+ t.showCancelButton ? (i(), n(o(b), l({ key: 0 }, m.value, {
36
+ class: o(a).e("cancel")
37
37
  }), {
38
- default: r(() => [
39
- f(B(u.value.btnText), 1)
38
+ default: s(() => [
39
+ f(B(m.value.btnText), 1)
40
40
  ]),
41
41
  _: 1
42
- }, 16, ["class"])) : p("", !0),
43
- c(o.$slots, "submitBefore"),
44
- o.showSubmitButton ? (i(), s(t(b), l({
42
+ }, 16, ["class"])) : c("", !0),
43
+ p(u.$slots, "submitBefore"),
44
+ t.showSubmitButton ? (i(), n(o(b), l({
45
45
  key: 1,
46
46
  type: "primary",
47
- class: t(a).e("submit")
48
- }, m.value), {
49
- default: r(() => [
50
- f(B(m.value.btnText), 1)
47
+ class: o(a).e("submit")
48
+ }, r.value), {
49
+ default: s(() => [
50
+ f(B(r.value.btnText), 1)
51
51
  ]),
52
52
  _: 1
53
- }, 16, ["class"])) : p("", !0),
54
- c(o.$slots, "submitAfter")
53
+ }, 16, ["class"])) : c("", !0),
54
+ p(u.$slots, "submitAfter")
55
55
  ]),
56
56
  _: 3
57
57
  }, 16));
58
58
  }
59
59
  });
60
60
  export {
61
- D as default
61
+ q as default
62
62
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as O, useAttrs as M, ref as c, getCurrentInstance as F, computed as u, unref as o, watchEffect as P, watch as R, nextTick as r, createBlock as m, openBlock as B, mergeProps as S, createSlots as T, withCtx as b, renderSlot as _, createCommentVNode as A } from "vue";
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";
2
2
  import { deepMerge as D, isFunction as G } from "@vft/utils";
3
3
  import { VftDialog as I } from "../dialog/index.js";
4
4
  import $ from "./modal-footer-action.vue2.js";
@@ -53,74 +53,74 @@ const N = /* @__PURE__ */ O({
53
53
  "update:modelValue": [],
54
54
  submit: []
55
55
  },
56
- setup(y, { emit: h }) {
57
- const t = y, n = h, C = M(), i = c(null), l = c(!1), a = c(null), d = {
56
+ setup(n, { emit: h }) {
57
+ const o = n, a = h, C = M(), c = r(null), l = r(!1), s = r(null), f = {
58
58
  setModalProps: V,
59
59
  emitVisible: void 0,
60
60
  redoModalHeight: () => {
61
- r(() => {
62
- o(a) && o(a).setModalHeight();
61
+ d(() => {
62
+ t(s) && t(s).setModalHeight();
63
63
  });
64
64
  }
65
- }, s = F();
66
- s && n("register", d, s.uid);
67
- const g = u(() => ({
68
- ...t,
69
- ...o(i)
70
- })), w = u(() => ({
65
+ }, u = F();
66
+ u && a("register", f, u.uid);
67
+ const g = i(() => ({
68
+ ...o,
69
+ ...t(c)
70
+ })), w = i(() => ({
71
71
  ...C,
72
- ...o(g),
73
- modelValue: o(l)
72
+ ...t(g),
73
+ modelValue: t(l)
74
74
  }));
75
75
  P(() => {
76
- l.value = !!t.modelValue;
76
+ l.value = !!o.modelValue;
77
77
  }), R(
78
- () => o(l),
78
+ () => t(l),
79
79
  (e) => {
80
- n("visible-change", e), n("update:modelValue", e), s && r(() => {
81
- d.emitVisible(e, s.uid);
82
- }), r(() => {
83
- t.scrollTop && e && o(a) && o(a).scrollTop();
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();
84
84
  });
85
85
  },
86
86
  {
87
87
  immediate: !1
88
88
  }
89
89
  );
90
- async function f(e) {
91
- if (e?.stopPropagation(), t.closeFunc && G(t.closeFunc)) {
92
- const p = await t.closeFunc();
93
- l.value = !p;
90
+ async function p(e) {
91
+ if (e?.stopPropagation(), o.closeFunc && G(o.closeFunc)) {
92
+ const m = await o.closeFunc();
93
+ l.value = !m;
94
94
  return;
95
95
  }
96
- l.value = !1, n("close", e);
96
+ l.value = !1, a("close", e);
97
97
  }
98
98
  function V(e) {
99
- i.value = D(o(i) || {}, e), Reflect.has(e, "modelValue") && (l.value = !!e.modelValue);
99
+ c.value = D(t(c) || {}, e), Reflect.has(e, "modelValue") && (l.value = !!e.modelValue);
100
100
  }
101
- const v = u(() => ({
102
- onClick: (e) => f(e),
103
- ...t.cancelButtonOptions
104
- })), k = u(() => ({
105
- onClick: () => n("submit"),
106
- ...t.submitButtonOptions
101
+ const v = i(() => ({
102
+ onClick: (e) => p(e),
103
+ ...o.cancelButtonOptions
104
+ })), k = i(() => ({
105
+ onClick: () => a("submit"),
106
+ ...o.submitButtonOptions
107
107
  }));
108
- return (e, p) => (B(), m(o(I), S(w.value, { onClose: f }), T({
109
- default: b(() => [
110
- _(e.$slots, "default")
108
+ return (e, m) => (b(), B(t(I), S(w.value, { onClose: p }), T({
109
+ default: y(() => [
110
+ A(e.$slots, "default")
111
111
  ]),
112
112
  _: 2
113
113
  }, [
114
- e.$slots.footer || e.showActionButtonGroup ? {
114
+ e.$slots.footer || n.showActionButtonGroup ? {
115
115
  name: "footer",
116
- fn: b(() => [
117
- e.showActionButtonGroup ? (B(), m($, {
116
+ fn: y(() => [
117
+ n.showActionButtonGroup ? (b(), B($, {
118
118
  key: 0,
119
- "show-cancel-button": e.showCancelButton,
120
- "show-submit-button": e.showSubmitButton,
119
+ "show-cancel-button": n.showCancelButton,
120
+ "show-submit-button": n.showSubmitButton,
121
121
  "cancel-button-options": v.value,
122
122
  "submit-button-options": k.value
123
- }, null, 8, ["show-cancel-button", "show-submit-button", "cancel-button-options", "submit-button-options"])) : A("", !0)
123
+ }, null, 8, ["show-cancel-button", "show-submit-button", "cancel-button-options", "submit-button-options"])) : x("", !0)
124
124
  ]),
125
125
  key: "0"
126
126
  } : void 0