vft 0.0.429 → 0.0.430

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/attributes.json +1 -1
  2. package/es/components/alert/alert.vue2.js +38 -38
  3. package/es/components/autocomplete/autocomplete.vue2.js +82 -82
  4. package/es/components/avatar/avatar.vue2.js +23 -23
  5. package/es/components/avatar-stack/avatar-stack.vue2.js +25 -25
  6. package/es/components/breadcrumb/breadcrumb-item.vue2.js +19 -19
  7. package/es/components/button/button.vue2.js +37 -37
  8. package/es/components/card/card.vue2.js +19 -19
  9. package/es/components/carousel/carousel.vue2.js +75 -75
  10. package/es/components/carousel/use-carousel.js +1 -1
  11. package/es/components/cascader-panel/index.vue2.js +2 -2
  12. package/es/components/cascader-panel/menu.vue2.js +2 -2
  13. package/es/components/cascader-panel/node.vue2.js +3 -4
  14. package/es/components/checkbox/checkbox-button.vue2.js +52 -52
  15. package/es/components/checkbox/checkbox-group.vue2.js +26 -26
  16. package/es/components/checkbox/checkbox.vue2.js +57 -57
  17. package/es/components/clamp/clamp.vue2.js +14 -14
  18. package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
  19. package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +19 -19
  20. package/es/components/col/col.vue2.js +20 -20
  21. package/es/components/color-picker/color-picker.vue2.js +126 -128
  22. package/es/components/color-picker/components/sv-panel.vue.js +2 -2
  23. package/es/components/config-provider/hooks/use-global-config.js +3 -3
  24. package/es/components/context-menu/context-menu.vue2.js +18 -18
  25. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +37 -39
  26. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +8 -10
  27. package/es/components/date-picker/date-picker.d.ts +1 -1
  28. package/es/components/date-picker/index.d.ts +2 -2
  29. package/es/components/descriptions/description.vue2.js +44 -44
  30. package/es/components/descriptions/descriptions-row.vue2.js +12 -12
  31. package/es/components/dialog/dialog-content.vue2.js +31 -31
  32. package/es/components/dialog/dialog.vue2.js +46 -46
  33. package/es/components/divider/divider.vue2.js +19 -19
  34. package/es/components/drawer/drawer.vue2.js +41 -41
  35. package/es/components/dropdown/dropdown-item-impl.vue2.js +40 -40
  36. package/es/components/dropdown/dropdown-item.vue2.js +28 -28
  37. package/es/components/dropdown/dropdown.vue2.js +124 -124
  38. package/es/components/form/form-item.vue2.js +71 -71
  39. package/es/components/header-layout/header-layout.vue2.js +25 -25
  40. package/es/components/icon/icon.vue2.js +15 -15
  41. package/es/components/icon-text/icon-text.vue2.js +28 -28
  42. package/es/components/iframe-layout/iframe-layout.vue2.js +13 -13
  43. package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
  44. package/es/components/image/image.vue2.js +63 -63
  45. package/es/components/image-viewer/image-viewer.vue2.js +88 -88
  46. package/es/components/infinite-scroll/index.d.ts +1 -1
  47. package/es/components/input/input.vue2.js +112 -112
  48. package/es/components/input-number/input-number.vue2.js +100 -100
  49. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  50. package/es/components/link/link.vue2.js +20 -20
  51. package/es/components/list-cell/list-cell.vue2.js +19 -19
  52. package/es/components/logo/logo.vue2.js +22 -22
  53. package/es/components/menu/menu-item-group.vue2.js +8 -8
  54. package/es/components/menu/menu-item.vue2.js +48 -48
  55. package/es/components/message/message.vue2.js +66 -66
  56. package/es/components/modal/modal-footer-action.vue2.js +25 -25
  57. package/es/components/modal/modal.vue2.js +40 -40
  58. package/es/components/multiple-tabs/multiple-tabs.vue2.js +30 -30
  59. package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
  60. package/es/components/pagination/components/jumper.vue2.js +18 -18
  61. package/es/components/pagination/components/next.vue2.js +11 -11
  62. package/es/components/pagination/components/pager.vue2.js +74 -74
  63. package/es/components/pagination/components/prev.vue2.js +9 -9
  64. package/es/components/pagination/components/sizes.vue2.js +18 -18
  65. package/es/components/pagination/components/total.vue2.js +8 -8
  66. package/es/components/popconfirm/popconfirm.vue2.js +47 -47
  67. package/es/components/popover/popover.vue2.js +28 -28
  68. package/es/components/popper/trigger.vue2.js +9 -9
  69. package/es/components/progress/progress.vue2.js +87 -87
  70. package/es/components/qrcode/qrcode.vue2.js +31 -31
  71. package/es/components/radio/radio-button.vue2.js +17 -17
  72. package/es/components/radio/radio-group.vue2.js +35 -35
  73. package/es/components/router-view-content/router-view-content.vue2.js +25 -25
  74. package/es/components/roving-focus-group/roving-focus-item.vue2.js +30 -30
  75. package/es/components/row/row.vue2.js +5 -5
  76. package/es/components/scrollbar/bar.vue2.js +16 -16
  77. package/es/components/scrollbar/scrollbar.vue2.js +48 -48
  78. package/es/components/scrollbar/thumb.vue2.js +27 -27
  79. package/es/components/search/search.vue2.js +29 -29
  80. package/es/components/select/index.d.ts +1 -1
  81. package/es/components/select/select.vue.d.ts +1 -1
  82. package/es/components/side-menu/index.d.ts +2 -8
  83. package/es/components/side-menu/side-menu.vue.d.ts +5 -59
  84. package/es/components/side-menu/types.d.ts +107 -0
  85. package/es/components/skeleton/skeleton-item.vue2.js +9 -9
  86. package/es/components/skeleton/skeleton.vue2.js +14 -14
  87. package/es/components/slider/button.vue2.js +54 -54
  88. package/es/components/slider/slider.vue2.js +106 -106
  89. package/es/components/steps/item.vue2.js +56 -56
  90. package/es/components/steps/steps.vue2.js +16 -16
  91. package/es/components/super-form/super-form-action.vue2.js +28 -28
  92. package/es/components/super-form/super-form-item.vue2.js +1 -1
  93. package/es/components/switch/switch.vue2.js +108 -108
  94. package/es/components/table/field.d.ts +4 -4
  95. package/es/components/teleport/teleport.vue2.js +6 -6
  96. package/es/components/time-picker/common/picker.vue.d.ts +1 -1
  97. package/es/components/time-picker/index.d.ts +2 -2
  98. package/es/components/time-picker/time-picker.d.ts +1 -1
  99. package/es/components/timeline/timeline-item.vue2.js +20 -20
  100. package/es/components/tooltip/content.vue2.js +57 -57
  101. package/es/components/tooltip/tooltip.vue2.js +66 -66
  102. package/es/components/tooltip/trigger.vue2.js +42 -42
  103. package/es/components/tree/tree.vue2.js +72 -72
  104. package/es/components/upload/upload-content.vue2.js +85 -85
  105. package/es/components/upload/upload-list.vue2.js +70 -70
  106. package/es/components/upload/upload.vue2.js +86 -86
  107. package/es/components/verify-code/verify-code.vue2.js +18 -18
  108. package/es/package.json.d.ts +1 -1
  109. package/es/package.json.js +1 -1
  110. package/es/utils/vue/vnode.js +1 -1
  111. package/lib/components/alert/alert.vue2.cjs +1 -1
  112. package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
  113. package/lib/components/avatar/avatar.vue2.cjs +1 -1
  114. package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -1
  115. package/lib/components/breadcrumb/breadcrumb-item.vue2.cjs +1 -1
  116. package/lib/components/button/button.vue2.cjs +1 -1
  117. package/lib/components/card/card.vue2.cjs +1 -1
  118. package/lib/components/carousel/carousel.vue2.cjs +1 -1
  119. package/lib/components/cascader-panel/index.vue2.cjs +1 -1
  120. package/lib/components/cascader-panel/menu.vue2.cjs +1 -1
  121. package/lib/components/cascader-panel/node.vue2.cjs +1 -1
  122. package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
  123. package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
  124. package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
  125. package/lib/components/clamp/clamp.vue2.cjs +1 -1
  126. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  127. package/lib/components/clamp-tooltip/clamp-tooltip.vue2.cjs +1 -1
  128. package/lib/components/col/col.vue2.cjs +1 -1
  129. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  130. package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
  131. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  132. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  133. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  134. package/lib/components/date-picker/date-picker.d.ts +1 -1
  135. package/lib/components/date-picker/index.d.ts +2 -2
  136. package/lib/components/descriptions/description.vue2.cjs +1 -1
  137. package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
  138. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  139. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  140. package/lib/components/divider/divider.vue2.cjs +1 -1
  141. package/lib/components/drawer/drawer.vue2.cjs +1 -1
  142. package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
  143. package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
  144. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  145. package/lib/components/form/form-item.vue2.cjs +1 -1
  146. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  147. package/lib/components/icon/icon.vue2.cjs +1 -1
  148. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  149. package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
  150. package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
  151. package/lib/components/image/image.vue2.cjs +1 -1
  152. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  153. package/lib/components/infinite-scroll/index.d.ts +1 -1
  154. package/lib/components/input/input.vue2.cjs +1 -1
  155. package/lib/components/input-number/input-number.vue2.cjs +1 -1
  156. package/lib/components/link/link.vue2.cjs +1 -1
  157. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  158. package/lib/components/logo/logo.vue2.cjs +1 -1
  159. package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
  160. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  161. package/lib/components/message/message.vue2.cjs +1 -1
  162. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  163. package/lib/components/modal/modal.vue2.cjs +1 -1
  164. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  165. package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
  166. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  167. package/lib/components/pagination/components/next.vue2.cjs +1 -1
  168. package/lib/components/pagination/components/pager.vue2.cjs +1 -1
  169. package/lib/components/pagination/components/prev.vue2.cjs +1 -1
  170. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  171. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  172. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  173. package/lib/components/popover/popover.vue2.cjs +1 -1
  174. package/lib/components/popper/trigger.vue2.cjs +1 -1
  175. package/lib/components/progress/progress.vue2.cjs +5 -5
  176. package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
  177. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  178. package/lib/components/radio/radio-group.vue2.cjs +1 -1
  179. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  180. package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
  181. package/lib/components/row/row.vue2.cjs +1 -1
  182. package/lib/components/scrollbar/bar.vue2.cjs +1 -1
  183. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  184. package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
  185. package/lib/components/search/search.vue2.cjs +1 -1
  186. package/lib/components/select/index.d.ts +1 -1
  187. package/lib/components/select/select.vue.d.ts +1 -1
  188. package/lib/components/side-menu/index.d.ts +2 -8
  189. package/lib/components/side-menu/side-menu.vue.d.ts +5 -59
  190. package/lib/components/side-menu/types.d.ts +107 -0
  191. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  192. package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
  193. package/lib/components/slider/button.vue2.cjs +1 -1
  194. package/lib/components/slider/slider.vue2.cjs +1 -1
  195. package/lib/components/steps/item.vue2.cjs +1 -1
  196. package/lib/components/steps/steps.vue2.cjs +1 -1
  197. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  198. package/lib/components/switch/switch.vue2.cjs +1 -1
  199. package/lib/components/table/field.d.ts +4 -4
  200. package/lib/components/teleport/teleport.vue2.cjs +1 -1
  201. package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
  202. package/lib/components/time-picker/index.d.ts +2 -2
  203. package/lib/components/time-picker/time-picker.d.ts +1 -1
  204. package/lib/components/timeline/timeline-item.vue2.cjs +1 -1
  205. package/lib/components/tooltip/content.vue2.cjs +1 -1
  206. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  207. package/lib/components/tooltip/trigger.vue2.cjs +1 -1
  208. package/lib/components/tree/tree.vue2.cjs +1 -1
  209. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  210. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  211. package/lib/components/upload/upload.vue2.cjs +1 -1
  212. package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
  213. package/lib/package.json.cjs +1 -1
  214. package/lib/package.json.d.ts +1 -1
  215. package/package.json +5 -5
  216. package/tags.json +1 -1
  217. package/theme-style/src/mixins/mixins.scss +1 -0
  218. package/web-types.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as W, ref as o, computed as h, watch as k, nextTick as T, provide as D, reactive as G, onMounted as X, onUpdated as Y, createElementBlock as q, openBlock as y, normalizeClass as w, unref as F, createElementVNode as I, createBlock as B, createCommentVNode as J, normalizeStyle as E, resolveDynamicComponent as Q, withCtx as Z, renderSlot as _ } from "vue";
2
- import { isNumber as i, isObject as ee } from "@vft/utils";
2
+ import { isNumber as r, isObject as ee } from "@vft/utils";
3
3
  import { useResizeObserver as te, useEventListener as le } from "@vueuse/core";
4
4
  import { debugWarn as N } from "../../utils/error.js";
5
5
  import { addUnit as O } from "../../utils/helper.js";
@@ -10,12 +10,12 @@ import "../../hooks/use-model-toggle/index.js";
10
10
  import "@popperjs/core";
11
11
  import "../../hooks/use-z-index/index.js";
12
12
  import oe from "./bar.vue2.js";
13
- import { scrollbarContextKey as re } from "./constants.js";
13
+ import { scrollbarContextKey as ie } from "./constants.js";
14
14
  import { GAP as f } from "./util.js";
15
- const L = "ElScrollbar", ie = W({
15
+ const L = "ElScrollbar", re = W({
16
16
  name: "vft-scrollbar"
17
- }), Se = /* @__PURE__ */ W({
18
- ...ie,
17
+ }), xe = /* @__PURE__ */ W({
18
+ ...re,
19
19
  props: {
20
20
  height: { default: "" },
21
21
  maxHeight: { default: "" },
@@ -31,74 +31,74 @@ const L = "ElScrollbar", ie = W({
31
31
  },
32
32
  emits: {
33
33
  scroll: ({
34
- scrollTop: l,
34
+ scrollTop: t,
35
35
  scrollLeft: u
36
- }) => [l, u].every(i)
36
+ }) => [t, u].every(r)
37
37
  },
38
- setup(l, { expose: u, emit: M }) {
38
+ setup(t, { expose: u, emit: M }) {
39
39
  const s = ae("scrollbar"), A = M;
40
- let p, b;
41
- const g = o(), t = o(), S = o(), z = o("0"), x = o("0"), m = o(), C = o(1), R = o(1), $ = h(() => {
40
+ let b, g;
41
+ const S = o(), l = o(), x = o(), z = o("0"), p = o("0"), m = o(), C = o(1), R = o(1), $ = h(() => {
42
42
  const e = {};
43
- return l.height && (e.height = O(l.height)), l.maxHeight && (e.maxHeight = O(l.maxHeight)), [l.wrapStyle, e];
43
+ return t.height && (e.height = O(t.height)), t.maxHeight && (e.maxHeight = O(t.maxHeight)), [t.wrapStyle, e];
44
44
  }), j = h(() => [
45
- l.wrapClass,
45
+ t.wrapClass,
46
46
  s.e("wrap"),
47
- { [s.em("wrap", "hidden-default")]: !l.native }
48
- ]), K = h(() => [s.e("view"), l.viewClass]), H = () => {
49
- t.value && (m.value?.handleScroll(t.value), A("scroll", {
50
- scrollTop: t.value.scrollTop,
51
- scrollLeft: t.value.scrollLeft
47
+ { [s.em("wrap", "hidden-default")]: !t.native }
48
+ ]), K = h(() => [s.e("view"), t.viewClass]), H = () => {
49
+ l.value && (m.value?.handleScroll(l.value), A("scroll", {
50
+ scrollTop: l.value.scrollTop,
51
+ scrollLeft: l.value.scrollLeft
52
52
  }));
53
53
  };
54
54
  function P(e, a) {
55
- ee(e) ? t.value.scrollTo(e) : i(e) && i(a) && t.value.scrollTo(e, a);
55
+ ee(e) ? l.value.scrollTo(e) : r(e) && r(a) && l.value.scrollTo(e, a);
56
56
  }
57
57
  const U = (e) => {
58
- if (!i(e)) {
58
+ if (!r(e)) {
59
59
  N(L, "value must be a number");
60
60
  return;
61
61
  }
62
- t.value.scrollTop = e;
62
+ l.value.scrollTop = e;
63
63
  }, V = (e) => {
64
- if (!i(e)) {
64
+ if (!r(e)) {
65
65
  N(L, "value must be a number");
66
66
  return;
67
67
  }
68
- t.value.scrollLeft = e;
69
- }, r = () => {
70
- if (!t.value) return;
71
- const e = t.value.offsetHeight - f, a = t.value.offsetWidth - f, v = e ** 2 / t.value.scrollHeight, d = a ** 2 / t.value.scrollWidth, n = Math.max(v, l.minSize), c = Math.max(d, l.minSize);
72
- C.value = v / (e - v) / (n / (e - n)), R.value = d / (a - d) / (c / (a - c)), x.value = n + f < e ? `${n}px` : "", z.value = c + f < a ? `${c}px` : "";
68
+ l.value.scrollLeft = e;
69
+ }, i = () => {
70
+ if (!l.value) return;
71
+ const e = l.value.offsetHeight - f, a = l.value.offsetWidth - f, v = e ** 2 / l.value.scrollHeight, d = a ** 2 / l.value.scrollWidth, n = Math.max(v, t.minSize), c = Math.max(d, t.minSize);
72
+ C.value = v / (e - v) / (n / (e - n)), R.value = d / (a - d) / (c / (a - c)), p.value = n + f < e ? `${n}px` : "", z.value = c + f < a ? `${c}px` : "";
73
73
  };
74
74
  return k(
75
- () => l.noresize,
75
+ () => t.noresize,
76
76
  (e) => {
77
- e ? (p?.(), b?.()) : ({ stop: p } = te(S, r), b = le("resize", r));
77
+ e ? (b?.(), g?.()) : ({ stop: b } = te(x, i), g = le("resize", i));
78
78
  },
79
79
  { immediate: !0 }
80
80
  ), k(
81
- () => [l.maxHeight, l.height],
81
+ () => [t.maxHeight, t.height],
82
82
  () => {
83
- l.native || T(() => {
84
- r(), t.value && m.value?.handleScroll(t.value);
83
+ t.native || T(() => {
84
+ i(), l.value && m.value?.handleScroll(l.value);
85
85
  });
86
86
  }
87
87
  ), D(
88
- re,
88
+ ie,
89
89
  G({
90
- scrollbarElement: g,
91
- wrapElement: t
90
+ scrollbarElement: S,
91
+ wrapElement: l
92
92
  })
93
93
  ), X(() => {
94
- l.native || T(() => {
95
- r();
94
+ t.native || T(() => {
95
+ i();
96
96
  });
97
- }), Y(() => r()), u({
97
+ }), Y(() => i()), u({
98
98
  /** @description scrollbar wrap ref */
99
- wrapRef: t,
99
+ wrapRef: l,
100
100
  /** @description update scrollbar state manually */
101
- update: r,
101
+ update: i,
102
102
  /** @description scrolls to a particular set of coordinates */
103
103
  scrollTo: P,
104
104
  /** @description set distance to scroll top */
@@ -109,21 +109,21 @@ const L = "ElScrollbar", ie = W({
109
109
  handleScroll: H
110
110
  }), (e, a) => (y(), q("div", {
111
111
  ref_key: "scrollbarRef",
112
- ref: g,
112
+ ref: S,
113
113
  class: w(F(s).b())
114
114
  }, [
115
115
  I("div", {
116
116
  ref_key: "wrapRef",
117
- ref: t,
117
+ ref: l,
118
118
  class: w(j.value),
119
119
  style: E($.value),
120
120
  onScroll: H
121
121
  }, [
122
- (y(), B(Q(e.tag), {
122
+ (y(), B(Q(t.tag), {
123
123
  ref_key: "resizeRef",
124
- ref: S,
124
+ ref: x,
125
125
  class: w(K.value),
126
- style: E(e.viewStyle)
126
+ style: E(t.viewStyle)
127
127
  }, {
128
128
  default: Z(() => [
129
129
  _(e.$slots, "default")
@@ -131,13 +131,13 @@ const L = "ElScrollbar", ie = W({
131
131
  _: 3
132
132
  }, 8, ["class", "style"]))
133
133
  ], 38),
134
- e.native ? J("", !0) : (y(), B(oe, {
134
+ t.native ? J("", !0) : (y(), B(oe, {
135
135
  key: 0,
136
136
  ref_key: "barRef",
137
137
  ref: m,
138
- height: x.value,
138
+ height: p.value,
139
139
  width: z.value,
140
- always: e.always,
140
+ always: t.always,
141
141
  "ratio-x": R.value,
142
142
  "ratio-y": C.value
143
143
  }, null, 8, ["height", "width", "always", "ratio-x", "ratio-y"]))
@@ -145,5 +145,5 @@ const L = "ElScrollbar", ie = W({
145
145
  }
146
146
  });
147
147
  export {
148
- Se as default
148
+ xe as default
149
149
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as T, inject as D, ref as i, computed as E, onBeforeUnmount as N, toRef as S, createBlock as A, openBlock as O, Transition as j, unref as m, withCtx as K, withDirectives as U, createElementVNode as z, normalizeClass as C, normalizeStyle as _, vShow as I } from "vue";
2
- import { useEventListener as P, isClient as V } from "@vueuse/core";
1
+ import { defineComponent as T, inject as D, ref as i, computed as E, onBeforeUnmount as N, toRef as S, createBlock as A, openBlock as O, Transition as j, unref as m, withCtx as K, withDirectives as U, createElementVNode as z, normalizeClass as C, normalizeStyle as I, vShow as V } from "vue";
2
+ import { useEventListener as P, isClient as _ } from "@vueuse/core";
3
3
  import "@vft/utils";
4
4
  import { throwError as q } from "../../utils/error.js";
5
5
  import "../config-provider/hooks/use-global-config.js";
@@ -20,15 +20,15 @@ const W = "Thumb", ce = /* @__PURE__ */ T({
20
20
  ratio: {},
21
21
  always: { type: Boolean }
22
22
  },
23
- setup(r) {
23
+ setup(a) {
24
24
  const o = D(G), s = F("scrollbar");
25
25
  o || q(W, "can not inject scrollbar context");
26
- const l = i(), a = i(), v = i({}), u = i(!1);
27
- let c = !1, f = !1, d = V ? document.onselectstart : null;
28
- const e = E(() => J[r.vertical ? "vertical" : "horizontal"]), k = E(
26
+ const l = i(), r = i(), v = i({}), u = i(!1);
27
+ let c = !1, f = !1, d = _ ? document.onselectstart : null;
28
+ const e = E(() => J[a.vertical ? "vertical" : "horizontal"]), k = E(
29
29
  () => Q({
30
- size: r.size,
31
- move: r.move,
30
+ size: a.size,
31
+ move: a.move,
32
32
  bar: e.value
33
33
  })
34
34
  ), g = E(
@@ -36,36 +36,36 @@ const W = "Thumb", ce = /* @__PURE__ */ T({
36
36
  // offsetRatioX = original width of thumb / current width of thumb / ratioX
37
37
  // offsetRatioY = original height of thumb / current height of thumb / ratioY
38
38
  // instance height = wrap height - GAP
39
- l.value[e.value.offset] ** 2 / o.wrapElement[e.value.scrollSize] / r.ratio / a.value[e.value.offset]
39
+ l.value[e.value.offset] ** 2 / o.wrapElement[e.value.scrollSize] / a.ratio / r.value[e.value.offset]
40
40
  )
41
41
  ), B = (t) => {
42
42
  if (t.stopPropagation(), t.ctrlKey || [1, 2].includes(t.button)) return;
43
- window.getSelection()?.removeAllRanges(), M(t);
43
+ window.getSelection()?.removeAllRanges(), L(t);
44
44
  const n = t.currentTarget;
45
45
  n && (v.value[e.value.axis] = n[e.value.offset] - (t[e.value.client] - n.getBoundingClientRect()[e.value.direction]));
46
- }, L = (t) => {
47
- if (!a.value || !l.value || !o.wrapElement) return;
46
+ }, x = (t) => {
47
+ if (!r.value || !l.value || !o.wrapElement) return;
48
48
  const n = Math.abs(
49
49
  t.target.getBoundingClientRect()[e.value.direction] - t[e.value.client]
50
- ), b = a.value[e.value.offset] / 2, h = (n - b) * 100 * g.value / l.value[e.value.offset];
50
+ ), p = r.value[e.value.offset] / 2, h = (n - p) * 100 * g.value / l.value[e.value.offset];
51
51
  o.wrapElement[e.value.scroll] = h * o.wrapElement[e.value.scrollSize] / 100;
52
- }, M = (t) => {
53
- t.stopImmediatePropagation(), c = !0, document.addEventListener("mousemove", w), document.addEventListener("mouseup", p), d = document.onselectstart, document.onselectstart = () => !1;
52
+ }, L = (t) => {
53
+ t.stopImmediatePropagation(), c = !0, document.addEventListener("mousemove", w), document.addEventListener("mouseup", b), d = document.onselectstart, document.onselectstart = () => !1;
54
54
  }, w = (t) => {
55
- if (!l.value || !a.value || c === !1) return;
55
+ if (!l.value || !r.value || c === !1) return;
56
56
  const n = v.value[e.value.axis];
57
57
  if (!n) return;
58
- const b = (l.value.getBoundingClientRect()[e.value.direction] - t[e.value.client]) * -1, h = a.value[e.value.offset] - n, R = (b - h) * 100 * g.value / l.value[e.value.offset];
58
+ const p = (l.value.getBoundingClientRect()[e.value.direction] - t[e.value.client]) * -1, h = r.value[e.value.offset] - n, R = (p - h) * 100 * g.value / l.value[e.value.offset];
59
59
  o.wrapElement[e.value.scroll] = R * o.wrapElement[e.value.scrollSize] / 100;
60
- }, p = () => {
61
- c = !1, v.value[e.value.axis] = 0, document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", p), y(), f && (u.value = !1);
62
- }, x = () => {
63
- f = !1, u.value = !!r.size;
60
+ }, b = () => {
61
+ c = !1, v.value[e.value.axis] = 0, document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", b), y(), f && (u.value = !1);
62
+ }, M = () => {
63
+ f = !1, u.value = !!a.size;
64
64
  }, H = () => {
65
65
  f = !0, u.value = c;
66
66
  };
67
67
  N(() => {
68
- y(), document.removeEventListener("mouseup", p);
68
+ y(), document.removeEventListener("mouseup", b);
69
69
  });
70
70
  const y = () => {
71
71
  document.onselectstart !== d && (document.onselectstart = d);
@@ -73,7 +73,7 @@ const W = "Thumb", ce = /* @__PURE__ */ T({
73
73
  return P(
74
74
  S(o, "scrollbarElement"),
75
75
  "mousemove",
76
- x
76
+ M
77
77
  ), P(
78
78
  S(o, "scrollbarElement"),
79
79
  "mouseleave",
@@ -86,17 +86,17 @@ const W = "Thumb", ce = /* @__PURE__ */ T({
86
86
  ref_key: "instance",
87
87
  ref: l,
88
88
  class: C([m(s).e("bar"), m(s).is(e.value.key)]),
89
- onMousedown: L
89
+ onMousedown: x
90
90
  }, [
91
91
  z("div", {
92
92
  ref_key: "thumb",
93
- ref: a,
93
+ ref: r,
94
94
  class: C(m(s).e("thumb")),
95
- style: _(k.value),
95
+ style: I(k.value),
96
96
  onMousedown: B
97
97
  }, null, 38)
98
98
  ], 34), [
99
- [I, t.always || u.value]
99
+ [V, a.always || u.value]
100
100
  ])
101
101
  ]),
102
102
  _: 1
@@ -47,30 +47,30 @@ const re = g({
47
47
  inputStyle: { type: [Boolean, null, String, Object, Array] }
48
48
  },
49
49
  emits: ["update:modelValue", "blur", "focus", "clear", "enter", "prefixClick", "suffixClick", "mouseenter", "mouseleave", "keydown", "change", "input", "compositionstart", "compositionupdate", "compositionend"],
50
- setup(t, { expose: P, emit: R }) {
51
- const f = le("search"), o = R, y = a(), C = a(), c = a(), p = a(!1), m = a(!1), n = a(!1), S = u(
50
+ setup(o, { expose: x, emit: P }) {
51
+ const f = le("search"), t = P, y = a(), C = a(), c = a(), p = a(!1), m = a(!1), n = a(!1), R = u(
52
52
  () => b(
53
53
  {
54
- width: t.activeWidth && (n.value || t.modelValue) ? d(t.activeWidth) : d(t.width)
54
+ width: o.activeWidth && (n.value || o.modelValue) ? d(o.activeWidth) : d(o.width)
55
55
  },
56
56
  "input"
57
57
  )
58
- ), $ = u(
58
+ ), S = u(
59
59
  () => b(
60
60
  {
61
- "active-width": t.activeWidth ? d(t.activeWidth) : d(t.width)
61
+ "active-width": o.activeWidth ? d(o.activeWidth) : d(o.width)
62
62
  },
63
63
  "search"
64
64
  )
65
- ), x = u(() => ({
65
+ ), $ = u(() => ({
66
66
  "show-arrow": !1,
67
67
  transition: "vft-zoom-in-top",
68
68
  placement: "bottom-start",
69
69
  offset: 3,
70
70
  width: 500,
71
- ...t.popoverCfg
71
+ ...o.popoverCfg
72
72
  })), E = (e) => {
73
- o("update:modelValue", e), o("input", e);
73
+ t("update:modelValue", e), t("input", e);
74
74
  }, W = () => {
75
75
  v();
76
76
  };
@@ -81,46 +81,46 @@ const re = g({
81
81
  n.value = !1;
82
82
  }
83
83
  const I = () => {
84
- o("clear"), s(!1);
84
+ t("clear"), s(!1);
85
85
  };
86
86
  function M() {
87
- m.value = !0, o("mouseenter", t.modelValue);
87
+ m.value = !0, t("mouseenter", o.modelValue);
88
88
  }
89
89
  function U() {
90
- m.value = !1, o("mouseleave", t.modelValue);
90
+ m.value = !1, t("mouseleave", o.modelValue);
91
91
  }
92
92
  const F = () => {
93
- n.value = !0, p.value = !0, o("focus");
93
+ n.value = !0, p.value = !0, t("focus");
94
94
  };
95
95
  function N() {
96
- p.value = !1, o("blur");
96
+ p.value = !1, t("blur");
97
97
  }
98
98
  function O() {
99
- s(), o("prefixClick", t.modelValue);
99
+ s(), t("prefixClick", o.modelValue);
100
100
  }
101
101
  function j() {
102
- s(), o("suffixClick", t.modelValue);
102
+ s(), t("suffixClick", o.modelValue);
103
103
  }
104
104
  function A() {
105
- s(), o("enter", t.modelValue);
105
+ s(), t("enter", o.modelValue);
106
106
  }
107
107
  function s(e = !0) {
108
- t.usePopover && v(), e && c.value.blur();
108
+ o.usePopover && v(), e && c.value.blur();
109
109
  }
110
110
  const D = (e) => {
111
- o("keydown", e);
111
+ t("keydown", e);
112
112
  }, K = u(() => y.value?.popperRef?.contentRef), L = (e) => {
113
- o("update:modelValue", e);
113
+ t("update:modelValue", e);
114
114
  }, H = (e) => {
115
- o("change", e);
115
+ t("change", e);
116
116
  }, q = (e) => {
117
- o("compositionstart", e);
117
+ t("compositionstart", e);
118
118
  }, G = (e) => {
119
- o("compositionupdate", e);
119
+ t("compositionupdate", e);
120
120
  }, J = (e) => {
121
- o("compositionend", e);
121
+ t("compositionend", e);
122
122
  };
123
- return P({
123
+ return x({
124
124
  isFocus: p,
125
125
  isHover: m,
126
126
  visible: n,
@@ -131,14 +131,14 @@ const re = g({
131
131
  X((h(), V("div", {
132
132
  ref_key: "searchRef",
133
133
  ref: C,
134
- class: w([l(f).b(), l(f).is("active", !!n.value || !!e.modelValue)]),
135
- style: _($.value)
134
+ class: w([l(f).b(), l(f).is("active", !!n.value || !!o.modelValue)]),
135
+ style: _(S.value)
136
136
  }, [
137
137
  ee(l(ne), B({
138
138
  ref_key: "inputRef",
139
139
  ref: c
140
140
  }, e.$props, {
141
- "input-style": S.value,
141
+ "input-style": R.value,
142
142
  onInput: E,
143
143
  onFocus: F,
144
144
  onEnter: A,
@@ -187,12 +187,12 @@ const re = g({
187
187
  ], 6)), [
188
188
  [l(ie), W, K.value]
189
189
  ]),
190
- e.usePopover ? (h(), Y(l(ae), B({
190
+ o.usePopover ? (h(), Y(l(ae), B({
191
191
  key: 0,
192
192
  style: { "--vft-transition-duration": "3s" },
193
193
  ref_key: "popoverRef",
194
194
  ref: y
195
- }, x.value, {
195
+ }, $.value, {
196
196
  "virtual-ref": C.value,
197
197
  visible: n.value,
198
198
  "onUpdate:visible": k[0] || (k[0] = (Q) => n.value = Q),
@@ -2780,6 +2780,6 @@ export declare const VftSelect: SFCWithInstall<import("vue").DefineComponent<imp
2780
2780
  };
2781
2781
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
2782
2782
  }, {
2783
- ClickOutside: import("vue").ObjectDirective<any, any, string, string>;
2783
+ ClickOutside: import("vue").ObjectDirective<any, any, string, any>;
2784
2784
  }, string, import("vue").ComponentProvideOptions, true, {}, any>>;
2785
2785
  export * from './token';
@@ -2776,6 +2776,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
2776
2776
  };
2777
2777
  }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>> & Record<string, any>;
2778
2778
  }, {
2779
- ClickOutside: import("vue").ObjectDirective<any, any, string, string>;
2779
+ ClickOutside: import("vue").ObjectDirective<any, any, string, any>;
2780
2780
  }, string, import("vue").ComponentProvideOptions, true, {}, any>;
2781
2781
  export default _default;
@@ -96,10 +96,7 @@ export declare const VftSideMenu: import("vft/es/utils").SFCWithInstall<import("
96
96
  "update:width": (val: string | number) => void;
97
97
  dragEnd: (oldIndex: import("sortablejs").SortableEvent, newIndex: import("sortablejs").SortableEvent) => void;
98
98
  dragWidthEnd: () => void;
99
- select: (val: {
100
- route: string;
101
- indexPath: string[];
102
- }) => void;
99
+ select: (val: import("./types").MenuSelectEventData) => void;
103
100
  subMenuClick: (val: any) => void;
104
101
  subMenuOpenClick: (val: any) => void;
105
102
  menuItemMouseenter: (val: any) => void;
@@ -190,10 +187,7 @@ export declare const VftSideMenu: import("vft/es/utils").SFCWithInstall<import("
190
187
  default: boolean;
191
188
  };
192
189
  }>> & Readonly<{
193
- onSelect?: ((val: {
194
- route: string;
195
- indexPath: string[];
196
- }) => any) | undefined;
190
+ onSelect?: ((val: import("./types").MenuSelectEventData) => any) | undefined;
197
191
  "onUpdate:collapse"?: ((val: boolean) => any) | undefined;
198
192
  "onUpdate:width"?: ((val: string | number) => any) | undefined;
199
193
  onDragEnd?: ((oldIndex: import("sortablejs").SortableEvent, newIndex: import("sortablejs").SortableEvent) => any) | undefined;
@@ -1,54 +1,6 @@
1
1
  import Sortable from 'sortablejs';
2
- import type { MenuAttrMapping, MenuType } from './types';
3
- export interface MenuConProps {
4
- /** 是否需要固定在左侧 */
5
- isFixedLeft?: boolean;
6
- /** 菜单列表 */
7
- menus: MenuType[];
8
- /** 侧边栏宽度 */
9
- width?: string | number;
10
- /** 侧边栏高度 */
11
- height?: string;
12
- /** 侧边栏折叠后的宽度 */
13
- collapseWidth?: string | number;
14
- /** 属性字段映射 */
15
- attrMapping?: MenuAttrMapping;
16
- /** 菜单内上下 slot 插槽高度总和 */
17
- menuTopBottomHeight?: number;
18
- /** 是否显示底部收缩 */
19
- showCollapse?: boolean;
20
- /** 只有一级菜单时拖拽配置 */
21
- dragOption?: Sortable.Options & {
22
- dragClassName: string;
23
- };
24
- /** 是否可以拖拽侧边栏宽度 */
25
- dragWidthCfg?: boolean | {
26
- maxWidth?: number;
27
- minWidth?: number;
28
- };
29
- /** 是否使用菜单组件内部的选中事件 */
30
- useRouterJump?: boolean;
31
- /** 是否开启菜单禁用 */
32
- openDisabled?: boolean;
33
- /** 点击子菜单时是否滚动到其父级位置 */
34
- autoScrollActiveDom?: boolean | number;
35
- /** 开启菜单折叠 */
36
- openMenuCollapse?: boolean;
37
- /** 是否收缩 */
38
- collapse?: boolean;
39
- /** 保持只打开一个 */
40
- uniqueOpened?: boolean;
41
- /** 禁用判断使用相反的条件 */
42
- disabledJudgeTurnOver?: boolean;
43
- /** 默认选中 */
44
- defaultActive?: string;
45
- /** 默认展开 */
46
- defaultOpeneds?: Array<string | number>;
47
- defaultOpenedsLevel?: number | boolean;
48
- /** 禁用子菜单的展开收缩行为 */
49
- disableSubMenuAction?: boolean;
50
- }
51
- declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MenuConProps>, {
2
+ import type { MenuSelectEventData, SideMenuProps } from './types';
3
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SideMenuProps>, {
52
4
  isFixedLeft: boolean;
53
5
  autoScrollActiveDom: boolean;
54
6
  openMenuCollapse: boolean;
@@ -77,15 +29,12 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
77
29
  "update:width": (val: string | number) => void;
78
30
  dragEnd: (oldIndex: Sortable.SortableEvent, newIndex: Sortable.SortableEvent) => void;
79
31
  dragWidthEnd: () => void;
80
- select: (val: {
81
- route: string;
82
- indexPath: string[];
83
- }) => void;
32
+ select: (val: MenuSelectEventData) => void;
84
33
  subMenuClick: (val: any) => void;
85
34
  subMenuOpenClick: (val: any) => void;
86
35
  menuItemMouseenter: (val: any) => void;
87
36
  menuItemMouseleave: (val: any) => void;
88
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<MenuConProps>, {
37
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<SideMenuProps>, {
89
38
  isFixedLeft: boolean;
90
39
  autoScrollActiveDom: boolean;
91
40
  openMenuCollapse: boolean;
@@ -102,10 +51,7 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
102
51
  disableSubMenuAction: boolean;
103
52
  defaultOpenedsLevel: boolean;
104
53
  }>>> & Readonly<{
105
- onSelect?: ((val: {
106
- route: string;
107
- indexPath: string[];
108
- }) => any) | undefined;
54
+ onSelect?: ((val: MenuSelectEventData) => any) | undefined;
109
55
  "onUpdate:collapse"?: ((val: boolean) => any) | undefined;
110
56
  "onUpdate:width"?: ((val: string | number) => any) | undefined;
111
57
  onDragEnd?: ((oldIndex: Sortable.SortableEvent, newIndex: Sortable.SortableEvent) => any) | undefined;