vft 0.0.429 → 0.0.431

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 (234) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/es/components/alert/alert.vue2.js +38 -38
  4. package/es/components/autocomplete/autocomplete.vue2.js +82 -82
  5. package/es/components/avatar/avatar.vue2.js +23 -23
  6. package/es/components/avatar-stack/avatar-stack.vue2.js +25 -25
  7. package/es/components/breadcrumb/breadcrumb-item.vue2.js +19 -19
  8. package/es/components/button/button.vue2.js +37 -37
  9. package/es/components/card/card.vue2.js +19 -19
  10. package/es/components/carousel/carousel.vue2.js +75 -75
  11. package/es/components/carousel/use-carousel.js +1 -1
  12. package/es/components/cascader-panel/index.vue2.js +2 -2
  13. package/es/components/cascader-panel/menu.vue2.js +2 -2
  14. package/es/components/cascader-panel/node.vue2.js +3 -4
  15. package/es/components/checkbox/checkbox-button.vue2.js +52 -52
  16. package/es/components/checkbox/checkbox-group.vue2.js +26 -26
  17. package/es/components/checkbox/checkbox.vue2.js +57 -57
  18. package/es/components/clamp/clamp.vue2.js +14 -14
  19. package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
  20. package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +19 -19
  21. package/es/components/col/col.vue2.js +20 -20
  22. package/es/components/color-picker/color-picker.vue2.js +126 -128
  23. package/es/components/color-picker/components/sv-panel.vue.js +2 -2
  24. package/es/components/config-provider/hooks/use-global-config.js +3 -3
  25. package/es/components/context-menu/context-menu.vue2.js +18 -18
  26. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +37 -39
  27. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +8 -10
  28. package/es/components/date-picker/date-picker.d.ts +1 -1
  29. package/es/components/date-picker/index.d.ts +2 -2
  30. package/es/components/descriptions/description.vue2.js +44 -44
  31. package/es/components/descriptions/descriptions-row.vue2.js +12 -12
  32. package/es/components/dialog/dialog-content.vue2.js +31 -31
  33. package/es/components/dialog/dialog.vue2.js +46 -46
  34. package/es/components/divider/divider.vue2.js +19 -19
  35. package/es/components/drawer/drawer.vue2.js +41 -41
  36. package/es/components/dropdown/dropdown-item-impl.vue2.js +40 -40
  37. package/es/components/dropdown/dropdown-item.vue2.js +28 -28
  38. package/es/components/dropdown/dropdown.vue2.js +124 -124
  39. package/es/components/form/form-item.vue2.js +71 -71
  40. package/es/components/header-layout/header-layout.vue2.js +25 -25
  41. package/es/components/icon/icon.vue2.js +15 -15
  42. package/es/components/icon-text/icon-text.vue2.js +28 -28
  43. package/es/components/iframe-layout/iframe-layout.vue2.js +13 -13
  44. package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
  45. package/es/components/image/image.vue2.js +63 -63
  46. package/es/components/image-viewer/image-viewer.vue2.js +88 -88
  47. package/es/components/infinite-scroll/index.d.ts +1 -1
  48. package/es/components/input/input.vue2.js +112 -112
  49. package/es/components/input-number/input-number.vue2.js +100 -100
  50. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  51. package/es/components/link/link.vue2.js +20 -20
  52. package/es/components/list-cell/list-cell.vue2.js +19 -19
  53. package/es/components/logo/logo.vue2.js +22 -22
  54. package/es/components/menu/menu-item-group.vue2.js +8 -8
  55. package/es/components/menu/menu-item.vue2.js +48 -48
  56. package/es/components/menu/sub-menu.vue2.js +33 -31
  57. package/es/components/message/message.vue2.js +66 -66
  58. package/es/components/modal/modal-footer-action.vue2.js +25 -25
  59. package/es/components/modal/modal.vue2.js +40 -40
  60. package/es/components/multiple-tabs/multiple-tabs.vue2.js +30 -30
  61. package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
  62. package/es/components/pagination/components/jumper.vue2.js +18 -18
  63. package/es/components/pagination/components/next.vue2.js +11 -11
  64. package/es/components/pagination/components/pager.vue2.js +74 -74
  65. package/es/components/pagination/components/prev.vue2.js +9 -9
  66. package/es/components/pagination/components/sizes.vue2.js +18 -18
  67. package/es/components/pagination/components/total.vue2.js +8 -8
  68. package/es/components/popconfirm/popconfirm.vue2.js +47 -47
  69. package/es/components/popover/popover.vue2.js +28 -28
  70. package/es/components/popper/trigger.vue2.js +9 -9
  71. package/es/components/progress/progress.vue2.js +87 -87
  72. package/es/components/qrcode/qrcode.vue2.js +31 -31
  73. package/es/components/radio/radio-button.vue2.js +17 -17
  74. package/es/components/radio/radio-group.vue2.js +35 -35
  75. package/es/components/router-view-content/router-view-content.vue2.js +25 -25
  76. package/es/components/roving-focus-group/roving-focus-item.vue2.js +30 -30
  77. package/es/components/row/row.vue2.js +5 -5
  78. package/es/components/scrollbar/bar.vue2.js +16 -16
  79. package/es/components/scrollbar/scrollbar.vue2.js +48 -48
  80. package/es/components/scrollbar/thumb.vue2.js +27 -27
  81. package/es/components/search/search.vue2.js +29 -29
  82. package/es/components/select/index.d.ts +1 -1
  83. package/es/components/select/select.vue.d.ts +1 -1
  84. package/es/components/side-menu/index.d.ts +2 -8
  85. package/es/components/side-menu/side-menu.vue.d.ts +8 -62
  86. package/es/components/side-menu/side-menu.vue2.js +48 -46
  87. package/es/components/side-menu/types.d.ts +107 -0
  88. package/es/components/side-menu/use-drag-line.d.ts +3 -1
  89. package/es/components/side-menu/use-drag-line.js +39 -28
  90. package/es/components/skeleton/skeleton-item.vue2.js +9 -9
  91. package/es/components/skeleton/skeleton.vue2.js +14 -14
  92. package/es/components/slider/button.vue2.js +54 -54
  93. package/es/components/slider/slider.vue2.js +106 -106
  94. package/es/components/steps/item.vue2.js +56 -56
  95. package/es/components/steps/steps.vue2.js +16 -16
  96. package/es/components/super-form/super-form-action.vue2.js +28 -28
  97. package/es/components/super-form/super-form-item.vue2.js +1 -1
  98. package/es/components/switch/switch.vue2.js +108 -108
  99. package/es/components/table/field.d.ts +4 -4
  100. package/es/components/teleport/teleport.vue2.js +6 -6
  101. package/es/components/time-picker/common/picker.vue.d.ts +1 -1
  102. package/es/components/time-picker/index.d.ts +2 -2
  103. package/es/components/time-picker/time-picker.d.ts +1 -1
  104. package/es/components/timeline/timeline-item.vue2.js +20 -20
  105. package/es/components/tooltip/content.vue2.js +57 -57
  106. package/es/components/tooltip/tooltip.vue2.js +66 -66
  107. package/es/components/tooltip/trigger.vue2.js +42 -42
  108. package/es/components/tree/tree.vue2.js +72 -72
  109. package/es/components/upload/upload-content.vue2.js +85 -85
  110. package/es/components/upload/upload-list.vue2.js +70 -70
  111. package/es/components/upload/upload.vue2.js +86 -86
  112. package/es/components/verify-code/verify-code.vue2.js +18 -18
  113. package/es/package.json.d.ts +1 -1
  114. package/es/package.json.js +1 -1
  115. package/es/utils/vue/vnode.js +1 -1
  116. package/lib/components/alert/alert.vue2.cjs +1 -1
  117. package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
  118. package/lib/components/avatar/avatar.vue2.cjs +1 -1
  119. package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -1
  120. package/lib/components/breadcrumb/breadcrumb-item.vue2.cjs +1 -1
  121. package/lib/components/button/button.vue2.cjs +1 -1
  122. package/lib/components/card/card.vue2.cjs +1 -1
  123. package/lib/components/carousel/carousel.vue2.cjs +1 -1
  124. package/lib/components/cascader-panel/index.vue2.cjs +1 -1
  125. package/lib/components/cascader-panel/menu.vue2.cjs +1 -1
  126. package/lib/components/cascader-panel/node.vue2.cjs +1 -1
  127. package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
  128. package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
  129. package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
  130. package/lib/components/clamp/clamp.vue2.cjs +1 -1
  131. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  132. package/lib/components/clamp-tooltip/clamp-tooltip.vue2.cjs +1 -1
  133. package/lib/components/col/col.vue2.cjs +1 -1
  134. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  135. package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
  136. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  137. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  138. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  139. package/lib/components/date-picker/date-picker.d.ts +1 -1
  140. package/lib/components/date-picker/index.d.ts +2 -2
  141. package/lib/components/descriptions/description.vue2.cjs +1 -1
  142. package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
  143. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  144. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  145. package/lib/components/divider/divider.vue2.cjs +1 -1
  146. package/lib/components/drawer/drawer.vue2.cjs +1 -1
  147. package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
  148. package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
  149. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  150. package/lib/components/form/form-item.vue2.cjs +1 -1
  151. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  152. package/lib/components/icon/icon.vue2.cjs +1 -1
  153. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  154. package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
  155. package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
  156. package/lib/components/image/image.vue2.cjs +1 -1
  157. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  158. package/lib/components/infinite-scroll/index.d.ts +1 -1
  159. package/lib/components/input/input.vue2.cjs +1 -1
  160. package/lib/components/input-number/input-number.vue2.cjs +1 -1
  161. package/lib/components/link/link.vue2.cjs +1 -1
  162. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  163. package/lib/components/logo/logo.vue2.cjs +1 -1
  164. package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
  165. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  166. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  167. package/lib/components/message/message.vue2.cjs +1 -1
  168. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  169. package/lib/components/modal/modal.vue2.cjs +1 -1
  170. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  171. package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
  172. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  173. package/lib/components/pagination/components/next.vue2.cjs +1 -1
  174. package/lib/components/pagination/components/pager.vue2.cjs +1 -1
  175. package/lib/components/pagination/components/prev.vue2.cjs +1 -1
  176. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  177. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  178. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  179. package/lib/components/popover/popover.vue2.cjs +1 -1
  180. package/lib/components/popper/trigger.vue2.cjs +1 -1
  181. package/lib/components/progress/progress.vue2.cjs +5 -5
  182. package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
  183. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  184. package/lib/components/radio/radio-group.vue2.cjs +1 -1
  185. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  186. package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
  187. package/lib/components/row/row.vue2.cjs +1 -1
  188. package/lib/components/scrollbar/bar.vue2.cjs +1 -1
  189. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  190. package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
  191. package/lib/components/search/search.vue2.cjs +1 -1
  192. package/lib/components/select/index.d.ts +1 -1
  193. package/lib/components/select/select.vue.d.ts +1 -1
  194. package/lib/components/side-menu/index.d.ts +2 -8
  195. package/lib/components/side-menu/side-menu.vue.d.ts +8 -62
  196. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  197. package/lib/components/side-menu/types.d.ts +107 -0
  198. package/lib/components/side-menu/use-drag-line.cjs +1 -1
  199. package/lib/components/side-menu/use-drag-line.d.ts +3 -1
  200. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  201. package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
  202. package/lib/components/slider/button.vue2.cjs +1 -1
  203. package/lib/components/slider/slider.vue2.cjs +1 -1
  204. package/lib/components/steps/item.vue2.cjs +1 -1
  205. package/lib/components/steps/steps.vue2.cjs +1 -1
  206. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  207. package/lib/components/switch/switch.vue2.cjs +1 -1
  208. package/lib/components/table/field.d.ts +4 -4
  209. package/lib/components/teleport/teleport.vue2.cjs +1 -1
  210. package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
  211. package/lib/components/time-picker/index.d.ts +2 -2
  212. package/lib/components/time-picker/time-picker.d.ts +1 -1
  213. package/lib/components/timeline/timeline-item.vue2.cjs +1 -1
  214. package/lib/components/tooltip/content.vue2.cjs +1 -1
  215. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  216. package/lib/components/tooltip/trigger.vue2.cjs +1 -1
  217. package/lib/components/tree/tree.vue2.cjs +1 -1
  218. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  219. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  220. package/lib/components/upload/upload.vue2.cjs +1 -1
  221. package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
  222. package/lib/package.json.cjs +1 -1
  223. package/lib/package.json.d.ts +1 -1
  224. package/package.json +4 -4
  225. package/tags.json +1 -1
  226. package/theme-style/index.css +1 -1
  227. package/theme-style/src/header-layout.scss +1 -1
  228. package/theme-style/src/menu.scss +7 -2
  229. package/theme-style/src/mixins/mixins.scss +1 -0
  230. package/theme-style/src/side-menu.scss +0 -3
  231. package/theme-style/vft-header-layout.css +1 -1
  232. package/theme-style/vft-menu.css +1 -1
  233. package/theme-style/vft-side-menu.css +1 -1
  234. 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,4 +1,4 @@
1
- import { defineComponent as Z, getCurrentInstance as le, computed as l, inject as D, ref as C, reactive as ue, watch as ae, provide as se, onMounted as re, onBeforeUnmount as ie, useSlots as ce, h as s, Fragment as pe, withDirectives as me, vShow as de } from "vue";
1
+ import { defineComponent as Z, getCurrentInstance as le, computed as l, inject as D, ref as C, reactive as ue, watch as ae, provide as se, onMounted as re, onBeforeUnmount as ie, useSlots as ce, h as u, Fragment as pe, withDirectives as me, vShow as de } from "vue";
2
2
  import { singleAttrToObj as g, renderTNode as ve, isMobile as fe } from "@vft/utils";
3
3
  import { VftTooltip as Me } from "../tooltip/index.js";
4
4
  import { VftIcon as L } from "../icon/index.js";
@@ -56,7 +56,7 @@ const Ce = Z({
56
56
  const y = G, I = w("sub-menu"), m = le(), {
57
57
  indexPath: f,
58
58
  parentMenu: k
59
- } = he(m, l(() => o.index)), i = w("menu"), u = w("sub-menu"), e = D("rootMenu");
59
+ } = he(m, l(() => o.index)), i = w("menu"), a = w("sub-menu"), e = D("rootMenu");
60
60
  e || U(I.b(), "can not inject root menu");
61
61
  const r = D(`subMenu:${k.value.uid}`);
62
62
  r || U(I.b(), "can not inject sub menu");
@@ -64,8 +64,8 @@ const Ce = Z({
64
64
  let M;
65
65
  const z = C(!1), J = C(), E = C(null), A = l(() => p.value === "horizontal" && b.value ? "bottom-start" : "right-start"), b = l(() => r.level === 0), x = l(() => o.teleported === void 0 ? b.value : o.teleported), K = l(() => e.props.collapse ? `${i.namespace.value}-zoom-in-left` : `${i.namespace.value}-zoom-in-top`), Q = l(() => p.value === "horizontal" && b.value ? ["bottom-start", "bottom-end", "top-start", "top-end", "right-start", "left-start"] : ["right-start", "left-start", "bottom-start", "bottom-end", "top-start", "top-end"]), c = l(() => e.openedMenus.includes(o.index)), d = l(() => {
66
66
  let t = !1;
67
- return Object.values(S.value).forEach((a) => {
68
- a.active && (t = !0);
67
+ return Object.values(S.value).forEach((s) => {
68
+ s.active && (t = !0);
69
69
  }), o.index === e.activeIndex && (t = !0), t;
70
70
  }), B = l(() => e.props.backgroundColor || ""), P = l(() => e.props.activeTextColor || ""), F = l(() => e.props.textColor || ""), p = l(() => e.props.mode), W = l(() => e.props.persistent), h = ue({
71
71
  index: o.index,
@@ -79,7 +79,7 @@ const Ce = Z({
79
79
  }), X = () => E.value?.popperRef?.popperInstanceRef?.destroy(), Y = (t) => {
80
80
  t || X();
81
81
  }, O = (t) => {
82
- const a = {
82
+ const s = {
83
83
  e: t,
84
84
  index: o.index,
85
85
  indexPath: f.value,
@@ -87,18 +87,18 @@ const Ce = Z({
87
87
  };
88
88
  if (e.props.menuTrigger === "hover" && e.props.mode === "horizontal" && !fe() || e.props.collapse && e.props.mode === "vertical" || o.disabled) {
89
89
  e.handleSubMenuClick({
90
- ...a,
90
+ ...s,
91
91
  isFirstLevel: !0
92
92
  });
93
93
  return;
94
94
  }
95
- e.handleSubMenuClick(a);
96
- }, v = (t, a = o.showTimeout) => {
95
+ e.handleSubMenuClick(s);
96
+ }, v = (t, s = o.showTimeout) => {
97
97
  t.type !== "focus" && (e.props.menuTrigger === "click" && e.props.mode === "horizontal" || !e.props.collapse && e.props.mode === "vertical" || o.disabled || (r.mouseInChild.value = !0, M?.(), {
98
98
  stop: M
99
99
  } = H(() => {
100
100
  e.openMenu(o.index, f.value);
101
- }, a), x.value && k.value.vnode.el?.dispatchEvent(new MouseEvent("mouseenter")), y("mouseenter", t)));
101
+ }, s), x.value && k.value.vnode.el?.dispatchEvent(new MouseEvent("mouseenter")), y("mouseenter", t)));
102
102
  }, _ = () => {
103
103
  e.inSubMenuMouseEnterTimer && clearTimeout(e.inSubMenuMouseEnterTimer), e.inSubMenuMouseleaveTimer && clearTimeout(e.inSubMenuMouseleaveTimer), e.inSubMenuMouseEnterTimer = setTimeout(() => {
104
104
  e.inSubMenu = !0;
@@ -107,23 +107,23 @@ const Ce = Z({
107
107
  e.inSubMenuMouseEnterTimer && clearTimeout(e.inSubMenuMouseEnterTimer), e.inSubMenuMouseleaveTimer && clearTimeout(e.inSubMenuMouseleaveTimer), e.inSubMenuMouseleaveTimer = setTimeout(() => {
108
108
  e.inSubMenu = !1;
109
109
  }, o.hideTimeout - 10);
110
- }, T = (t, a = !1) => {
110
+ }, T = (t, s = !1) => {
111
111
  e.props.menuTrigger === "click" && e.props.mode === "horizontal" || !e.props.collapse && e.props.mode === "vertical" || (M?.(), r.mouseInChild.value = !1, {
112
112
  stop: M
113
113
  } = H(() => {
114
114
  !z.value && e.closeMenu(o.index, f.value);
115
- }, o.hideTimeout), x.value && a && m.parent?.type.name === "vft-sub-menu" && r.handleMouseleave?.(t, !0), y("mouseleave", t));
115
+ }, o.hideTimeout), x.value && s && m.parent?.type.name === "vft-sub-menu" && r.handleMouseleave?.(t, !0), y("mouseleave", t));
116
116
  };
117
117
  ae(() => e.props.collapse, (t) => Y(!!t));
118
118
  {
119
119
  const t = (n) => {
120
120
  S.value[n.index] = n;
121
- }, a = (n) => {
121
+ }, s = (n) => {
122
122
  delete S.value[n.index];
123
123
  };
124
124
  se(`subMenu:${m.uid}`, {
125
125
  addSubMenu: t,
126
- removeSubMenu: a,
126
+ removeSubMenu: s,
127
127
  handleMouseleave: T,
128
128
  mouseInChild: z,
129
129
  level: r.level + 1
@@ -146,18 +146,18 @@ const Ce = Z({
146
146
  ...te.value
147
147
  }), R = l(() => ve(m, "title"));
148
148
  return () => {
149
- const t = [N.value?.icon ? s(L, {
149
+ const t = [N.value?.icon ? u(L, {
150
150
  ...N.value
151
- }) : null, s("span", {
152
- class: [u.e("text"), u.is("arrow", o.showArrow)],
151
+ }) : null, u("span", {
152
+ class: [a.e("text"), a.is("arrow", o.showArrow)],
153
153
  title: m.props.title
154
- }, R.value), o.showArrow ? s(L, {
155
- class: u.e("icon-arrow"),
154
+ }, R.value), o.showArrow ? u(L, {
155
+ class: a.e("icon-arrow"),
156
156
  ...ne.value,
157
157
  style: {
158
158
  transform: c.value ? "rotateZ(180deg)" : "none"
159
159
  }
160
- }) : !1], a = e.isMenuPopup ? s(Me, {
160
+ }) : !1], s = e.isMenuPopup ? u(Me, {
161
161
  ref: E,
162
162
  visible: c.value,
163
163
  effect: "light",
@@ -173,17 +173,19 @@ const Ce = Z({
173
173
  gpuAcceleration: !1,
174
174
  ...o.toolTipCfg
175
175
  }, {
176
- content: () => s("div", {
176
+ content: () => u("div", {
177
177
  class: [i.m(p.value), i.m("popup-container"), o.popperClass],
178
178
  onMouseenter: (n) => v(n, 100),
179
179
  onMouseleave: (n) => T(n, !0),
180
180
  onFocus: (n) => v(n, 100)
181
- }, [s("ul", {
181
+ }, [u("div", {
182
182
  class: [i.b(), i.m("popup"), i.m(`popup-${A.value}`)],
183
183
  style: j.value
184
- }, [V.default?.()])]),
185
- default: () => s("div", {
186
- class: u.e("title"),
184
+ }, [u("ul", {
185
+ class: i.m("popup-ul-list")
186
+ }, V.default?.())])]),
187
+ default: () => u("div", {
188
+ class: a.e("title"),
187
189
  style: [$.value, {
188
190
  backgroundColor: B.value
189
191
  }],
@@ -193,30 +195,30 @@ const Ce = Z({
193
195
  }, t)
194
196
  }) : (
195
197
  // 以下是无需 tooltip 渲染的组件,通常是侧边栏没有折叠的时候
196
- s(pe, {}, [R.value ? s("div", {
197
- class: u.e("title"),
198
+ u(pe, {}, [R.value ? u("div", {
199
+ class: a.e("title"),
198
200
  style: [$.value, {
199
201
  backgroundColor: B.value
200
202
  }],
201
203
  ref: J,
202
204
  onClick: O
203
- }, t) : null, s(be, {}, {
204
- default: () => me(s("ul", {
205
+ }, t) : null, u(be, {}, {
206
+ default: () => me(u("ul", {
205
207
  role: "menu",
206
208
  class: [i.b(), i.m("inline")],
207
209
  style: j.value
208
210
  }, [V.default?.()]), [[de, c.value]])
209
211
  })])
210
212
  );
211
- return s("li", {
212
- class: [u.b(), u.is("active", d.value), u.e(String(r.level)), u.is("in-popup", r.level !== 0), u.is("opened", c.value), u.is("arrow", !0), u.is("disabled", o.disabled)],
213
+ return u("li", {
214
+ class: [a.b(), a.is("active", d.value), a.e(String(r.level)), a.is("in-popup", r.level !== 0), a.is("opened", c.value), a.is("arrow", !0), a.is("disabled", o.disabled)],
213
215
  role: "menuitem",
214
216
  ariaHaspopup: !0,
215
217
  ariaExpanded: c.value,
216
218
  onMouseenter: [_, (n) => v(n)],
217
219
  onMouseleave: [ee, (n) => T(n, !0)],
218
220
  onFocus: v
219
- }, [a]);
221
+ }, [s]);
220
222
  };
221
223
  }
222
224
  });
@@ -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
  };