vft 0.0.90 → 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 (232) hide show
  1. package/es/comp-resolver.js +20 -29
  2. package/es/components/affix/affix.vue2.js +34 -34
  3. package/es/components/alert/alert.vue2.js +44 -44
  4. package/es/components/avatar/avatar.vue2.js +28 -28
  5. package/es/components/backtop/backtop.vue2.js +11 -11
  6. package/es/components/button/button-group.vue2.js +8 -8
  7. package/es/components/button/button.vue2.js +39 -39
  8. package/es/components/card/card.vue2.js +20 -20
  9. package/es/components/check-tag/check-tag.vue2.js +14 -14
  10. package/es/components/checkbox/checkbox-button.vue2.js +61 -61
  11. package/es/components/checkbox/checkbox-group.vue2.js +27 -27
  12. package/es/components/checkbox/checkbox.vue2.js +81 -81
  13. package/es/components/clamp/clamp.vue2.js +59 -59
  14. package/es/components/clamp-toggle/clamp-toggle.vue2.js +25 -25
  15. package/es/components/col/col.vue2.js +33 -33
  16. package/es/components/color-picker/color-picker.vue2.js +126 -126
  17. package/es/components/color-picker/components/alpha-slider.vue2.js +12 -12
  18. package/es/components/config-provider/config-provider.vue2.js +29 -29
  19. package/es/components/container/aside.vue2.js +9 -9
  20. package/es/components/container/container.vue2.js +11 -11
  21. package/es/components/container/footer.vue2.js +8 -8
  22. package/es/components/container/header.vue2.js +9 -9
  23. package/es/components/context-menu/context-menu.vue2.js +29 -29
  24. package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +53 -53
  25. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +19 -19
  26. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +32 -32
  27. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +168 -168
  28. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +89 -89
  29. package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +38 -38
  30. package/es/components/descriptions/description-item.vue2.js +16 -16
  31. package/es/components/descriptions/description.vue2.js +54 -54
  32. package/es/components/descriptions/descriptions-row.vue2.js +24 -24
  33. package/es/components/dialog/dialog-content.vue2.js +30 -30
  34. package/es/components/dialog/dialog.vue2.js +64 -64
  35. package/es/components/divider/divider.vue2.js +20 -20
  36. package/es/components/dropdown/dropdown.vue.js +2 -127
  37. package/es/components/dropdown/dropdown.vue2.js +234 -181
  38. package/es/components/dropdown/index.js +10 -17
  39. package/es/components/dropdown/tokens.js +1 -1
  40. package/es/components/empty/empty.vue2.js +27 -27
  41. package/es/components/exception/exception.vue2.js +19 -19
  42. package/es/components/footer-layout/footer-layout.vue2.js +1 -1
  43. package/es/components/form/form-item.vue2.js +77 -77
  44. package/es/components/form/form.vue2.js +37 -37
  45. package/es/components/full-screen/full-screen.vue2.js +26 -15
  46. package/es/components/header-layout/header-layout.vue2.js +27 -27
  47. package/es/components/horizontal-menu/horizontal-menu.vue2.js +43 -43
  48. package/es/components/icon/icon.vue2.js +24 -24
  49. package/es/components/icon-text/icon-text.vue2.js +27 -27
  50. package/es/components/iframe-layout/iframe-layout.vue2.js +18 -18
  51. package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
  52. package/es/components/image/image.vue2.js +73 -73
  53. package/es/components/image-viewer/image-viewer.vue2.js +109 -109
  54. package/es/components/index.js +145 -152
  55. package/es/components/input/input.vue2.js +175 -175
  56. package/es/components/link/link.vue2.js +27 -27
  57. package/es/components/list-cell/list-cell.vue2.js +8 -8
  58. package/es/components/logo/logo.vue2.js +27 -27
  59. package/es/components/md-container/md-container.vue2.js +1 -1
  60. package/es/components/md-vue-playground/md-vue-playground.vue2.js +16 -16
  61. package/es/components/menu/menu-item-group.vue2.js +15 -15
  62. package/es/components/menu/menu-item.vue2.js +56 -56
  63. package/es/components/menu/menu.vue2.js +20 -20
  64. package/es/components/menu/sub-menu.vue2.js +16 -16
  65. package/es/components/message/message.vue2.js +81 -81
  66. package/es/components/multiple-tabs/multiple-tabs.vue2.js +12 -12
  67. package/es/components/multiple-tabs/tab-content.vue2.js +16 -16
  68. package/es/components/overlay/overlay.vue2.js +14 -14
  69. package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
  70. package/es/components/pagination/components/jumper.vue2.js +22 -22
  71. package/es/components/pagination/components/next.vue2.js +12 -12
  72. package/es/components/pagination/components/pager.vue2.js +75 -75
  73. package/es/components/pagination/components/prev.vue2.js +13 -13
  74. package/es/components/pagination/components/sizes.vue2.js +11 -11
  75. package/es/components/pagination/components/total.vue2.js +8 -8
  76. package/es/components/pagination/pagination.vue2.js +28 -28
  77. package/es/components/popconfirm/popconfirm.vue2.js +50 -50
  78. package/es/components/popover/popover.vue2.js +44 -44
  79. package/es/components/popper/arrow.vue2.js +2 -2
  80. package/es/components/popper/content.vue2.js +34 -34
  81. package/es/components/popper/popper.vue2.js +5 -5
  82. package/es/components/popper/trigger.vue2.js +48 -48
  83. package/es/components/qrcode/qrcode.vue2.js +35 -35
  84. package/es/components/radio/radio-button.vue2.js +28 -28
  85. package/es/components/radio/radio-group.vue2.js +26 -26
  86. package/es/components/radio/radio.vue2.js +44 -44
  87. package/es/components/result/result.vue2.js +10 -10
  88. package/es/components/router-view-content/router-view-content.vue2.js +20 -20
  89. package/es/components/row/row.vue2.js +19 -19
  90. package/es/components/scrollbar/bar.vue2.js +19 -19
  91. package/es/components/scrollbar/scrollbar.vue2.js +67 -67
  92. package/es/components/scrollbar/thumb.vue2.js +41 -41
  93. package/es/components/search/search.vue2.js +65 -65
  94. package/es/components/side-menu/side-menu.vue2.js +36 -36
  95. package/es/components/skeleton/skeleton-item.vue2.js +13 -13
  96. package/es/components/skeleton/skeleton.vue2.js +19 -19
  97. package/es/components/switch/switch.vue2.js +128 -128
  98. package/es/components/table/table.vue2.js +70 -70
  99. package/es/components/tabs/tab-bar.vue2.js +15 -15
  100. package/es/components/tabs/tab-nav.vue2.js +33 -33
  101. package/es/components/tabs/tab-pane.vue2.js +21 -21
  102. package/es/components/tabs/tabs.vue2.js +64 -66
  103. package/es/components/tag/tag.vue2.js +7 -7
  104. package/es/components/time-picker/common/picker.vue2.js +14 -14
  105. package/es/components/time-picker/time-picker-com/basic-time-spinner.vue2.js +60 -60
  106. package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +30 -30
  107. package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +57 -57
  108. package/es/components/time-select/time-select.vue2.js +29 -29
  109. package/es/components/tooltip/constants.js +1 -1
  110. package/es/components/tooltip/content.vue2.js +73 -73
  111. package/es/components/tooltip/tooltip.vue2.js +91 -91
  112. package/es/components/tooltip/trigger.vue2.js +33 -33
  113. package/es/components/verify-code/verify-code.vue2.js +25 -25
  114. package/es/index.js +165 -172
  115. package/es/package.json.js +1 -1
  116. package/lib/comp-resolver.cjs +1 -1
  117. package/lib/components/affix/affix.vue2.cjs +1 -1
  118. package/lib/components/alert/alert.vue2.cjs +1 -1
  119. package/lib/components/avatar/avatar.vue2.cjs +1 -1
  120. package/lib/components/backtop/backtop.vue2.cjs +1 -1
  121. package/lib/components/button/button-group.vue2.cjs +1 -1
  122. package/lib/components/button/button.vue2.cjs +1 -1
  123. package/lib/components/card/card.vue2.cjs +1 -1
  124. package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
  125. package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
  126. package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
  127. package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
  128. package/lib/components/clamp/clamp.vue2.cjs +1 -1
  129. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  130. package/lib/components/col/col.vue2.cjs +1 -1
  131. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  132. package/lib/components/color-picker/components/alpha-slider.vue2.cjs +1 -1
  133. package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
  134. package/lib/components/container/aside.vue2.cjs +1 -1
  135. package/lib/components/container/container.vue2.cjs +1 -1
  136. package/lib/components/container/footer.vue2.cjs +1 -1
  137. package/lib/components/container/header.vue2.cjs +1 -1
  138. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  139. package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -1
  140. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  141. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  142. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  143. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  144. package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
  145. package/lib/components/descriptions/description-item.vue2.cjs +1 -1
  146. package/lib/components/descriptions/description.vue2.cjs +1 -1
  147. package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
  148. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  149. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  150. package/lib/components/divider/divider.vue2.cjs +1 -1
  151. package/lib/components/dropdown/dropdown.vue.cjs +1 -1
  152. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  153. package/lib/components/dropdown/index.cjs +1 -1
  154. package/lib/components/dropdown/tokens.cjs +1 -1
  155. package/lib/components/empty/empty.vue2.cjs +1 -1
  156. package/lib/components/exception/exception.vue2.cjs +1 -1
  157. package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
  158. package/lib/components/form/form-item.vue2.cjs +1 -1
  159. package/lib/components/form/form.vue2.cjs +1 -1
  160. package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
  161. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  162. package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
  163. package/lib/components/icon/icon.vue2.cjs +1 -1
  164. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  165. package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
  166. package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
  167. package/lib/components/image/image.vue2.cjs +1 -1
  168. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  169. package/lib/components/index.cjs +1 -1
  170. package/lib/components/input/input.vue2.cjs +1 -1
  171. package/lib/components/link/link.vue2.cjs +1 -1
  172. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  173. package/lib/components/logo/logo.vue2.cjs +1 -1
  174. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  175. package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
  176. package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
  177. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  178. package/lib/components/menu/menu.vue2.cjs +1 -1
  179. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  180. package/lib/components/message/message.vue2.cjs +1 -1
  181. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  182. package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
  183. package/lib/components/overlay/overlay.vue2.cjs +1 -1
  184. package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
  185. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  186. package/lib/components/pagination/components/next.vue2.cjs +1 -1
  187. package/lib/components/pagination/components/pager.vue2.cjs +1 -1
  188. package/lib/components/pagination/components/prev.vue2.cjs +1 -1
  189. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  190. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  191. package/lib/components/pagination/pagination.vue2.cjs +1 -1
  192. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  193. package/lib/components/popover/popover.vue2.cjs +1 -1
  194. package/lib/components/popper/arrow.vue2.cjs +1 -1
  195. package/lib/components/popper/content.vue2.cjs +1 -1
  196. package/lib/components/popper/trigger.vue2.cjs +1 -1
  197. package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
  198. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  199. package/lib/components/radio/radio-group.vue2.cjs +1 -1
  200. package/lib/components/radio/radio.vue2.cjs +1 -1
  201. package/lib/components/result/result.vue2.cjs +1 -1
  202. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  203. package/lib/components/row/row.vue2.cjs +1 -1
  204. package/lib/components/scrollbar/bar.vue2.cjs +1 -1
  205. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  206. package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
  207. package/lib/components/search/search.vue2.cjs +1 -1
  208. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  209. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  210. package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
  211. package/lib/components/switch/switch.vue2.cjs +1 -1
  212. package/lib/components/table/table.vue2.cjs +1 -1
  213. package/lib/components/tabs/tab-bar.vue2.cjs +1 -1
  214. package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
  215. package/lib/components/tabs/tab-pane.vue2.cjs +1 -1
  216. package/lib/components/tabs/tabs.vue2.cjs +1 -1
  217. package/lib/components/tag/tag.vue2.cjs +1 -1
  218. package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
  219. package/lib/components/time-picker/time-picker-com/basic-time-spinner.vue2.cjs +1 -1
  220. package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
  221. package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
  222. package/lib/components/time-select/time-select.vue2.cjs +1 -1
  223. package/lib/components/tooltip/constants.cjs +1 -1
  224. package/lib/components/tooltip/content.vue2.cjs +1 -1
  225. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  226. package/lib/components/tooltip/trigger.vue2.cjs +1 -1
  227. package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
  228. package/lib/index.cjs +1 -1
  229. package/lib/package.json.cjs +1 -1
  230. package/package.json +6 -6
  231. package/web-types.json +1 -1
  232. package/theme-style/vft-back-top.css +0 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as s, computed as u, resolveComponent as y, openBlock as l, createBlock as i, withCtx as C, KeepAlive as g, unref as o, resolveDynamicComponent as d, createCommentVNode as x } from "vue";
1
+ import { defineComponent as s, computed as u, resolveComponent as h, openBlock as a, createBlock as l, withCtx as y, KeepAlive as C, resolveDynamicComponent as p, unref as g, createCommentVNode as x } from "vue";
2
2
  import { getRouterKeyPath as A } from "@vft/router";
3
3
  import { useNamespace as B } from "../../hooks/use-namespace/index.js";
4
4
  import "@popperjs/core";
@@ -15,35 +15,35 @@ const k = (
15
15
  }), S = /* @__PURE__ */ s({
16
16
  ...K,
17
17
  props: {
18
- cacheList: null,
18
+ cacheList: {},
19
19
  openKeepAlive: { type: Boolean, default: !0 },
20
20
  isReloadFlag: { type: Boolean },
21
21
  pageErrorStatus: { type: Boolean },
22
22
  enableErrorHandle: { type: Boolean },
23
- exceptionComp: null
23
+ exceptionComp: {}
24
24
  },
25
25
  setup(t) {
26
- const f = u(() => t.openKeepAlive ? t.cacheList : []), m = u(() => (e) => t.enableErrorHandle && t.pageErrorStatus && t.exceptionComp || e), v = u(() => (e) => {
27
- var a, r, n;
28
- let c = e.name;
29
- return (a = e.meta) != null && a.currentActivePath && (c = (n = (r = e.matched) == null ? void 0 : r.filter((h) => {
30
- var p;
31
- return h.path === ((p = e.meta) == null ? void 0 : p.currentActivePath);
32
- })) == null ? void 0 : n[0].name), t.isReloadFlag ? void 0 : c;
26
+ const d = u(() => t.openKeepAlive ? t.cacheList : []), c = u(() => (e) => t.enableErrorHandle && t.pageErrorStatus && t.exceptionComp || e), v = u(() => (e) => {
27
+ var o, r, n;
28
+ let i = e.name;
29
+ return (o = e.meta) != null && o.currentActivePath && (i = (n = (r = e.matched) == null ? void 0 : r.filter((f) => {
30
+ var m;
31
+ return f.path === ((m = e.meta) == null ? void 0 : m.currentActivePath);
32
+ })) == null ? void 0 : n[0].name), t.isReloadFlag ? void 0 : i;
33
33
  });
34
- return (e, c) => {
35
- const a = y("router-view");
36
- return l(), i(a, null, {
37
- default: C(({ Component: r, route: n }) => [
38
- t.openKeepAlive ? (l(), i(g, {
34
+ return (e, i) => {
35
+ const o = h("router-view");
36
+ return a(), l(o, null, {
37
+ default: y(({ Component: r, route: n }) => [
38
+ e.openKeepAlive ? (a(), l(C, {
39
39
  key: 0,
40
- include: o(f),
41
- exclude: o(v)(n)
40
+ include: d.value,
41
+ exclude: v.value(n)
42
42
  }, [
43
- t.isReloadFlag ? (l(), i(d(o(m)(r)), {
44
- key: o(A)(n)
43
+ e.isReloadFlag ? (a(), l(p(c.value(r)), {
44
+ key: g(A)(n)
45
45
  })) : x("", !0)
46
- ], 1032, ["include", "exclude"])) : (l(), i(d(o(m)(r)), {
46
+ ], 1032, ["include", "exclude"])) : (a(), l(p(c.value(r)), {
47
47
  key: n.fullPath
48
48
  }))
49
49
  ]),
@@ -1,6 +1,6 @@
1
- import { defineComponent as a, computed as r, provide as m, openBlock as p, createBlock as f, resolveDynamicComponent as c, normalizeClass as g, unref as n, normalizeStyle as d, withCtx as y, renderSlot as _ } from "vue";
2
- import { rowContextKey as C } from "./constants.js";
3
- import { useNamespace as j } from "../../hooks/use-namespace/index.js";
1
+ import { defineComponent as s, computed as r, provide as u, openBlock as p, createBlock as m, resolveDynamicComponent as f, normalizeClass as c, normalizeStyle as g, withCtx as d, renderSlot as y } from "vue";
2
+ import { rowContextKey as _ } from "./constants.js";
3
+ import { useNamespace as v } from "../../hooks/use-namespace/index.js";
4
4
  import "@popperjs/core";
5
5
  import "lodash";
6
6
  import "../../hooks/use-z-index/index.js";
@@ -9,41 +9,41 @@ import "@vft/utils";
9
9
  import "../../utils/ns-cover.js";
10
10
  const o = (
11
11
  /* hoist-static*/
12
- j("row")
13
- ), w = a({
12
+ v("row")
13
+ ), C = s({
14
14
  name: o.b()
15
- }), D = /* @__PURE__ */ a({
16
- ...w,
15
+ }), S = /* @__PURE__ */ s({
16
+ ...C,
17
17
  props: {
18
18
  tag: { default: "div" },
19
19
  gutter: { default: 0 },
20
20
  justify: { default: "start" },
21
21
  align: { default: "top" }
22
22
  },
23
- setup(s) {
24
- const t = s, i = r(() => t.gutter);
25
- m(C, {
26
- gutter: i
23
+ setup(a) {
24
+ const t = a, n = r(() => t.gutter);
25
+ u(_, {
26
+ gutter: n
27
27
  });
28
- const l = r(() => {
28
+ const i = r(() => {
29
29
  const e = {};
30
30
  return t.gutter && (e.marginRight = e.marginLeft = `-${t.gutter / 2}px`), e;
31
- }), u = r(() => [
31
+ }), l = r(() => [
32
32
  o.b(),
33
33
  o.is(`justify-${t.justify}`, t.justify !== "start"),
34
34
  o.is(`align-${t.align}`, t.align !== "top")
35
35
  ]);
36
- return (e, x) => (p(), f(c(s.tag), {
37
- class: g(n(u)),
38
- style: d(n(l))
36
+ return (e, j) => (p(), m(f(e.tag), {
37
+ class: c(l.value),
38
+ style: g(i.value)
39
39
  }, {
40
- default: y(() => [
41
- _(e.$slots, "default")
40
+ default: d(() => [
41
+ y(e.$slots, "default")
42
42
  ]),
43
43
  _: 3
44
44
  }, 8, ["class", "style"]));
45
45
  }
46
46
  });
47
47
  export {
48
- D as default
48
+ S as default
49
49
  };
@@ -1,33 +1,33 @@
1
- import { defineComponent as m, ref as i, openBlock as u, createElementBlock as h, Fragment as d, createVNode as n } from "vue";
2
- import { GAP as r } from "./util.js";
3
- import f from "./thumb.vue2.js";
4
- const z = /* @__PURE__ */ m({
1
+ import { defineComponent as u, ref as i, openBlock as c, createElementBlock as h, Fragment as d, createVNode as r } from "vue";
2
+ import { GAP as s } from "./util.js";
3
+ import n from "./thumb.vue2.js";
4
+ const w = /* @__PURE__ */ u({
5
5
  __name: "bar",
6
6
  props: {
7
7
  always: { type: Boolean, default: !0 },
8
- width: null,
9
- height: null,
8
+ width: {},
9
+ height: {},
10
10
  ratioX: { default: 1 },
11
11
  ratioY: { default: 1 }
12
12
  },
13
- setup(e, { expose: s }) {
14
- const a = i(0), l = i(0);
15
- return s({
16
- handleScroll: (t) => {
17
- if (t) {
18
- const o = t.offsetHeight - r, c = t.offsetWidth - r;
19
- l.value = t.scrollTop * 100 / o * e.ratioY, a.value = t.scrollLeft * 100 / c * e.ratioX;
13
+ setup(o, { expose: f }) {
14
+ const t = i(0), a = i(0);
15
+ return f({
16
+ handleScroll: (e) => {
17
+ if (e) {
18
+ const l = e.offsetHeight - s, m = e.offsetWidth - s;
19
+ a.value = e.scrollTop * 100 / l * o.ratioY, t.value = e.scrollLeft * 100 / m * o.ratioX;
20
20
  }
21
21
  }
22
- }), (t, o) => (u(), h(d, null, [
23
- n(f, {
24
- move: a.value,
22
+ }), (e, l) => (c(), h(d, null, [
23
+ r(n, {
24
+ move: t.value,
25
25
  ratio: e.ratioX,
26
26
  size: e.width,
27
27
  always: e.always
28
28
  }, null, 8, ["move", "ratio", "size", "always"]),
29
- n(f, {
30
- move: l.value,
29
+ r(n, {
30
+ move: a.value,
31
31
  ratio: e.ratioY,
32
32
  size: e.height,
33
33
  vertical: "",
@@ -37,5 +37,5 @@ const z = /* @__PURE__ */ m({
37
37
  }
38
38
  });
39
39
  export {
40
- z as default
40
+ w as default
41
41
  };
@@ -1,21 +1,21 @@
1
- import { defineComponent as $, ref as o, computed as g, watch as N, nextTick as R, provide as D, reactive as G, onMounted as X, onUpdated as Y, openBlock as b, createElementBlock as q, normalizeClass as S, unref as m, createElementVNode as F, normalizeStyle as p, createBlock as B, resolveDynamicComponent as I, withCtx as J, renderSlot as Q, createCommentVNode as Z } from "vue";
1
+ import { defineComponent as L, ref as o, computed as w, watch as T, nextTick as E, provide as j, reactive as D, onMounted as G, onUpdated as X, openBlock as g, createElementBlock as Y, normalizeClass as b, unref as q, createElementVNode as F, normalizeStyle as N, createBlock as R, resolveDynamicComponent as I, withCtx as J, renderSlot as Q, createCommentVNode as Z } from "vue";
2
2
  import { useResizeObserver as _, useEventListener as ee } from "@vueuse/core";
3
- import { isNumber as r, addUnit as W, isObject as te } from "@vft/utils";
3
+ import { isNumber as r, addUnit as B, isObject as te } from "@vft/utils";
4
4
  import { useNamespace as le } from "../../hooks/use-namespace/index.js";
5
5
  import "@popperjs/core";
6
6
  import "lodash";
7
7
  import "../../hooks/use-z-index/index.js";
8
- import { debugWarn as M } from "../../utils/error.js";
8
+ import { debugWarn as W } from "../../utils/error.js";
9
9
  import "../../utils/ns-cover.js";
10
- import { GAP as d } from "./util.js";
10
+ import { GAP as m } from "./util.js";
11
11
  import ae from "./bar.vue2.js";
12
12
  import { scrollbarContextKey as oe } from "./constants.js";
13
- const L = "ElScrollbar", s = (
13
+ const M = "ElScrollbar", s = (
14
14
  /* hoist-static*/
15
15
  le("scrollbar")
16
- ), ie = $({
16
+ ), ie = L({
17
17
  name: s.b()
18
- }), ge = /* @__PURE__ */ $({
18
+ }), ge = /* @__PURE__ */ L({
19
19
  ...ie,
20
20
  props: {
21
21
  height: { default: "" },
@@ -32,101 +32,101 @@ const L = "ElScrollbar", s = (
32
32
  },
33
33
  emits: {
34
34
  scroll: ({
35
- scrollTop: t,
35
+ scrollTop: l,
36
36
  scrollLeft: v
37
- }) => [t, v].every(r)
37
+ }) => [l, v].every(r)
38
38
  },
39
- setup(t, { expose: v, emit: K }) {
39
+ setup(l, { expose: v, emit: $ }) {
40
40
  let n, c;
41
- const x = o(), l = o(), z = o(), C = o("0"), H = o("0"), h = o(), k = o(1), T = o(1), O = g(() => {
41
+ const S = o(), t = o(), p = o(), x = o("0"), z = o("0"), d = o(), C = o(1), H = o(1), K = w(() => {
42
42
  const e = {};
43
- return t.height && (e.height = W(t.height)), t.maxHeight && (e.maxHeight = W(t.maxHeight)), [t.wrapStyle, e];
44
- }), A = g(() => [
45
- t.wrapClass,
43
+ return l.height && (e.height = B(l.height)), l.maxHeight && (e.maxHeight = B(l.maxHeight)), [l.wrapStyle, e];
44
+ }), O = w(() => [
45
+ l.wrapClass,
46
46
  s.e("wrap"),
47
- { [s.em("wrap", "hidden-default")]: !t.native }
48
- ]), P = g(() => [s.e("view"), t.viewClass]), E = () => {
47
+ { [s.em("wrap", "hidden-default")]: !l.native }
48
+ ]), A = w(() => [s.e("view"), l.viewClass]), k = () => {
49
49
  var e;
50
- l.value && ((e = h.value) == null || e.handleScroll(l.value), K("scroll", {
51
- scrollTop: l.value.scrollTop,
52
- scrollLeft: l.value.scrollLeft
50
+ t.value && ((e = d.value) == null || e.handleScroll(t.value), $("scroll", {
51
+ scrollTop: t.value.scrollTop,
52
+ scrollLeft: t.value.scrollLeft
53
53
  }));
54
54
  };
55
- function U(e, a) {
56
- te(e) ? l.value.scrollTo(e) : r(e) && r(a) && l.value.scrollTo(e, a);
55
+ function P(e, a) {
56
+ te(e) ? t.value.scrollTo(e) : r(e) && r(a) && t.value.scrollTo(e, a);
57
57
  }
58
- const V = (e) => {
58
+ const U = (e) => {
59
59
  if (!r(e)) {
60
- M(L, "value must be a number");
60
+ W(M, "value must be a number");
61
61
  return;
62
62
  }
63
- l.value.scrollTop = e;
64
- }, j = (e) => {
63
+ t.value.scrollTop = e;
64
+ }, V = (e) => {
65
65
  if (!r(e)) {
66
- M(L, "value must be a number");
66
+ W(M, "value must be a number");
67
67
  return;
68
68
  }
69
- l.value.scrollLeft = e;
69
+ t.value.scrollLeft = e;
70
70
  }, i = () => {
71
- if (!l.value)
71
+ if (!t.value)
72
72
  return;
73
- const e = l.value.offsetHeight - d, a = l.value.offsetWidth - d, y = e ** 2 / l.value.scrollHeight, w = a ** 2 / l.value.scrollWidth, f = Math.max(y, t.minSize), u = Math.max(w, t.minSize);
74
- k.value = y / (e - y) / (f / (e - f)), T.value = w / (a - w) / (u / (a - u)), H.value = f + d < e ? `${f}px` : "", C.value = u + d < a ? `${u}px` : "";
73
+ const e = t.value.offsetHeight - m, a = t.value.offsetWidth - m, h = e ** 2 / t.value.scrollHeight, y = a ** 2 / t.value.scrollWidth, f = Math.max(h, l.minSize), u = Math.max(y, l.minSize);
74
+ C.value = h / (e - h) / (f / (e - f)), H.value = y / (a - y) / (u / (a - u)), z.value = f + m < e ? `${f}px` : "", x.value = u + m < a ? `${u}px` : "";
75
75
  };
76
- return N(
77
- () => t.noresize,
76
+ return T(
77
+ () => l.noresize,
78
78
  (e) => {
79
- e ? (n == null || n(), c == null || c()) : ({ stop: n } = _(z, i), c = ee("resize", i));
79
+ e ? (n == null || n(), c == null || c()) : ({ stop: n } = _(p, i), c = ee("resize", i));
80
80
  },
81
81
  { immediate: !0 }
82
- ), N(
83
- () => [t.maxHeight, t.height],
82
+ ), T(
83
+ () => [l.maxHeight, l.height],
84
84
  () => {
85
- t.native || R(() => {
85
+ l.native || E(() => {
86
86
  var e;
87
- i(), l.value && ((e = h.value) == null || e.handleScroll(l.value));
87
+ i(), t.value && ((e = d.value) == null || e.handleScroll(t.value));
88
88
  });
89
89
  }
90
- ), D(
90
+ ), j(
91
91
  oe,
92
- G({
93
- scrollbarElement: x,
94
- wrapElement: l
92
+ D({
93
+ scrollbarElement: S,
94
+ wrapElement: t
95
95
  })
96
- ), X(() => {
97
- t.native || R(() => {
96
+ ), G(() => {
97
+ l.native || E(() => {
98
98
  i();
99
99
  });
100
- }), Y(() => i()), v({
100
+ }), X(() => i()), v({
101
101
  /** @description scrollbar wrap ref */
102
- wrapRef: l,
102
+ wrapRef: t,
103
103
  /** @description update scrollbar state manually */
104
104
  update: i,
105
105
  /** @description scrolls to a particular set of coordinates */
106
- scrollTo: U,
106
+ scrollTo: P,
107
107
  /** @description set distance to scroll top */
108
- setScrollTop: V,
108
+ setScrollTop: U,
109
109
  /** @description set distance to scroll left */
110
- setScrollLeft: j,
110
+ setScrollLeft: V,
111
111
  /** @description handle scroll event */
112
- handleScroll: E
113
- }), (e, a) => (b(), q("div", {
112
+ handleScroll: k
113
+ }), (e, a) => (g(), Y("div", {
114
114
  ref_key: "scrollbarRef",
115
- ref: x,
116
- class: S(m(s).b())
115
+ ref: S,
116
+ class: b(q(s).b())
117
117
  }, [
118
118
  F("div", {
119
119
  ref_key: "wrapRef",
120
- ref: l,
121
- class: S(m(A)),
122
- style: p(m(O)),
123
- onScroll: E
120
+ ref: t,
121
+ class: b(O.value),
122
+ style: N(K.value),
123
+ onScroll: k
124
124
  }, [
125
- (b(), B(I(t.tag), {
125
+ (g(), R(I(e.tag), {
126
126
  ref_key: "resizeRef",
127
- ref: z,
128
- class: S(m(P)),
129
- style: p(t.viewStyle)
127
+ ref: p,
128
+ class: b(A.value),
129
+ style: N(e.viewStyle)
130
130
  }, {
131
131
  default: J(() => [
132
132
  Q(e.$slots, "default")
@@ -134,15 +134,15 @@ const L = "ElScrollbar", s = (
134
134
  _: 3
135
135
  }, 8, ["class", "style"]))
136
136
  ], 38),
137
- t.native ? Z("", !0) : (b(), B(ae, {
137
+ e.native ? Z("", !0) : (g(), R(ae, {
138
138
  key: 0,
139
139
  ref_key: "barRef",
140
- ref: h,
141
- height: H.value,
142
- width: C.value,
143
- always: t.always,
144
- "ratio-x": T.value,
145
- "ratio-y": k.value
140
+ ref: d,
141
+ height: z.value,
142
+ width: x.value,
143
+ always: e.always,
144
+ "ratio-x": H.value,
145
+ "ratio-y": C.value
146
146
  }, null, 8, ["height", "width", "always", "ratio-x", "ratio-y"]))
147
147
  ], 2));
148
148
  }
@@ -1,5 +1,5 @@
1
- import { defineComponent as T, inject as D, ref as v, computed as E, onBeforeUnmount as N, toRef as S, openBlock as A, createBlock as O, Transition as j, unref as u, 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";
1
+ import { defineComponent as T, inject as D, ref as m, computed as E, onBeforeUnmount as N, toRef as S, openBlock as A, createBlock as O, Transition as j, unref as v, 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";
3
3
  import "@vft/utils";
4
4
  import { throwError as q } from "../../utils/error.js";
5
5
  import "lodash";
@@ -13,20 +13,20 @@ const W = "Thumb", se = /* @__PURE__ */ T({
13
13
  __name: "thumb",
14
14
  props: {
15
15
  vertical: { type: Boolean },
16
- size: null,
17
- move: null,
18
- ratio: null,
16
+ size: {},
17
+ move: {},
18
+ ratio: {},
19
19
  always: { type: Boolean }
20
20
  },
21
- setup(a) {
22
- const o = D(G), c = F("scrollbar");
21
+ setup(s) {
22
+ const o = D(G), u = F("scrollbar");
23
23
  o || q(W, "can not inject scrollbar context");
24
- const n = v(), r = v(), f = v({}), i = v(!1);
25
- let m = !1, d = !1, b = _ ? document.onselectstart : null;
26
- const e = E(() => J[a.vertical ? "vertical" : "horizontal"]), k = E(
24
+ const l = m(), a = m(), f = m({}), c = m(!1);
25
+ let i = !1, d = !1, b = V ? document.onselectstart : null;
26
+ const e = E(() => J[s.vertical ? "vertical" : "horizontal"]), k = E(
27
27
  () => Q({
28
- size: a.size,
29
- move: a.move,
28
+ size: s.size,
29
+ move: s.move,
30
30
  bar: e.value
31
31
  })
32
32
  ), g = E(
@@ -34,38 +34,38 @@ const W = "Thumb", se = /* @__PURE__ */ T({
34
34
  // offsetRatioX = original width of thumb / current width of thumb / ratioX
35
35
  // offsetRatioY = original height of thumb / current height of thumb / ratioY
36
36
  // instance height = wrap height - GAP
37
- n.value[e.value.offset] ** 2 / o.wrapElement[e.value.scrollSize] / a.ratio / r.value[e.value.offset]
37
+ l.value[e.value.offset] ** 2 / o.wrapElement[e.value.scrollSize] / s.ratio / a.value[e.value.offset]
38
38
  )
39
39
  ), B = (t) => {
40
- var s;
40
+ var r;
41
41
  if (t.stopPropagation(), t.ctrlKey || [1, 2].includes(t.button))
42
42
  return;
43
- (s = window.getSelection()) == null || s.removeAllRanges(), L(t);
44
- const l = t.currentTarget;
45
- l && (f.value[e.value.axis] = l[e.value.offset] - (t[e.value.client] - l.getBoundingClientRect()[e.value.direction]));
46
- }, x = (t) => {
47
- if (!r.value || !n.value || !o.wrapElement)
43
+ (r = window.getSelection()) == null || r.removeAllRanges(), M(t);
44
+ const n = t.currentTarget;
45
+ n && (f.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)
48
48
  return;
49
- const l = Math.abs(
49
+ const n = Math.abs(
50
50
  t.target.getBoundingClientRect()[e.value.direction] - t[e.value.client]
51
- ), s = r.value[e.value.offset] / 2, h = (l - s) * 100 * g.value / n.value[e.value.offset];
51
+ ), r = a.value[e.value.offset] / 2, h = (n - r) * 100 * g.value / l.value[e.value.offset];
52
52
  o.wrapElement[e.value.scroll] = h * o.wrapElement[e.value.scrollSize] / 100;
53
- }, L = (t) => {
54
- t.stopImmediatePropagation(), m = !0, document.addEventListener("mousemove", w), document.addEventListener("mouseup", p), b = document.onselectstart, document.onselectstart = () => !1;
53
+ }, M = (t) => {
54
+ t.stopImmediatePropagation(), i = !0, document.addEventListener("mousemove", w), document.addEventListener("mouseup", p), b = document.onselectstart, document.onselectstart = () => !1;
55
55
  }, w = (t) => {
56
- if (!n.value || !r.value || m === !1)
56
+ if (!l.value || !a.value || i === !1)
57
57
  return;
58
- const l = f.value[e.value.axis];
59
- if (!l)
58
+ const n = f.value[e.value.axis];
59
+ if (!n)
60
60
  return;
61
- const s = (n.value.getBoundingClientRect()[e.value.direction] - t[e.value.client]) * -1, h = r.value[e.value.offset] - l, R = (s - h) * 100 * g.value / n.value[e.value.offset];
61
+ const r = (l.value.getBoundingClientRect()[e.value.direction] - t[e.value.client]) * -1, h = a.value[e.value.offset] - n, R = (r - h) * 100 * g.value / l.value[e.value.offset];
62
62
  o.wrapElement[e.value.scroll] = R * o.wrapElement[e.value.scrollSize] / 100;
63
63
  }, p = () => {
64
- m = !1, f.value[e.value.axis] = 0, document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", p), y(), d && (i.value = !1);
65
- }, M = () => {
66
- d = !1, i.value = !!a.size;
64
+ i = !1, f.value[e.value.axis] = 0, document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", p), y(), d && (c.value = !1);
65
+ }, x = () => {
66
+ d = !1, c.value = !!s.size;
67
67
  }, H = () => {
68
- d = !0, i.value = m;
68
+ d = !0, c.value = i;
69
69
  };
70
70
  N(() => {
71
71
  y(), document.removeEventListener("mouseup", p);
@@ -76,30 +76,30 @@ const W = "Thumb", se = /* @__PURE__ */ T({
76
76
  return P(
77
77
  S(o, "scrollbarElement"),
78
78
  "mousemove",
79
- M
79
+ x
80
80
  ), P(
81
81
  S(o, "scrollbarElement"),
82
82
  "mouseleave",
83
83
  H
84
- ), (t, l) => (A(), O(j, {
85
- name: u(c).b("fade")
84
+ ), (t, n) => (A(), O(j, {
85
+ name: v(u).b("fade")
86
86
  }, {
87
87
  default: K(() => [
88
88
  U(z("div", {
89
89
  ref_key: "instance",
90
- ref: n,
91
- class: C([u(c).e("bar"), u(c).is(u(e).key)]),
92
- onMousedown: x
90
+ ref: l,
91
+ class: C([v(u).e("bar"), v(u).is(e.value.key)]),
92
+ onMousedown: L
93
93
  }, [
94
94
  z("div", {
95
95
  ref_key: "thumb",
96
- ref: r,
97
- class: C(u(c).e("thumb")),
98
- style: I(u(k)),
96
+ ref: a,
97
+ class: C(v(u).e("thumb")),
98
+ style: _(k.value),
99
99
  onMousedown: B
100
100
  }, null, 38)
101
101
  ], 34), [
102
- [V, a.always || i.value]
102
+ [I, t.always || c.value]
103
103
  ])
104
104
  ]),
105
105
  _: 1