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,36 +1,36 @@
1
- import { defineComponent as $, getCurrentInstance as S, inject as C, ref as g, watch as N, nextTick as R, computed as k, openBlock as B, createElementBlock as F, normalizeClass as P, unref as p, normalizeStyle as T } from "vue";
1
+ import { defineComponent as $, getCurrentInstance as S, inject as C, ref as y, watch as N, nextTick as R, computed as k, openBlock as B, createElementBlock as F, normalizeClass as P, unref as g, normalizeStyle as T } from "vue";
2
2
  import { TabsRootContextKey as L } from "./types.js";
3
3
  import { useNamespace as j } 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 { useResizeObserver as D } from "@vueuse/core";
8
- import { capitalize as c } from "@vft/utils";
8
+ import { capitalize as p } from "@vft/utils";
9
9
  import "../../utils/ns-cover.js";
10
10
  const M = /* @__PURE__ */ $({
11
11
  __name: "tab-bar",
12
12
  props: {
13
- tabs: null
13
+ tabs: {}
14
14
  },
15
15
  setup(h, { expose: x }) {
16
- const s = h, _ = S(), l = C(L), m = j("tabs"), a = g(), f = g(), v = () => {
16
+ const s = h, v = S(), c = C(L), l = j("tabs"), a = y(), m = y(), _ = () => {
17
17
  let t = 0, e = 0;
18
- const o = ["top", "bottom"].includes(l.props.tabPosition) ? "width" : "height", u = o === "width" ? "x" : "y", z = u === "x" ? "left" : "top";
19
- return s.tabs.every((b) => {
20
- var d, y;
21
- const r = (y = (d = _.parent) == null ? void 0 : d.refs) == null ? void 0 : y[`tab-${b.uid}`];
18
+ const o = ["top", "bottom"].includes(c.props.tabPosition) ? "width" : "height", f = o === "width" ? "x" : "y", z = f === "x" ? "left" : "top";
19
+ return s.tabs.every((u) => {
20
+ var b, d;
21
+ const r = (d = (b = v.parent) == null ? void 0 : b.refs) == null ? void 0 : d[`tab-${u.uid}`];
22
22
  if (!r)
23
23
  return !1;
24
- if (!b.active)
24
+ if (!u.active)
25
25
  return !0;
26
- t = r[`offset${c(z)}`], e = r[`client${c(o)}`];
26
+ t = r[`offset${p(z)}`], e = r[`client${p(o)}`];
27
27
  const i = window.getComputedStyle(r);
28
28
  return o === "width" && (s.tabs.length > 1 && (e -= Number.parseFloat(i.paddingLeft) + Number.parseFloat(i.paddingRight)), t += Number.parseFloat(i.paddingLeft)), !1;
29
29
  }), {
30
30
  [o]: `${e}px`,
31
- transform: `translate${c(u)}(${t}px)`
31
+ transform: `translate${p(f)}(${t}px)`
32
32
  };
33
- }, n = () => f.value = v();
33
+ }, n = () => m.value = _();
34
34
  N(
35
35
  () => s.tabs,
36
36
  async () => {
@@ -38,15 +38,15 @@ const M = /* @__PURE__ */ $({
38
38
  },
39
39
  { immediate: !0 }
40
40
  );
41
- const w = k(() => l.props.tabPosition);
41
+ const w = k(() => c.props.tabPosition);
42
42
  return D(a, () => n()), x({
43
43
  ref: a,
44
44
  update: n
45
45
  }), (t, e) => (B(), F("div", {
46
46
  ref_key: "barRef",
47
47
  ref: a,
48
- class: P([p(m).e("active-bar"), p(m).is(p(w))]),
49
- style: T(f.value)
48
+ class: P([g(l).e("active-bar"), g(l).is(w.value)]),
49
+ style: T(m.value)
50
50
  }, null, 6));
51
51
  }
52
52
  });
@@ -1,8 +1,8 @@
1
- import { defineComponent as E, getCurrentInstance as Z, inject as _, ref as g, computed as I, watch as O, onMounted as tt, onUpdated as ot, createVNode as s, nextTick as et } from "vue";
1
+ import { defineComponent as E, getCurrentInstance as Z, inject as _, ref as g, computed as I, watch as O, onMounted as tt, onUpdated as ot, createVNode as l, nextTick as et } from "vue";
2
2
  import { capitalize as $ } from "@vft/utils";
3
3
  import { throwError as it } from "../../utils/error.js";
4
4
  import "lodash";
5
- import { useDocumentVisibility as nt, useWindowFocus as rt, useResizeObserver as lt } from "@vueuse/core";
5
+ import { useDocumentVisibility as nt, useWindowFocus as rt, useResizeObserver as at } from "@vueuse/core";
6
6
  import "../../utils/ns-cover.js";
7
7
  import "../divider/index.js";
8
8
  import { VftIcon as B } from "../icon/index.js";
@@ -86,8 +86,8 @@ import { useNamespace as K } from "../../hooks/use-namespace/index.js";
86
86
  import "@popperjs/core";
87
87
  import "../../hooks/use-z-index/index.js";
88
88
  import { EVENT_CODE as T } from "@vft/constants";
89
- import { TabsRootContextKey as at } from "./types.js";
90
- import st from "./tab-bar.vue2.js";
89
+ import { TabsRootContextKey as st } from "./types.js";
90
+ import lt from "./tab-bar.vue2.js";
91
91
  const V = (
92
92
  /* hoist-static*/
93
93
  K("tab-nav")
@@ -96,7 +96,7 @@ const V = (
96
96
  }), Xo = /* @__PURE__ */ E({
97
97
  ...ct,
98
98
  props: {
99
- panes: null,
99
+ panes: {},
100
100
  editable: {
101
101
  type: Boolean
102
102
  },
@@ -110,10 +110,10 @@ const V = (
110
110
  type: Boolean,
111
111
  default: !1
112
112
  },
113
- closeIconCfg: null,
114
- addIconCfg: null,
115
- arrowLeftIconCfg: null,
116
- arrowRightIconCfg: null
113
+ closeIconCfg: {},
114
+ addIconCfg: {},
115
+ arrowLeftIconCfg: {},
116
+ arrowRightIconCfg: {}
117
117
  },
118
118
  emits: ["tabClick", "tabRemove", "tabAdd", "tabContextmenu"],
119
119
  setup(n, {
@@ -121,7 +121,7 @@ const V = (
121
121
  emit: h
122
122
  }) {
123
123
  var A;
124
- const M = Z(), d = _(at);
124
+ const M = Z(), d = _(st);
125
125
  d || it(V.b(), "<vft-tabs><tab-nav /></vft-tabs>");
126
126
  const e = K("tabs"), q = nt(), H = rt(), y = g(), v = g(), C = g(), m = g(!1), f = g(0), k = g(!1), x = g(!0), w = I(() => ["top", "bottom"].includes(d.props.tabPosition) ? "width" : "height"), W = I(() => ({
127
127
  transform: `translate${w.value === "width" ? "X" : "Y"}(-${f.value}px)`
@@ -143,9 +143,9 @@ const V = (
143
143
  const t = y.value.querySelector(".is-active");
144
144
  if (!t)
145
145
  return;
146
- const i = v.value, b = ["top", "bottom"].includes(d.props.tabPosition), a = t.getBoundingClientRect(), r = i.getBoundingClientRect(), u = b ? o.offsetWidth - r.width : o.offsetHeight - r.height, c = f.value;
147
- let l = c;
148
- b ? (a.left < r.left && (l = c - (r.left - a.left)), a.right > r.right && (l = c + a.right - r.right)) : (a.top < r.top && (l = c - (r.top - a.top)), a.bottom > r.bottom && (l = c + (a.bottom - r.bottom))), l = Math.max(l, 0), f.value = Math.min(l, u);
146
+ const i = v.value, b = ["top", "bottom"].includes(d.props.tabPosition), s = t.getBoundingClientRect(), r = i.getBoundingClientRect(), u = b ? o.offsetWidth - r.width : o.offsetHeight - r.height, c = f.value;
147
+ let a = c;
148
+ b ? (s.left < r.left && (a = c - (r.left - s.left)), s.right > r.right && (a = c + s.right - r.right)) : (s.top < r.top && (a = c - (r.top - s.top)), s.bottom > r.bottom && (a = c + (s.bottom - r.bottom))), a = Math.max(a, 0), f.value = Math.min(a, u);
149
149
  }, z = () => {
150
150
  if (!C.value || !v.value)
151
151
  return;
@@ -155,14 +155,14 @@ const V = (
155
155
  const t = o.code, {
156
156
  up: i,
157
157
  down: b,
158
- left: a,
158
+ left: s,
159
159
  right: r
160
160
  } = T;
161
- if (![i, b, a, r].includes(t))
161
+ if (![i, b, s, r].includes(t))
162
162
  return;
163
163
  const u = Array.from(o.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")), c = u.indexOf(o.target);
164
- let l;
165
- t === a || t === i ? c === 0 ? l = u.length - 1 : l = c - 1 : c < u.length - 1 ? l = c + 1 : l = 0, u[l].focus(), u[l].click(), P();
164
+ let a;
165
+ t === s || t === i ? c === 0 ? a = u.length - 1 : a = c - 1 : c < u.length - 1 ? a = c + 1 : a = 0, u[a].focus(), u[a].click(), P();
166
166
  }, P = () => {
167
167
  x.value && (k.value = !0);
168
168
  }, S = () => k.value = !1;
@@ -170,7 +170,7 @@ const V = (
170
170
  o === "hidden" ? x.value = !1 : o === "visible" && setTimeout(() => x.value = !0, 50);
171
171
  }), O(H, (o) => {
172
172
  o ? setTimeout(() => x.value = !0, 50) : x.value = !1;
173
- }), lt(y, z), tt(() => setTimeout(() => R(), 0)), ot(() => z()), D({
173
+ }), at(y, z), tt(() => setTimeout(() => R(), 0)), ot(() => z()), D({
174
174
  scrollToActiveTab: R,
175
175
  removeFocus: S
176
176
  }), O(() => n.panes, () => M.update(), {
@@ -178,26 +178,26 @@ const V = (
178
178
  });
179
179
  const Y = I(() => {
180
180
  var o, t;
181
- return m.value ? [s("span", {
181
+ return m.value ? [l("span", {
182
182
  class: [e.e("nav-prev"), e.is("disabled", !m.value.prev)],
183
183
  onClick: j
184
- }, [(o = n.arrowLeftIconCfg) != null && o.icon ? s(B, n.arrowLeftIconCfg, null) : null]), s("span", {
184
+ }, [(o = n.arrowLeftIconCfg) != null && o.icon ? l(B, n.arrowLeftIconCfg, null) : null]), l("span", {
185
185
  class: [e.e("nav-next"), e.is("disabled", !m.value.next)],
186
186
  onClick: U
187
- }, [(t = n.arrowRightIconCfg) != null && t.icon ? s(B, n.arrowRightIconCfg, null) : null])] : null;
187
+ }, [(t = n.arrowRightIconCfg) != null && t.icon ? l(B, n.arrowRightIconCfg, null) : null])] : null;
188
188
  }), G = I(() => {
189
189
  var o;
190
190
  return (o = n.panes) == null ? void 0 : o.map((t, i) => {
191
191
  var N, F, L;
192
- const b = t.uid, a = t.props.disabled, r = t.props.name ?? t.index ?? `${i}`, u = !a && (t.isClosable || n.editable);
192
+ const b = t.uid, s = t.props.disabled, r = t.props.name ?? t.index ?? `${i}`, u = !s && (t.isClosable || n.editable);
193
193
  t.index = `${i}`;
194
- const c = u ? s("span", {
194
+ const c = u ? l("span", {
195
195
  class: "is-icon-close",
196
196
  onClick: (p) => h("tabRemove", t, p)
197
- }, [(N = n.closeIconCfg) != null && N.icon ? s(B, n.closeIconCfg, null) : null]) : null, l = ((L = (F = t.slots).label) == null ? void 0 : L.call(F)) || t.props.label, Q = !a && t.active ? 0 : -1;
198
- return s("div", {
197
+ }, [(N = n.closeIconCfg) != null && N.icon ? l(B, n.closeIconCfg, null) : null]) : null, a = ((L = (F = t.slots).label) == null ? void 0 : L.call(F)) || t.props.label, Q = !s && t.active ? 0 : -1;
198
+ return l("div", {
199
199
  ref: `tab-${b}`,
200
- class: [e.e("item"), e.is(d.props.tabPosition), e.is("active", t.active), e.is("disabled", a), e.is("closable", u), e.is("focus", k.value)],
200
+ class: [e.e("item"), e.is(d.props.tabPosition), e.is("active", t.active), e.is("disabled", s), e.is("closable", u), e.is("focus", k.value)],
201
201
  id: `tab-${r}`,
202
202
  key: `tab-${b}`,
203
203
  "aria-controls": `pane-${r}`,
@@ -219,29 +219,29 @@ const V = (
219
219
  onKeydown: (p) => {
220
220
  u && (p.code === T.delete || p.code === T.backspace) && h("tabRemove", t, p);
221
221
  }
222
- }, [l, c]);
222
+ }, [a, c]);
223
223
  });
224
- }), J = n.editable || n.addable ? s("span", {
224
+ }), J = n.editable || n.addable ? l("span", {
225
225
  class: e.e("new-tab"),
226
226
  tabindex: "0",
227
227
  onClick: () => h("tabAdd"),
228
228
  onKeydown: (o) => {
229
229
  o.code === T.enter && h("tabAdd");
230
230
  }
231
- }, [(A = n.addIconCfg) != null && A.icon ? s(B, n.addIconCfg, null) : null]) : null;
232
- return () => s("div", {
231
+ }, [(A = n.addIconCfg) != null && A.icon ? l(B, n.addIconCfg, null) : null]) : null;
232
+ return () => l("div", {
233
233
  ref: y,
234
234
  class: [e.e("nav-wrap"), e.is("scrollable", !!m.value), e.is(d.props.tabPosition)]
235
- }, [Y.value, s("div", {
235
+ }, [Y.value, l("div", {
236
236
  class: e.e("nav-scroll"),
237
237
  ref: v
238
- }, [s("div", {
238
+ }, [l("div", {
239
239
  class: [e.e("nav"), e.is(d.props.tabPosition), e.is("stretch", n.stretch && ["top", "bottom"].includes(d.props.tabPosition))],
240
240
  ref: C,
241
241
  style: W.value,
242
242
  role: "tablist",
243
243
  onKeydown: X
244
- }, [n.showBar ? s(st, {
244
+ }, [n.showBar ? l(lt, {
245
245
  tabs: [...n.panes]
246
246
  }, null) : null, G.value]), J])]);
247
247
  }
@@ -1,4 +1,4 @@
1
- import { defineComponent as b, getCurrentInstance as y, useSlots as C, inject as B, ref as m, computed as d, watch as g, reactive as w, onMounted as N, onUnmounted as k, unref as t, withDirectives as x, openBlock as z, createElementBlock as R, normalizeClass as S, renderSlot as _, vShow as $, createCommentVNode as E } from "vue";
1
+ import { defineComponent as b, getCurrentInstance as y, useSlots as C, inject as B, ref as m, computed as d, watch as g, reactive as w, onMounted as N, onUnmounted as k, unref as o, withDirectives as x, openBlock as z, createElementBlock as R, normalizeClass as S, renderSlot as _, vShow as $, createCommentVNode as E } from "vue";
2
2
  import "@vft/utils";
3
3
  import { throwError as P } from "../../utils/error.js";
4
4
  import "lodash";
@@ -16,44 +16,44 @@ const I = ["id", "aria-hidden", "aria-labelledby"], i = (
16
16
  }), O = /* @__PURE__ */ b({
17
17
  ...K,
18
18
  props: {
19
- label: null,
20
- name: null,
19
+ label: {},
20
+ name: {},
21
21
  closable: { type: Boolean },
22
22
  disabled: { type: Boolean },
23
23
  lazy: { type: Boolean }
24
24
  },
25
- setup(o) {
26
- const n = y(), f = C(), a = B(j);
27
- a || P(i.b(), "usage: <vft-tabs><vft-tab-pane /></vft-tabs/>");
28
- const r = m(), v = d(() => o.closable || a.props.closable), e = p(() => a.currentName.value === (o.name ?? r.value)), c = m(e.value), l = d(() => o.name ?? r.value), h = p(() => !o.lazy || c.value || e.value);
29
- g(e, (s) => {
30
- s && (c.value = !0);
25
+ setup(a) {
26
+ const n = y(), v = C(), t = B(j);
27
+ t || P(i.b(), "usage: <vft-tabs><vft-tab-pane /></vft-tabs/>");
28
+ const r = m(), f = d(() => a.closable || t.props.closable), e = p(() => t.currentName.value === (a.name ?? r.value)), c = m(e.value), s = d(() => a.name ?? r.value), h = p(() => !a.lazy || c.value || e.value);
29
+ g(e, (l) => {
30
+ l && (c.value = !0);
31
31
  });
32
32
  const u = w({
33
33
  uid: n.uid,
34
- slots: f,
34
+ slots: v,
35
35
  props: n.props,
36
- paneName: l,
36
+ paneName: s,
37
37
  active: e,
38
38
  index: r,
39
- isClosable: v,
39
+ isClosable: f,
40
40
  attrs: n.attrs
41
41
  });
42
42
  return N(() => {
43
- a.registerPane(u);
43
+ t.registerPane(u);
44
44
  }), k(() => {
45
- a.unregisterPane(u.uid);
46
- }), (s, M) => t(h) ? x((z(), R("div", {
45
+ t.unregisterPane(u.uid);
46
+ }), (l, M) => o(h) ? x((z(), R("div", {
47
47
  key: 0,
48
- id: `pane-${t(l)}`,
49
- class: S(t(i).b()),
48
+ id: `pane-${s.value}`,
49
+ class: S(o(i).b()),
50
50
  role: "tabpanel",
51
- "aria-hidden": !t(e),
52
- "aria-labelledby": `tab-${t(l)}`
51
+ "aria-hidden": !o(e),
52
+ "aria-labelledby": `tab-${s.value}`
53
53
  }, [
54
- _(s.$slots, "default")
54
+ _(l.$slots, "default")
55
55
  ], 10, I)), [
56
- [$, t(e)]
56
+ [$, o(e)]
57
57
  ]) : E("", !0);
58
58
  }
59
59
  });
@@ -1,21 +1,21 @@
1
- import { defineComponent as w, getCurrentInstance as g, useSlots as M, ref as h, watch as p, nextTick as D, computed as l, createVNode as s, provide as F } from "vue";
2
- import { useNamespace as O } from "../../hooks/use-namespace/index.js";
1
+ import { defineComponent as w, getCurrentInstance as g, useSlots as M, ref as h, watch as p, nextTick as D, computed as d, createVNode as l, provide as O } from "vue";
2
+ import { useNamespace as U } from "../../hooks/use-namespace/index.js";
3
3
  import "@popperjs/core";
4
4
  import "lodash";
5
5
  import "../../hooks/use-z-index/index.js";
6
6
  import "@vueuse/core";
7
7
  import { isNumberish as f, isUndefined as I } from "@vft/utils";
8
8
  import "../../utils/ns-cover.js";
9
- import { useOrderedChildren as U } from "../../hooks/use-ordered-children/index.js";
10
- import { UPDATE_MODEL_EVENT as $ } from "@vft/constants";
9
+ import { useOrderedChildren as $ } from "../../hooks/use-ordered-children/index.js";
10
+ import { UPDATE_MODEL_EVENT as F } from "@vft/constants";
11
11
  import K from "./tab-nav.vue2.js";
12
12
  import { TabsRootContextKey as S } from "./types.js";
13
- const d = (
13
+ const s = (
14
14
  /* hoist-static*/
15
- O("tabs")
15
+ U("tabs")
16
16
  ), j = w({
17
- name: d.b()
18
- }), ne = /* @__PURE__ */ w({
17
+ name: s.b()
18
+ }), oe = /* @__PURE__ */ w({
19
19
  ...j,
20
20
  props: {
21
21
  closable: {
@@ -25,16 +25,14 @@ const d = (
25
25
  type: Boolean,
26
26
  default: !1
27
27
  },
28
- modelValue: null,
28
+ modelValue: {},
29
29
  editable: {
30
30
  type: Boolean
31
31
  },
32
32
  tabPosition: {
33
33
  default: "top"
34
34
  },
35
- beforeLeave: {
36
- type: Function
37
- },
35
+ beforeLeave: {},
38
36
  stretch: {
39
37
  type: Boolean
40
38
  },
@@ -42,61 +40,61 @@ const d = (
42
40
  type: Boolean,
43
41
  default: !0
44
42
  },
45
- closeIconCfg: null,
46
- addIconCfg: null,
47
- arrowLeftIconCfg: null,
48
- arrowRightIconCfg: null
43
+ closeIconCfg: {},
44
+ addIconCfg: {},
45
+ arrowLeftIconCfg: {},
46
+ arrowRightIconCfg: {}
49
47
  },
50
48
  emits: {
51
- [$]: (t) => f(t),
49
+ [F]: (a) => f(a),
52
50
  /** 点击 */
53
- tabClick: (t, c) => c instanceof Event,
51
+ tabClick: (a, c) => c instanceof Event,
54
52
  /** 右键点击 */
55
- tabContextMenu: (t, c, a) => a instanceof Event,
56
- tabChange: (t) => f(t),
57
- edit: (t, c) => ["remove", "add"].includes(c),
53
+ tabContextMenu: (a, c, t) => t instanceof Event,
54
+ tabChange: (a) => f(a),
55
+ edit: (a, c) => ["remove", "add"].includes(c),
58
56
  /** 移除 */
59
- tabRemove: (t) => f(t),
57
+ tabRemove: (a) => f(a),
60
58
  /** 增加 */
61
59
  tabAdd: () => !0
62
60
  },
63
- setup(t, {
61
+ setup(a, {
64
62
  expose: c,
65
- emit: a
63
+ emit: t
66
64
  }) {
67
- const T = g(), i = M(), u = h(), r = h(t.modelValue ?? "0"), y = (e) => {
68
- r.value = e, a("update:modelValue", e), a("tabChange", e);
65
+ const T = g(), i = M(), u = h(), r = h(a.modelValue ?? "0"), R = (e) => {
66
+ r.value = e, t("update:modelValue", e), t("tabChange", e);
69
67
  }, m = async (e) => {
70
- var n, o, v;
68
+ var o, n, v;
71
69
  if (!(r.value === e || I(e)))
72
70
  try {
73
- await ((n = t.beforeLeave) == null ? void 0 : n.call(t, e, r.value)) !== !1 && (y(e), (v = (o = u.value) == null ? void 0 : o.removeFocus) == null || v.call(o));
71
+ await ((o = a.beforeLeave) == null ? void 0 : o.call(a, e, r.value)) !== !1 && (R(e), (v = (n = u.value) == null ? void 0 : n.removeFocus) == null || v.call(n));
74
72
  } catch {
75
73
  }
76
- }, R = (e, n, o) => {
77
- e.props.disabled || (m(n), a("tabClick", e, o));
78
- }, L = (e, n) => {
79
- e.props.disabled || I(e.props.name) || (n.stopPropagation(), a("edit", e.props.name, "remove"), a("tabRemove", e.props.name));
74
+ }, x = (e, o, n) => {
75
+ e.props.disabled || (m(o), t("tabClick", e, n));
76
+ }, y = (e, o) => {
77
+ e.props.disabled || I(e.props.name) || (o.stopPropagation(), t("edit", e.props.name, "remove"), t("tabRemove", e.props.name));
80
78
  };
81
- p(() => t.modelValue, (e) => m(e)), p(r, async () => {
79
+ p(() => a.modelValue, (e) => m(e)), p(r, async () => {
82
80
  var e;
83
81
  await D(), (e = u.value) == null || e.scrollToActiveTab();
84
82
  });
85
- const N = () => {
86
- a("edit", void 0, "add"), a("tabAdd");
87
- }, x = (e, n, o) => {
88
- a("tabContextMenu", e, n, o);
89
- }, b = l(() => {
83
+ const L = () => {
84
+ t("edit", void 0, "add"), t("tabAdd");
85
+ }, N = (e, o, n) => {
86
+ t("tabContextMenu", e, o, n);
87
+ }, b = d(() => {
90
88
  var e;
91
- return s("div", {
92
- class: d.e("content")
89
+ return l("div", {
90
+ class: s.e("content")
93
91
  }, [(e = i.default) == null ? void 0 : e.call(i)]);
94
92
  }), {
95
93
  children: B,
96
94
  addChild: P,
97
95
  removeChild: A
98
- } = U(g(), "vft-tab-pane");
99
- F(S, {
96
+ } = $(g(), "vft-tab-pane");
97
+ O(S, {
100
98
  props: T.props,
101
99
  currentName: r,
102
100
  registerPane: P,
@@ -104,49 +102,49 @@ const d = (
104
102
  }), c({
105
103
  currentName: r
106
104
  });
107
- const E = l(() => ({
105
+ const E = d(() => ({
108
106
  icon: "ico-ep:plus",
109
107
  size: 12,
110
- ...t.addIconCfg
111
- })), V = l(() => ({
108
+ ...a.addIconCfg
109
+ })), V = d(() => ({
112
110
  icon: "ico-ep:close",
113
111
  size: 14,
114
- ...t.closeIconCfg
115
- })), k = l(() => ({
112
+ ...a.closeIconCfg
113
+ })), k = d(() => ({
116
114
  icon: "ico-ep:arrow-left",
117
115
  size: 18,
118
- ...t.arrowLeftIconCfg
119
- })), z = l(() => ({
116
+ ...a.arrowLeftIconCfg
117
+ })), z = d(() => ({
120
118
  icon: "ico-ep:arrow-right",
121
119
  size: 18,
122
- ...t.arrowRightIconCfg
123
- })), C = l(() => {
120
+ ...a.arrowRightIconCfg
121
+ })), C = d(() => {
124
122
  var e;
125
- return s("div", {
126
- class: [d.e("header"), d.is(t.tabPosition)]
127
- }, [s(K, {
123
+ return l("div", {
124
+ class: [s.e("header"), s.is(a.tabPosition)]
125
+ }, [l(K, {
128
126
  ref: u,
129
127
  currentName: r.value,
130
128
  panes: B.value,
131
- stretch: t.stretch,
132
- showBar: t.showBar,
129
+ stretch: a.stretch,
130
+ showBar: a.showBar,
133
131
  closeIconCfg: V.value,
134
132
  addIconCfg: E.value,
135
133
  arrowRightIconCfg: z.value,
136
134
  arrowLeftIconCfg: k.value,
137
- editable: t.editable,
138
- addable: t.addable,
139
- onTabClick: R,
140
- onTabRemove: L,
141
- onTabAdd: N,
142
- onTabContextmenu: x
135
+ editable: a.editable,
136
+ addable: a.addable,
137
+ onTabClick: x,
138
+ onTabRemove: y,
139
+ onTabAdd: L,
140
+ onTabContextmenu: N
143
141
  }, null), (e = i.headerRight) == null ? void 0 : e.call(i)]);
144
142
  });
145
- return () => s("div", {
146
- class: [d.b(), d.m(t.tabPosition)]
147
- }, [...t.tabPosition !== "bottom" ? [C.value, b.value] : [b.value, C.value]]);
143
+ return () => l("div", {
144
+ class: [s.b(), s.m(a.tabPosition)]
145
+ }, [...a.tabPosition !== "bottom" ? [C.value, b.value] : [b.value, C.value]]);
148
146
  }
149
147
  });
150
148
  export {
151
- ne as default
149
+ oe as default
152
150
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as m, useSlots as d, computed as f, createVNode as n, Transition as p, isVNode as b } from "vue";
1
+ import { defineComponent as u, useSlots as d, computed as f, createVNode as n, Transition as p, isVNode as b } from "vue";
2
2
  import { VftIcon as y } from "../icon/index.js";
3
3
  import { useNamespace as g } from "../../hooks/use-namespace/index.js";
4
4
  import "@popperjs/core";
@@ -12,13 +12,13 @@ import { useFormSize as h } from "../form/hooks/use-form-common-props.js";
12
12
  function k(e) {
13
13
  return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !b(e);
14
14
  }
15
- const F = /* @__PURE__ */ m({
15
+ const F = /* @__PURE__ */ u({
16
16
  __name: "tag",
17
17
  props: {
18
18
  closable: {
19
19
  type: Boolean
20
20
  },
21
- type: null,
21
+ type: {},
22
22
  hit: {
23
23
  type: Boolean
24
24
  },
@@ -26,8 +26,8 @@ const F = /* @__PURE__ */ m({
26
26
  type: Boolean,
27
27
  default: !0
28
28
  },
29
- color: null,
30
- size: null,
29
+ color: {},
30
+ size: {},
31
31
  effect: {
32
32
  default: "light"
33
33
  },
@@ -41,7 +41,7 @@ const F = /* @__PURE__ */ m({
41
41
  }) {
42
42
  const l = d(), i = h(), t = g("tag"), s = f(() => [t.b(), t.is("closable", e.closable), t.m(e.type), t.m(i.value), t.m(e.effect), t.is("hit", e.hit), t.is("round", e.round)]), r = (o) => {
43
43
  c("close", o);
44
- }, u = (o) => {
44
+ }, m = (o) => {
45
45
  c("click", o);
46
46
  }, a = () => {
47
47
  var o;
@@ -50,7 +50,7 @@ const F = /* @__PURE__ */ m({
50
50
  style: {
51
51
  backgroundColor: e.color
52
52
  },
53
- onClick: u
53
+ onClick: m
54
54
  }, [n("span", {
55
55
  class: t.e("content")
56
56
  }, [(o = l.default) == null ? void 0 : o.call(l)]), e.closable ? n("div", {