vft 0.0.89 → 0.0.91

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 (240) hide show
  1. package/attributes.json +1 -1
  2. package/es/comp-resolver.js +20 -29
  3. package/es/components/affix/affix.vue2.js +34 -34
  4. package/es/components/alert/alert.vue2.js +44 -44
  5. package/es/components/avatar/avatar.vue2.js +28 -28
  6. package/es/components/backtop/backtop.vue2.js +11 -11
  7. package/es/components/button/button-group.vue2.js +8 -8
  8. package/es/components/button/button.vue2.js +39 -39
  9. package/es/components/card/card.vue2.js +20 -20
  10. package/es/components/check-tag/check-tag.vue2.js +14 -14
  11. package/es/components/checkbox/checkbox-button.vue2.js +61 -61
  12. package/es/components/checkbox/checkbox-group.vue2.js +27 -27
  13. package/es/components/checkbox/checkbox.vue2.js +81 -81
  14. package/es/components/clamp/clamp.vue2.js +59 -59
  15. package/es/components/clamp-toggle/clamp-toggle.vue2.js +25 -25
  16. package/es/components/col/col.vue2.js +33 -33
  17. package/es/components/color-picker/color-picker.vue2.js +126 -126
  18. package/es/components/color-picker/components/alpha-slider.vue2.js +12 -12
  19. package/es/components/config-provider/config-provider.vue2.js +29 -29
  20. package/es/components/container/aside.vue2.js +9 -9
  21. package/es/components/container/container.vue2.js +11 -11
  22. package/es/components/container/footer.vue2.js +8 -8
  23. package/es/components/container/header.vue2.js +9 -9
  24. package/es/components/context-menu/context-menu.vue2.js +29 -29
  25. package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +53 -53
  26. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +19 -19
  27. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +32 -32
  28. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +168 -168
  29. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +89 -89
  30. package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +38 -38
  31. package/es/components/descriptions/description-item.vue2.js +16 -16
  32. package/es/components/descriptions/description.vue2.js +54 -54
  33. package/es/components/descriptions/descriptions-row.vue2.js +24 -24
  34. package/es/components/dialog/dialog-content.vue2.js +30 -30
  35. package/es/components/dialog/dialog.vue2.js +64 -64
  36. package/es/components/divider/divider.vue2.js +20 -20
  37. package/es/components/dropdown/dropdown.vue.js +2 -127
  38. package/es/components/dropdown/dropdown.vue2.js +234 -181
  39. package/es/components/dropdown/index.js +10 -17
  40. package/es/components/dropdown/style/css.js +5 -0
  41. package/es/components/dropdown/style/index.js +5 -0
  42. package/es/components/dropdown/tokens.js +1 -1
  43. package/es/components/empty/empty.vue2.js +27 -27
  44. package/es/components/exception/exception.vue2.js +19 -19
  45. package/es/components/footer-layout/footer-layout.vue2.js +1 -1
  46. package/es/components/form/form-item.vue2.js +77 -77
  47. package/es/components/form/form.vue2.js +37 -37
  48. package/es/components/full-screen/full-screen.vue2.js +26 -15
  49. package/es/components/header-layout/header-layout.vue2.js +27 -27
  50. package/es/components/horizontal-menu/horizontal-menu.vue2.js +43 -43
  51. package/es/components/icon/icon.vue2.js +24 -24
  52. package/es/components/icon-text/icon-text.vue2.js +27 -27
  53. package/es/components/iframe-layout/iframe-layout.vue2.js +18 -18
  54. package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
  55. package/es/components/image/image.vue2.js +73 -73
  56. package/es/components/image-viewer/image-viewer.vue2.js +109 -109
  57. package/es/components/index.js +145 -150
  58. package/es/components/input/input.vue2.js +175 -175
  59. package/es/components/link/link.vue2.js +27 -27
  60. package/es/components/list-cell/list-cell.vue2.js +8 -8
  61. package/es/components/logo/logo.vue2.js +27 -27
  62. package/es/components/md-container/md-container.vue2.js +1 -1
  63. package/es/components/md-vue-playground/md-vue-playground.vue2.js +16 -16
  64. package/es/components/menu/menu-item-group.vue2.js +15 -15
  65. package/es/components/menu/menu-item.vue2.js +56 -56
  66. package/es/components/menu/menu.vue2.js +20 -20
  67. package/es/components/menu/sub-menu.vue2.js +16 -16
  68. package/es/components/message/message.vue2.js +81 -81
  69. package/es/components/multiple-tabs/multiple-tabs.vue2.js +12 -12
  70. package/es/components/multiple-tabs/tab-content.vue2.js +16 -16
  71. package/es/components/overlay/overlay.vue2.js +14 -14
  72. package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
  73. package/es/components/pagination/components/jumper.vue2.js +22 -22
  74. package/es/components/pagination/components/next.vue2.js +12 -12
  75. package/es/components/pagination/components/pager.vue2.js +75 -75
  76. package/es/components/pagination/components/prev.vue2.js +13 -13
  77. package/es/components/pagination/components/sizes.vue2.js +11 -11
  78. package/es/components/pagination/components/total.vue2.js +8 -8
  79. package/es/components/pagination/pagination.vue2.js +28 -28
  80. package/es/components/popconfirm/popconfirm.vue2.js +50 -50
  81. package/es/components/popover/popover.vue2.js +44 -44
  82. package/es/components/popper/arrow.vue2.js +2 -2
  83. package/es/components/popper/content.vue2.js +34 -34
  84. package/es/components/popper/popper.vue2.js +5 -5
  85. package/es/components/popper/trigger.vue2.js +48 -48
  86. package/es/components/qrcode/qrcode.vue2.js +35 -35
  87. package/es/components/radio/radio-button.vue2.js +28 -28
  88. package/es/components/radio/radio-group.vue2.js +26 -26
  89. package/es/components/radio/radio.vue2.js +44 -44
  90. package/es/components/result/result.vue2.js +10 -10
  91. package/es/components/router-view-content/router-view-content.vue2.js +20 -20
  92. package/es/components/row/row.vue2.js +19 -19
  93. package/es/components/scrollbar/bar.vue2.js +19 -19
  94. package/es/components/scrollbar/scrollbar.vue2.js +67 -67
  95. package/es/components/scrollbar/thumb.vue2.js +41 -41
  96. package/es/components/search/search.vue2.js +65 -65
  97. package/es/components/side-menu/side-menu.vue2.js +36 -36
  98. package/es/components/skeleton/skeleton-item.vue2.js +13 -13
  99. package/es/components/skeleton/skeleton.vue2.js +19 -19
  100. package/es/components/switch/switch.vue2.js +128 -128
  101. package/es/components/table/index.js +5 -3
  102. package/es/components/table/table.vue2.js +70 -70
  103. package/es/components/tabs/tab-bar.vue2.js +15 -15
  104. package/es/components/tabs/tab-nav.vue2.js +33 -33
  105. package/es/components/tabs/tab-pane.vue2.js +21 -21
  106. package/es/components/tabs/tabs.vue2.js +64 -66
  107. package/es/components/tag/tag.vue2.js +7 -7
  108. package/es/components/time-picker/common/picker.vue2.js +14 -14
  109. package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +60 -60
  110. package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +30 -30
  111. package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +57 -57
  112. package/es/components/time-select/time-select.vue2.js +29 -29
  113. package/es/components/tooltip/constants.js +1 -1
  114. package/es/components/tooltip/content.vue2.js +73 -73
  115. package/es/components/tooltip/tooltip.vue2.js +91 -91
  116. package/es/components/tooltip/trigger.vue2.js +33 -33
  117. package/es/components/verify-code/verify-code.vue2.js +25 -25
  118. package/es/index.js +208 -213
  119. package/es/package.json.js +1 -1
  120. package/lib/comp-resolver.cjs +1 -1
  121. package/lib/components/affix/affix.vue2.cjs +1 -1
  122. package/lib/components/alert/alert.vue2.cjs +1 -1
  123. package/lib/components/avatar/avatar.vue2.cjs +1 -1
  124. package/lib/components/backtop/backtop.vue2.cjs +1 -1
  125. package/lib/components/button/button-group.vue2.cjs +1 -1
  126. package/lib/components/button/button.vue2.cjs +1 -1
  127. package/lib/components/card/card.vue2.cjs +1 -1
  128. package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
  129. package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
  130. package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
  131. package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
  132. package/lib/components/clamp/clamp.vue2.cjs +1 -1
  133. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  134. package/lib/components/col/col.vue2.cjs +1 -1
  135. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  136. package/lib/components/color-picker/components/alpha-slider.vue2.cjs +1 -1
  137. package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
  138. package/lib/components/container/aside.vue2.cjs +1 -1
  139. package/lib/components/container/container.vue2.cjs +1 -1
  140. package/lib/components/container/footer.vue2.cjs +1 -1
  141. package/lib/components/container/header.vue2.cjs +1 -1
  142. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  143. package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -1
  144. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  145. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  146. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  147. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  148. package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
  149. package/lib/components/descriptions/description-item.vue2.cjs +1 -1
  150. package/lib/components/descriptions/description.vue2.cjs +1 -1
  151. package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
  152. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  153. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  154. package/lib/components/divider/divider.vue2.cjs +1 -1
  155. package/lib/components/dropdown/dropdown.vue.cjs +1 -1
  156. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  157. package/lib/components/dropdown/index.cjs +1 -1
  158. package/lib/components/dropdown/style/css.cjs +1 -1
  159. package/lib/components/dropdown/style/index.cjs +1 -1
  160. package/lib/components/dropdown/tokens.cjs +1 -1
  161. package/lib/components/empty/empty.vue2.cjs +1 -1
  162. package/lib/components/exception/exception.vue2.cjs +1 -1
  163. package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
  164. package/lib/components/form/form-item.vue2.cjs +1 -1
  165. package/lib/components/form/form.vue2.cjs +1 -1
  166. package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
  167. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  168. package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
  169. package/lib/components/icon/icon.vue2.cjs +1 -1
  170. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  171. package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
  172. package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
  173. package/lib/components/image/image.vue2.cjs +1 -1
  174. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  175. package/lib/components/index.cjs +1 -1
  176. package/lib/components/input/input.vue2.cjs +1 -1
  177. package/lib/components/link/link.vue2.cjs +1 -1
  178. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  179. package/lib/components/logo/logo.vue2.cjs +1 -1
  180. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  181. package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
  182. package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
  183. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  184. package/lib/components/menu/menu.vue2.cjs +1 -1
  185. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  186. package/lib/components/message/message.vue2.cjs +1 -1
  187. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  188. package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
  189. package/lib/components/overlay/overlay.vue2.cjs +1 -1
  190. package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
  191. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  192. package/lib/components/pagination/components/next.vue2.cjs +1 -1
  193. package/lib/components/pagination/components/pager.vue2.cjs +1 -1
  194. package/lib/components/pagination/components/prev.vue2.cjs +1 -1
  195. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  196. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  197. package/lib/components/pagination/pagination.vue2.cjs +1 -1
  198. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  199. package/lib/components/popover/popover.vue2.cjs +1 -1
  200. package/lib/components/popper/arrow.vue2.cjs +1 -1
  201. package/lib/components/popper/content.vue2.cjs +1 -1
  202. package/lib/components/popper/trigger.vue2.cjs +1 -1
  203. package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
  204. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  205. package/lib/components/radio/radio-group.vue2.cjs +1 -1
  206. package/lib/components/radio/radio.vue2.cjs +1 -1
  207. package/lib/components/result/result.vue2.cjs +1 -1
  208. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  209. package/lib/components/row/row.vue2.cjs +1 -1
  210. package/lib/components/scrollbar/bar.vue2.cjs +1 -1
  211. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  212. package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
  213. package/lib/components/search/search.vue2.cjs +1 -1
  214. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  215. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  216. package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
  217. package/lib/components/switch/switch.vue2.cjs +1 -1
  218. package/lib/components/table/index.cjs +1 -1
  219. package/lib/components/table/table.vue2.cjs +1 -1
  220. package/lib/components/tabs/tab-bar.vue2.cjs +1 -1
  221. package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
  222. package/lib/components/tabs/tab-pane.vue2.cjs +1 -1
  223. package/lib/components/tabs/tabs.vue2.cjs +1 -1
  224. package/lib/components/tag/tag.vue2.cjs +1 -1
  225. package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
  226. package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -1
  227. package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
  228. package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
  229. package/lib/components/time-select/time-select.vue2.cjs +1 -1
  230. package/lib/components/tooltip/constants.cjs +1 -1
  231. package/lib/components/tooltip/content.vue2.cjs +1 -1
  232. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  233. package/lib/components/tooltip/trigger.vue2.cjs +1 -1
  234. package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
  235. package/lib/index.cjs +1 -1
  236. package/lib/package.json.cjs +1 -1
  237. package/package.json +5 -5
  238. package/tags.json +1 -1
  239. package/web-types.json +1 -1
  240. package/theme-style/vft-back-top.css +0 -1
@@ -1,11 +1,11 @@
1
- import { defineComponent as k, ref as _, computed as m, openBlock as o, createElementBlock as a, normalizeStyle as z, unref as e, normalizeClass as c, Fragment as V, renderList as N, createElementVNode as u, createVNode as b, normalizeProps as d, guardReactiveProps as B, toDisplayString as D, createBlock as p, mergeProps as P } from "vue";
1
+ import { defineComponent as k, ref as _, computed as m, openBlock as o, createElementBlock as a, normalizeStyle as z, normalizeClass as c, unref as e, Fragment as V, renderList as N, createElementVNode as u, createVNode as b, normalizeProps as d, guardReactiveProps as B, toDisplayString as D, createBlock as p, mergeProps as P } from "vue";
2
2
  import { VftIcon as g } from "../icon/index.js";
3
3
  import { useNamespace as T } from "../../hooks/use-namespace/index.js";
4
4
  import "@popperjs/core";
5
5
  import "lodash";
6
6
  import "../../hooks/use-z-index/index.js";
7
7
  import "@vueuse/core";
8
- import { singleAttrToObj as h, addUnit as v, VNode as E } from "@vft/utils";
8
+ import { singleAttrToObj as v, addUnit as h, VNode as E } from "@vft/utils";
9
9
  import { generateCssVars as H } from "../../utils/ns-cover.js";
10
10
  const S = ["onClick"], l = (
11
11
  /* hoist-static*/
@@ -18,25 +18,25 @@ const S = ["onClick"], l = (
18
18
  list: { default: [] },
19
19
  cellHeight: { default: 50 },
20
20
  leftTextDistance: { default: 8 },
21
- activeIndex: null
21
+ activeIndex: {}
22
22
  },
23
23
  emits: ["item-click"],
24
24
  setup(r, { emit: I }) {
25
- const f = _(r.activeIndex), C = m(() => r.list.map((t) => (t.leftIcon = h(t.leftIcon, "icon", { size: 16 }), t.rightIcon = h(t.rightIcon, "icon", {
25
+ const f = _(r.activeIndex), C = m(() => r.list.map((t) => (t.leftIcon = v(t.leftIcon, "icon", { size: 16 }), t.rightIcon = v(t.rightIcon, "icon", {
26
26
  icon: "ico-ep:arrow-right",
27
27
  size: 16
28
28
  }), t))), x = m(() => H({
29
- height: v(r.cellHeight),
30
- "left-text-distance": v(r.leftTextDistance)
29
+ height: h(r.cellHeight),
30
+ "left-text-distance": h(r.leftTextDistance)
31
31
  }, "list-cell"));
32
32
  function y(t, i) {
33
33
  f.value = i, I("item-click", t, i);
34
34
  }
35
35
  return (t, i) => (o(), a("div", {
36
- style: z(e(x)),
36
+ style: z(x.value),
37
37
  class: c(e(l).b())
38
38
  }, [
39
- (o(!0), a(V, null, N(e(C), (n, s) => (o(), a("div", {
39
+ (o(!0), a(V, null, N(C.value, (n, s) => (o(), a("div", {
40
40
  onClick: (w) => y(n, s),
41
41
  key: s,
42
42
  class: c([e(l).e("item"), e(l).is("active", f.value === s)])
@@ -1,43 +1,43 @@
1
- import { defineComponent as s, computed as l, getCurrentInstance as p, openBlock as g, createElementBlock as f, normalizeClass as n, unref as e, normalizeStyle as d, createElementVNode as r, toDisplayString as C } from "vue";
2
- import { useRouterHelper as h } from "@vft/router";
3
- import { useNamespace as k } from "../../hooks/use-namespace/index.js";
1
+ import { defineComponent as a, computed as r, getCurrentInstance as g, openBlock as f, createElementBlock as d, normalizeClass as e, normalizeStyle as C, createElementVNode as s, unref as l, toDisplayString as h } from "vue";
2
+ import { useRouterHelper as k } from "@vft/router";
3
+ import { useNamespace as P } from "../../hooks/use-namespace/index.js";
4
4
  import "@popperjs/core";
5
5
  import "lodash";
6
6
  import "../../hooks/use-z-index/index.js";
7
7
  import "@vueuse/core";
8
8
  import "@vft/utils";
9
9
  import "../../utils/ns-cover.js";
10
- const P = ["src"], o = (
10
+ const _ = ["src"], t = (
11
11
  /* hoist-static*/
12
- k("logo")
13
- ), j = s({
14
- name: o.b()
15
- }), D = /* @__PURE__ */ s({
12
+ P("logo")
13
+ ), j = a({
14
+ name: t.b()
15
+ }), D = /* @__PURE__ */ a({
16
16
  ...j,
17
17
  props: {
18
- title: null,
19
- logo: null,
20
- jumpPath: null
18
+ title: {},
19
+ logo: {},
20
+ jumpPath: {}
21
21
  },
22
- setup(t) {
23
- const c = l(() => [o.b()]), i = p().appContext.config.globalProperties.$router, { go: a } = h(i);
24
- function m() {
25
- t.jumpPath && a(t.jumpPath);
22
+ setup(o) {
23
+ const c = r(() => [t.b()]), i = g().appContext.config.globalProperties.$router, { go: m } = k(i);
24
+ function u() {
25
+ o.jumpPath && m(o.jumpPath);
26
26
  }
27
- const u = l(() => t.jumpPath ? {} : o.cssVarBlock({ cursor: "inital" }));
28
- return (x, y) => (g(), f("div", {
29
- class: n(e(c)),
30
- onClick: m,
31
- style: d(e(u))
27
+ const p = r(() => o.jumpPath ? {} : t.cssVarBlock({ cursor: "inital" }));
28
+ return (n, b) => (f(), d("div", {
29
+ class: e(c.value),
30
+ onClick: u,
31
+ style: C(p.value)
32
32
  }, [
33
- r("img", {
34
- class: n(e(o).e("img")),
35
- src: t.logo,
33
+ s("img", {
34
+ class: e(l(t).e("img")),
35
+ src: n.logo,
36
36
  alt: ""
37
- }, null, 10, P),
38
- r("div", {
39
- class: n(["ml-2 truncate", e(o).e("title")])
40
- }, C(t.title), 3)
37
+ }, null, 10, _),
38
+ s("div", {
39
+ class: e(["ml-2 truncate", l(t).e("title")])
40
+ }, h(n.title), 3)
41
41
  ], 6));
42
42
  }
43
43
  });
@@ -133,7 +133,7 @@ const pt = { class: "info-container" }, st = {
133
133
  return (e, p) => {
134
134
  var o, d, f, g, h, _;
135
135
  return s(), l("div", {
136
- class: a([t(r).b(), t(r).is("api", t(A))])
136
+ class: a([t(r).b(), t(r).is("api", A.value)])
137
137
  }, [
138
138
  (o = n.value) != null && o.sideData ? (s(), x(t(et), {
139
139
  key: 0,
@@ -1,4 +1,4 @@
1
- import { defineComponent as u, ref as s, shallowRef as v, computed as m, onMounted as f, createVNode as e, withDirectives as w, h as g, resolveDirective as h } from "vue";
1
+ import { defineComponent as r, ref as i, shallowRef as v, computed as m, onMounted as f, createVNode as e, withDirectives as w, h as g, resolveDirective as h } from "vue";
2
2
  import { useNamespace as V } from "../../hooks/use-namespace/index.js";
3
3
  import "@popperjs/core";
4
4
  import "lodash";
@@ -8,33 +8,33 @@ import "@vft/utils";
8
8
  import "../../utils/ns-cover.js";
9
9
  import { getVuePlaygroundSettings as C } from "./playground.js";
10
10
  import { VftIcon as R } from "../icon/index.js";
11
- const r = (
11
+ const u = (
12
12
  /* hoist-static*/
13
13
  V("md-vue-playground")
14
- ), y = u({
15
- name: r.b()
16
- }), M = /* @__PURE__ */ u({
14
+ ), y = r({
15
+ name: u.b()
16
+ }), M = /* @__PURE__ */ r({
17
17
  ...y,
18
18
  props: {
19
- title: null,
20
- files: null,
21
- settings: null
19
+ title: {},
20
+ files: {},
21
+ settings: {}
22
22
  },
23
23
  setup(t) {
24
- const i = s(!0), n = v(), a = s(), o = m(() => C(t.settings)), l = s(o.value.showCode || !1), c = async () => {
24
+ const n = i(!0), a = v(), s = i(), o = m(() => C(t.settings)), l = i(o.value.showCode || !1), c = async () => {
25
25
  const {
26
26
  ReplStore: p,
27
27
  Repl: d
28
28
  } = await import("@vue/repl");
29
- n.value = d, a.value = new p({
29
+ a.value = d, s.value = new p({
30
30
  serializedState: decodeURIComponent(t.files),
31
31
  showOutput: !0
32
- }), o.value.vueVersion && await a.value.setVueVersion(o.value.vueVersion);
32
+ }), o.value.vueVersion && await s.value.setVueVersion(o.value.vueVersion);
33
33
  };
34
34
  return f(async () => {
35
- await c(), i.value = !1;
35
+ await c(), n.value = !1;
36
36
  }), () => e("div", {
37
- class: r.b()
37
+ class: u.b()
38
38
  }, [e("div", {
39
39
  class: "title-wrapper"
40
40
  }, [t.title ? e("div", {
@@ -48,10 +48,10 @@ const r = (
48
48
  }
49
49
  }, null)]), w(e("div", {
50
50
  class: ["repl-container", l.value ? "show-code" : "hide-code"]
51
- }, [n.value ? g(n.value, {
52
- store: a.value,
51
+ }, [a.value ? g(a.value, {
52
+ store: s.value,
53
53
  ...o.value
54
- }) : null]), [[h("loading"), i.value]])]);
54
+ }) : null]), [[h("loading"), n.value]])]);
55
55
  }
56
56
  });
57
57
  export {
@@ -1,5 +1,5 @@
1
- import { defineComponent as m, openBlock as o, createElementBlock as l, normalizeClass as r, unref as s, createElementVNode as n, Fragment as p, createTextVNode as u, toDisplayString as c, renderSlot as i } from "vue";
2
- import { useNamespace as d } from "../../hooks/use-namespace/index.js";
1
+ import { defineComponent as m, openBlock as o, createElementBlock as r, normalizeClass as l, unref as s, createElementVNode as i, Fragment as p, createTextVNode as a, toDisplayString as u, renderSlot as n } from "vue";
2
+ import { useNamespace as c } from "../../hooks/use-namespace/index.js";
3
3
  import "@popperjs/core";
4
4
  import "lodash";
5
5
  import "../../hooks/use-z-index/index.js";
@@ -8,27 +8,27 @@ import "@vft/utils";
8
8
  import "../../utils/ns-cover.js";
9
9
  const t = (
10
10
  /* hoist-static*/
11
- d("menu-item-group")
12
- ), f = m({
11
+ c("menu-item-group")
12
+ ), d = m({
13
13
  name: t.b()
14
14
  }), E = /* @__PURE__ */ m({
15
- ...f,
15
+ ...d,
16
16
  props: {
17
- title: null
17
+ title: {}
18
18
  },
19
- setup(a) {
20
- return (e, _) => (o(), l("li", {
21
- class: r(s(t).b())
19
+ setup(f) {
20
+ return (e, _) => (o(), r("li", {
21
+ class: l(s(t).b())
22
22
  }, [
23
- n("div", {
24
- class: r(s(t).e("title"))
23
+ i("div", {
24
+ class: l(s(t).e("title"))
25
25
  }, [
26
- e.$slots.title ? i(e.$slots, "title", { key: 1 }) : (o(), l(p, { key: 0 }, [
27
- u(c(a.title), 1)
26
+ e.$slots.title ? n(e.$slots, "title", { key: 1 }) : (o(), r(p, { key: 0 }, [
27
+ a(u(e.title), 1)
28
28
  ], 64))
29
29
  ], 2),
30
- n("ul", null, [
31
- i(e.$slots, "default")
30
+ i("ul", null, [
31
+ n(e.$slots, "default")
32
32
  ])
33
33
  ], 2));
34
34
  }
@@ -1,14 +1,14 @@
1
- import { defineComponent as Y, getCurrentInstance as G, useAttrs as H, inject as M, computed as u, reactive as J, onMounted as K, onBeforeUnmount as L, openBlock as o, createElementBlock as k, Fragment as b, createBlock as l, unref as e, createCommentVNode as c, createElementVNode as y, normalizeClass as A, withCtx as P, renderSlot as x, normalizeProps as E, mergeProps as S, createVNode as Q } from "vue";
1
+ import { defineComponent as Y, getCurrentInstance as G, useAttrs as H, inject as P, computed as u, reactive as J, onMounted as K, onBeforeUnmount as L, openBlock as r, createElementBlock as k, Fragment as b, createBlock as l, unref as o, createCommentVNode as d, createElementVNode as y, normalizeClass as A, withCtx as E, renderSlot as g, normalizeProps as S, mergeProps as T, createVNode as Q } from "vue";
2
2
  import { singleAttrToObj as R, renderTNode as W, VNode as X } from "@vft/utils";
3
- import { throwError as T } from "../../utils/error.js";
3
+ import { throwError as w } from "../../utils/error.js";
4
4
  import "lodash";
5
5
  import "@vueuse/core";
6
6
  import "../../utils/ns-cover.js";
7
- import { useNamespace as g } from "../../hooks/use-namespace/index.js";
7
+ import { useNamespace as U } from "../../hooks/use-namespace/index.js";
8
8
  import "@popperjs/core";
9
9
  import "../../hooks/use-z-index/index.js";
10
10
  import Z from "./use-menu.js";
11
- import { VftDivider as w } from "../divider/index.js";
11
+ import { VftDivider as x } from "../divider/index.js";
12
12
  import { VftIcon as z } from "../icon/index.js";
13
13
  import "../avatar/index.js";
14
14
  import "../empty/index.js";
@@ -86,108 +86,108 @@ import "../md-vue-playground/index.js";
86
86
  import "../md-code-demo/index.js";
87
87
  import "../md-code-tabs/index.js";
88
88
  import "../message/index.js";
89
- const tt = ["title"], d = (
89
+ const ee = ["title"], c = (
90
90
  /* hoist-static*/
91
- g("menu-item")
92
- ), et = Y({
93
- name: d.b(),
91
+ U("menu-item")
92
+ ), te = Y({
93
+ name: c.b(),
94
94
  inheritAttrs: !1
95
- }), we = /* @__PURE__ */ Y({
96
- ...et,
95
+ }), xt = /* @__PURE__ */ Y({
96
+ ...te,
97
97
  props: {
98
- index: null,
99
- route: null,
98
+ index: {},
99
+ route: {},
100
100
  disabled: { type: Boolean },
101
- icon: null,
102
- title: null,
101
+ icon: {},
102
+ title: {},
103
103
  isAloneUse: { type: Boolean },
104
104
  divider: { type: Boolean },
105
- className: null,
105
+ className: {},
106
106
  reverse: { type: Boolean }
107
107
  },
108
108
  emits: ["click", "mouseenter", "mouseleave"],
109
109
  setup(t, { emit: f }) {
110
- const U = G(), D = H(), F = g("menu"), v = g("menu-item"), i = t.isAloneUse ? null : M("rootMenu");
111
- !i && !t.isAloneUse && T(d.b(), "can not inject root menu");
112
- const { parentMenu: B, indexPath: C } = Z(U, u(() => t.index)), r = t.isAloneUse ? null : M(`subMenu:${B.value.uid}`);
113
- !r && !t.isAloneUse && T(d.b(), "can not inject sub menu");
114
- const N = u(() => t.index === (i == null ? void 0 : i.activeIndex)), m = J({
110
+ const B = G(), D = H(), F = U("menu"), v = U("menu-item"), e = t.isAloneUse ? null : P("rootMenu");
111
+ !e && !t.isAloneUse && w(c.b(), "can not inject root menu");
112
+ const { parentMenu: C, indexPath: N } = Z(B, u(() => t.index)), m = t.isAloneUse ? null : P(`subMenu:${C.value.uid}`);
113
+ !m && !t.isAloneUse && w(c.b(), "can not inject sub menu");
114
+ const $ = u(() => t.index === (e == null ? void 0 : e.activeIndex)), n = J({
115
115
  index: t.index,
116
- indexPath: C,
117
- active: N
116
+ indexPath: N,
117
+ active: $
118
118
  }), O = () => {
119
- t.disabled || (i == null || i.handleMenuItemClick({
119
+ t.disabled || (e == null || e.handleMenuItemClick({
120
120
  ...D,
121
121
  index: t.index,
122
- indexPath: C.value,
122
+ indexPath: N.value,
123
123
  route: t.route
124
- }), f("click", m));
125
- }, s = u(() => R(t.icon, "icon")), q = u(() => W(U, "title"));
124
+ }), f("click", n));
125
+ }, p = u(() => R(t.icon, "icon")), q = u(() => W(B, "title"));
126
126
  return K(() => {
127
- t.isAloneUse || (r == null || r.addSubMenu(m), i == null || i.addMenuItem(m));
127
+ t.isAloneUse || (m == null || m.addSubMenu(n), e == null || e.addMenuItem(n));
128
128
  }), L(() => {
129
- t.isAloneUse || (r == null || r.removeSubMenu(m), i == null || i.removeMenuItem(m));
130
- }), (n, p) => {
131
- var $, I, V, h, j;
132
- return o(), k(b, null, [
133
- t.reverse && t.divider ? (o(), l(e(w), {
129
+ t.isAloneUse || (m == null || m.removeSubMenu(n), e == null || e.removeMenuItem(n));
130
+ }), (i, s) => {
131
+ var I, V, h, j, M;
132
+ return r(), k(b, null, [
133
+ i.reverse && i.divider ? (r(), l(o(x), {
134
134
  key: 0,
135
135
  marginY: "0"
136
- })) : c("", !0),
136
+ })) : d("", !0),
137
137
  y("li", {
138
138
  class: A([
139
- t.className,
140
- e(v).b(),
141
- e(v).is("active", t.isAloneUse ? !1 : e(N)),
142
- e(v).is("disabled", t.disabled)
139
+ i.className,
140
+ o(v).b(),
141
+ o(v).is("active", i.isAloneUse ? !1 : $.value),
142
+ o(v).is("disabled", i.disabled)
143
143
  ]),
144
- onMouseenter: p[0] || (p[0] = (a) => f("mouseenter")),
145
- onMouseleave: p[1] || (p[1] = (a) => f("mouseleave")),
144
+ onMouseenter: s[0] || (s[0] = (a) => f("mouseenter")),
145
+ onMouseleave: s[1] || (s[1] = (a) => f("mouseleave")),
146
146
  role: "menuitem",
147
147
  tabindex: "-1",
148
148
  onClick: O
149
149
  }, [
150
- ((I = ($ = e(B)) == null ? void 0 : $.type) == null ? void 0 : I.name) === "vft-menu" && ((V = e(i)) != null && V.props.collapse) && n.$slots.title ? (o(), l(e(_), {
150
+ ((V = (I = o(C)) == null ? void 0 : I.type) == null ? void 0 : V.name) === "vft-menu" && ((h = o(e)) != null && h.props.collapse) && i.$slots.title ? (r(), l(o(_), {
151
151
  key: 0,
152
152
  placement: "right",
153
153
  "fallback-placements": ["left"],
154
154
  persistent: ""
155
155
  }, {
156
- content: P(() => [
157
- x(n.$slots, "title")
156
+ content: E(() => [
157
+ g(i.$slots, "title")
158
158
  ]),
159
- default: P(() => {
159
+ default: E(() => {
160
160
  var a;
161
161
  return [
162
162
  y("div", {
163
- class: A(e(F).be("tooltip", "trigger"))
163
+ class: A(o(F).be("tooltip", "trigger"))
164
164
  }, [
165
- (a = e(s)) != null && a.icon ? (o(), l(e(z), E(S({ key: 0 }, e(s))), null, 16)) : c("", !0),
166
- x(n.$slots, "default")
165
+ (a = p.value) != null && a.icon ? (r(), l(o(z), S(T({ key: 0 }, p.value)), null, 16)) : d("", !0),
166
+ g(i.$slots, "default")
167
167
  ], 2)
168
168
  ];
169
169
  }),
170
170
  _: 3
171
- })) : (o(), k(b, { key: 1 }, [
172
- (h = n.$slots) != null && h.default ? x(n.$slots, "default", { key: 0 }) : (o(), k(b, { key: 1 }, [
173
- (j = e(s)) != null && j.icon ? (o(), l(e(z), E(S({ key: 0 }, e(s))), null, 16)) : c("", !0),
171
+ })) : (r(), k(b, { key: 1 }, [
172
+ (j = i.$slots) != null && j.default ? g(i.$slots, "default", { key: 0 }) : (r(), k(b, { key: 1 }, [
173
+ (M = p.value) != null && M.icon ? (r(), l(o(z), S(T({ key: 0 }, p.value)), null, 16)) : d("", !0),
174
174
  y("span", {
175
- class: A(e(d).e("text")),
176
- title: t.title
175
+ class: A(o(c).e("text")),
176
+ title: i.title
177
177
  }, [
178
- Q(e(X), { content: e(q) }, null, 8, ["content"])
179
- ], 10, tt)
178
+ Q(o(X), { content: q.value }, null, 8, ["content"])
179
+ ], 10, ee)
180
180
  ], 64))
181
181
  ], 64))
182
182
  ], 34),
183
- !t.reverse && t.divider ? (o(), l(e(w), {
183
+ !i.reverse && i.divider ? (r(), l(o(x), {
184
184
  key: 1,
185
185
  marginY: "0"
186
- })) : c("", !0)
186
+ })) : d("", !0)
187
187
  ], 64);
188
188
  };
189
189
  }
190
190
  });
191
191
  export {
192
- we as default
192
+ xt as default
193
193
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as E, useSlots as X, getCurrentInstance as Y, ref as i, computed as Z, watch as O, watchEffect as _, provide as A, reactive as ee, onMounted as te, h as I, nextTick as ne } from "vue";
1
+ import { defineComponent as E, useSlots as X, getCurrentInstance as Y, ref as s, computed as Z, watch as O, watchEffect as _, provide as A, reactive as ee, onMounted as te, h as I, nextTick as ne } from "vue";
2
2
  import { useResizeObserver as le } from "@vueuse/core";
3
3
  import { isNullOrUndefined as B } from "@vft/utils";
4
4
  import { flattedChildren as oe } from "../../utils/vue/vnode.js";
@@ -9,8 +9,8 @@ import "@popperjs/core";
9
9
  import "../../hooks/use-z-index/index.js";
10
10
  import ue from "./utils/menu-bar.js";
11
11
  import ae from "./menu-collapse-transition.vue.js";
12
- import ie from "./sub-menu.vue2.js";
13
- import { useMenuCssVar as se } from "./use-menu-css-var.js";
12
+ import se from "./sub-menu.vue2.js";
13
+ import { useMenuCssVar as ie } from "./use-menu-css-var.js";
14
14
  import { VftIcon as ce } from "../icon/index.js";
15
15
  const M = (
16
16
  /* hoist-static*/
@@ -32,9 +32,9 @@ const M = (
32
32
  },
33
33
  emits: ["update:collapse", "select", "close", "open"],
34
34
  setup(n, { expose: V, emit: b }) {
35
- const y = X(), v = Y(), T = v.appContext.config.globalProperties.$router, s = i(), z = W("sub-menu"), f = i(-1), u = i(
35
+ const y = X(), v = Y(), T = v.appContext.config.globalProperties.$router, i = s(), z = W("sub-menu"), f = s(-1), u = s(
36
36
  n.defaultOpeneds && !n.collapse ? n.defaultOpeneds.slice(0) : []
37
- ), a = i(n.defaultActive), r = i({}), h = i({}), $ = Z(() => n.mode === "horizontal" || n.mode === "vertical" && n.collapse), q = () => {
37
+ ), a = s(n.defaultActive), r = s({}), h = s({}), $ = Z(() => n.mode === "horizontal" || n.mode === "vertical" && n.collapse), q = () => {
38
38
  const e = a.value && r.value[a.value];
39
39
  if (!e || n.mode === "horizontal" || n.collapse)
40
40
  return;
@@ -63,14 +63,14 @@ const M = (
63
63
  l ? a.value = l.index : a.value = e;
64
64
  }, U = () => {
65
65
  var d;
66
- if (!s.value)
66
+ if (!i.value)
67
67
  return -1;
68
- const e = Array.from(((d = s.value) == null ? void 0 : d.childNodes) ?? []).filter(
69
- (x) => x.nodeName !== "#text" || x.nodeValue
70
- ), t = 64, l = Number.parseInt(getComputedStyle(s.value).paddingLeft, 10), o = Number.parseInt(getComputedStyle(s.value).paddingRight, 10), m = s.value.clientWidth - l - o;
68
+ const e = Array.from(((d = i.value) == null ? void 0 : d.childNodes) ?? []).filter(
69
+ (S) => S.nodeName !== "#text" || S.nodeValue
70
+ ), t = 64, l = Number.parseInt(getComputedStyle(i.value).paddingLeft, 10), o = Number.parseInt(getComputedStyle(i.value).paddingRight, 10), m = i.value.clientWidth - l - o;
71
71
  let c = 0, p = 0;
72
- return e.forEach((x, Q) => {
73
- c += x.offsetWidth || 0, c <= m - t && (p = Q + 1);
72
+ return e.forEach((S, Q) => {
73
+ c += S.offsetWidth || 0, c <= m - t && (p = Q + 1);
74
74
  }), p === e.length ? -1 : p;
75
75
  }, j = (e, t = 33.34) => {
76
76
  let l;
@@ -100,9 +100,9 @@ const M = (
100
100
  e && (u.value = []);
101
101
  }
102
102
  ), O(r.value, q);
103
- let S;
103
+ let x;
104
104
  _(() => {
105
- n.mode === "horizontal" && n.ellipsis ? S = le(s, P).stop : S == null || S();
105
+ n.mode === "horizontal" && n.ellipsis ? x = le(i, P).stop : x == null || x();
106
106
  });
107
107
  const R = (e) => {
108
108
  h.value[e.index] = e;
@@ -112,7 +112,7 @@ const M = (
112
112
  r.value[e.index] = e;
113
113
  }, H = (e) => {
114
114
  delete r.value[e.index];
115
- }, w = i(!1), J = i(), K = i();
115
+ }, w = s(!1), J = s(), K = s();
116
116
  return A(
117
117
  "rootMenu",
118
118
  ee({
@@ -137,7 +137,7 @@ const M = (
137
137
  ), A(`subMenu:${v.uid}`, {
138
138
  addSubMenu: R,
139
139
  removeSubMenu: k,
140
- mouseInChild: i(!1),
140
+ mouseInChild: s(!1),
141
141
  // 表示当前是第一级的 sub-menu
142
142
  level: 0
143
143
  }), te(() => {
@@ -149,20 +149,20 @@ const M = (
149
149
  },
150
150
  close: C,
151
151
  handleResize: P,
152
- menu: s,
152
+ menu: i,
153
153
  inSubMenu: w
154
154
  }), () => {
155
155
  var m;
156
156
  let e = ((m = y.default) == null ? void 0 : m.call(y)) ?? [];
157
157
  const t = [];
158
- if (n.mode === "horizontal" && s.value) {
158
+ if (n.mode === "horizontal" && i.value) {
159
159
  const c = oe(e), p = f.value === -1 ? c : c.slice(
160
160
  0,
161
161
  f.value
162
162
  ), d = f.value === -1 ? [] : c.slice(f.value);
163
163
  d != null && d.length && n.ellipsis && (e = p, t.push(
164
164
  I(
165
- ie,
165
+ se,
166
166
  {
167
167
  index: "sub-menu-more",
168
168
  class: z.e("hide-arrow")
@@ -180,12 +180,12 @@ const M = (
180
180
  )
181
181
  ));
182
182
  }
183
- const l = se(v.props, 0), o = I(
183
+ const l = ie(v.props, 0), o = I(
184
184
  "ul",
185
185
  {
186
186
  key: String(n.collapse),
187
187
  role: "menubar",
188
- ref: s,
188
+ ref: i,
189
189
  style: l.value,
190
190
  class: {
191
191
  [M.b()]: !0,