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,4 +1,4 @@
1
- import { defineComponent as r, computed as m, openBlock as l, createElementBlock as i, normalizeClass as a, unref as o, normalizeStyle as c, renderSlot as p } from "vue";
1
+ import { defineComponent as o, computed as m, openBlock as n, createElementBlock as a, normalizeClass as i, unref as l, normalizeStyle as c, renderSlot as p } from "vue";
2
2
  import { useNamespace as f } from "../../hooks/use-namespace/index.js";
3
3
  import "@popperjs/core";
4
4
  import "lodash";
@@ -9,20 +9,20 @@ import "../../utils/ns-cover.js";
9
9
  const e = (
10
10
  /* hoist-static*/
11
11
  f("footer")
12
- ), h = r({
12
+ ), h = o({
13
13
  name: e.b()
14
- }), S = /* @__PURE__ */ r({
14
+ }), S = /* @__PURE__ */ o({
15
15
  ...h,
16
16
  props: {
17
- height: null
17
+ height: {}
18
18
  },
19
19
  setup(t) {
20
- const n = m(
20
+ const r = m(
21
21
  () => t.height ? e.cssVarBlock({ height: u(t.height) }) : {}
22
22
  );
23
- return (s, d) => (l(), i("footer", {
24
- class: a(o(e).b()),
25
- style: c(o(n))
23
+ return (s, d) => (n(), a("footer", {
24
+ class: i(l(e).b()),
25
+ style: c(r.value)
26
26
  }, [
27
27
  p(s.$slots, "default")
28
28
  ], 6));
@@ -1,4 +1,4 @@
1
- import { defineComponent as r, computed as m, openBlock as a, createElementBlock as l, normalizeClass as i, unref as o, normalizeStyle as c, renderSlot as p } from "vue";
1
+ import { defineComponent as o, computed as s, openBlock as a, createElementBlock as m, normalizeClass as i, unref as l, normalizeStyle as c, renderSlot as p } from "vue";
2
2
  import { useNamespace as h } from "../../hooks/use-namespace/index.js";
3
3
  import "@popperjs/core";
4
4
  import "lodash";
@@ -9,22 +9,22 @@ import "../../utils/ns-cover.js";
9
9
  const e = (
10
10
  /* hoist-static*/
11
11
  h("header")
12
- ), d = r({
12
+ ), d = o({
13
13
  name: e.b()
14
- }), S = /* @__PURE__ */ r({
14
+ }), S = /* @__PURE__ */ o({
15
15
  ...d,
16
16
  props: {
17
- height: null
17
+ height: {}
18
18
  },
19
19
  setup(t) {
20
- const n = m(() => t.height ? e.cssVarBlock({
20
+ const r = s(() => t.height ? e.cssVarBlock({
21
21
  height: u(t.height)
22
22
  }) : {});
23
- return (s, f) => (a(), l("header", {
24
- class: i(o(e).b()),
25
- style: c(o(n))
23
+ return (n, f) => (a(), m("header", {
24
+ class: i(l(e).b()),
25
+ style: c(r.value)
26
26
  }, [
27
- p(s.$slots, "default")
27
+ p(n.$slots, "default")
28
28
  ], 6));
29
29
  }
30
30
  });
@@ -1,4 +1,4 @@
1
- import { defineComponent as f, ref as u, computed as k, openBlock as l, createBlock as d, Transition as b, withCtx as C, withDirectives as g, createElementVNode as a, normalizeStyle as z, unref as p, withModifiers as M, normalizeClass as $, createElementBlock as B, Fragment as E, renderList as S, vShow as A } from "vue";
1
+ import { defineComponent as f, ref as a, computed as k, openBlock as n, createBlock as d, Transition as b, withCtx as C, withDirectives as g, createElementVNode as u, normalizeStyle as z, withModifiers as M, normalizeClass as $, unref as l, createElementBlock as B, Fragment as E, renderList as S, vShow as A } from "vue";
2
2
  import { useNamespace as F } from "../../hooks/use-namespace/index.js";
3
3
  import "@popperjs/core";
4
4
  import "lodash";
@@ -84,67 +84,67 @@ import "../md-vue-playground/index.js";
84
84
  import "../md-code-demo/index.js";
85
85
  import "../md-code-tabs/index.js";
86
86
  import "../message/index.js";
87
- const N = { class: "vft-sub-menu" }, x = (
87
+ const N = { class: "vft-sub-menu" }, v = (
88
88
  /* hoist-static*/
89
89
  F("context-menu")
90
90
  ), R = f({
91
- name: x.b()
92
- }), vo = /* @__PURE__ */ f({
91
+ name: v.b()
92
+ }), xo = /* @__PURE__ */ f({
93
93
  ...R,
94
94
  props: {
95
- axis: null,
96
- styles: null,
97
- width: null,
98
- items: null
95
+ axis: {},
96
+ styles: {},
97
+ width: {},
98
+ items: {}
99
99
  },
100
- setup(r) {
101
- let s = u();
102
- const v = k(() => {
103
- const { x: t, y: o } = r.axis || { x: 0, y: 0 }, i = (r.items || []).length * 40, m = r.width || 0, n = document.body, w = n.clientWidth < t + m ? t - m : t, y = n.clientHeight < o + i ? o - i : o;
100
+ setup(e) {
101
+ let s = a();
102
+ const x = k(() => {
103
+ const { x: t, y: o } = e.axis || { x: 0, y: 0 }, i = (e.items || []).length * 40, m = e.width || 0, p = document.body, w = p.clientWidth < t + m ? t - m : t, y = p.clientHeight < o + i ? o - i : o;
104
104
  return {
105
105
  zIndex: 3e3,
106
- ...r.styles,
106
+ ...e.styles,
107
107
  position: "fixed",
108
- width: `${r.width}px`,
108
+ width: `${e.width}px`,
109
109
  left: `${w + 1}px`,
110
110
  top: `${y + 1}px`
111
111
  };
112
112
  });
113
- let e = u(!1);
113
+ let r = a(!1);
114
114
  H(() => {
115
- e.value = !0;
115
+ r.value = !0;
116
116
  }, 0), I(s, () => {
117
- e.value = !1;
117
+ r.value = !1;
118
118
  }, {
119
119
  listenerOptions: {
120
120
  capture: !0
121
121
  }
122
122
  }), c(window, "scroll", () => {
123
- e.value = !1;
123
+ r.value = !1;
124
124
  }, {
125
125
  capture: !0
126
126
  }), c(window, "drag", () => {
127
- e.value = !1;
127
+ r.value = !1;
128
128
  }, {
129
129
  capture: !0
130
130
  });
131
131
  function h(t) {
132
132
  var o;
133
- t != null && t.disabled || ((o = t.handler) == null || o.call(t), e.value = !1);
133
+ t != null && t.disabled || ((o = t.handler) == null || o.call(t), r.value = !1);
134
134
  }
135
- return (t, o) => (l(), d(b, { name: "vft-zoom-in-top" }, {
135
+ return (t, o) => (n(), d(b, { name: "vft-zoom-in-top" }, {
136
136
  default: C(() => [
137
- g(a("div", {
137
+ g(u("div", {
138
138
  ref_key: "contextMenuRef",
139
139
  ref: s,
140
- style: z(p(v)),
140
+ style: z(x.value),
141
141
  onClick: o[0] || (o[0] = M(() => {
142
142
  }, ["stop"])),
143
- class: $([p(x).b(), "vft-menu"])
143
+ class: $([l(v).b(), "vft-menu"])
144
144
  }, [
145
- a("div", N, [
146
- (l(!0), B(E, null, S(r.items, (i, m) => (l(), d(p(L), {
147
- onClick: (n) => h(i),
145
+ u("div", N, [
146
+ (n(!0), B(E, null, S(t.items, (i, m) => (n(), d(l(L), {
147
+ onClick: (p) => h(i),
148
148
  index: m + i.text,
149
149
  title: i.text,
150
150
  divider: i.divider,
@@ -155,7 +155,7 @@ const N = { class: "vft-sub-menu" }, x = (
155
155
  }, null, 8, ["onClick", "index", "title", "divider", "disabled", "icon"]))), 128))
156
156
  ])
157
157
  ], 6), [
158
- [A, p(e)]
158
+ [A, l(r)]
159
159
  ])
160
160
  ]),
161
161
  _: 1
@@ -163,5 +163,5 @@ const N = { class: "vft-sub-menu" }, x = (
163
163
  }
164
164
  });
165
165
  export {
166
- vo as default
166
+ xo as default
167
167
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as ne, ref as y, computed as m, unref as l, watch as re, nextTick as oe, openBlock as f, createElementBlock as p, normalizeClass as M, withModifiers as ue, createElementVNode as $, createCommentVNode as ie, Fragment as C, renderList as O, toDisplayString as ce, createVNode as de } from "vue";
1
+ import { defineComponent as ne, ref as y, computed as p, unref as m, watch as oe, nextTick as re, openBlock as l, createElementBlock as f, normalizeClass as M, withModifiers as ue, createElementVNode as $, createCommentVNode as ie, Fragment as C, renderList as O, toDisplayString as ce, createVNode as de } from "vue";
2
2
  import j from "dayjs";
3
3
  import { flatten as le } from "lodash";
4
4
  import { useNamespace as fe } from "../../../hooks/use-namespace/index.js";
@@ -8,42 +8,42 @@ import "@vueuse/core";
8
8
  import "@vft/utils";
9
9
  import "../../../utils/ns-cover.js";
10
10
  import { basicDateTableProps as pe } from "../props/basic-date-table.js";
11
- import { castArray as N, buildPickerTable as me } from "../utils.js";
11
+ import { castArray as x, buildPickerTable as me } from "../utils.js";
12
12
  import he from "./basic-cell-render.js";
13
13
  const ye = ["onMousedown"], De = {
14
14
  key: 0,
15
15
  scope: "col"
16
- }, ke = ["aria-label"], ge = ["aria-current", "aria-selected", "tabindex"], Re = /* @__PURE__ */ ne({
16
+ }, ke = ["aria-label"], ve = ["aria-current", "aria-selected", "tabindex"], Re = /* @__PURE__ */ ne({
17
17
  __name: "basic-date-table",
18
18
  props: pe,
19
19
  emits: ["changerange", "pick", "select"],
20
20
  setup(L, { expose: z, emit: d }) {
21
- const a = L, x = fe("date-table"), _ = y("zh-cn"), S = y(), k = y(), V = y(), E = y(), B = y([[], [], [], [], [], []]);
22
- let g = !1;
23
- const h = a.date.$locale().weekStart || 7, R = a.date.locale("en").localeData().weekdaysShort().map((e) => e.toLowerCase()), v = m(() => h > 3 ? 7 - h : -h), b = m(() => {
21
+ const a = L, N = fe("date-table"), _ = y("zh-cn"), S = y(), k = y(), V = y(), E = y(), B = y([[], [], [], [], [], []]);
22
+ let v = !1;
23
+ const h = a.date.$locale().weekStart || 7, R = a.date.locale("en").localeData().weekdaysShort().map((e) => e.toLowerCase()), g = p(() => h > 3 ? 7 - h : -h), b = p(() => {
24
24
  const e = a.date.startOf("month");
25
25
  return e.subtract(e.day() || 7, "day");
26
- }), U = m(() => R.concat(R).slice(
26
+ }), U = p(() => R.concat(R).slice(
27
27
  h,
28
28
  h + 7
29
- )), W = m(() => le(D.value).some((e) => e.isCurrent)), G = m(() => {
29
+ )), W = p(() => le(D.value).some((e) => e.isCurrent)), G = p(() => {
30
30
  const e = a.date.startOf("month"), t = e.day() || 7, s = e.daysInMonth(), n = e.subtract(1, "month").daysInMonth();
31
31
  return {
32
32
  startOfMonthDay: t,
33
33
  dateCountOfMonth: s,
34
34
  dateCountOfLastMonth: n
35
35
  };
36
- }), K = m(() => a.selectionMode === "dates" ? N(a.parsedValue) : []), q = (e, {
36
+ }), K = p(() => a.selectionMode === "dates" ? x(a.parsedValue) : []), q = (e, {
37
37
  count: t,
38
38
  rowIndex: s,
39
39
  columnIndex: n
40
40
  }) => {
41
- const { startOfMonthDay: r, dateCountOfMonth: i, dateCountOfLastMonth: o } = l(G), c = l(v);
41
+ const { startOfMonthDay: o, dateCountOfMonth: i, dateCountOfLastMonth: r } = m(G), c = m(g);
42
42
  if (s >= 0 && s <= 1) {
43
- const u = r + c < 0 ? 7 + r + c : r + c;
43
+ const u = o + c < 0 ? 7 + o + c : o + c;
44
44
  if (n + s * 7 >= u)
45
45
  return e.text = t, !0;
46
- e.text = o - (u - n % 7) + 1 + s * 7, e.type = "prev-month";
46
+ e.text = r - (u - n % 7) + 1 + s * 7, e.type = "prev-month";
47
47
  } else
48
48
  return t <= i ? e.text = t : (e.text = t - i, e.type = "next-month"), !0;
49
49
  return !1;
@@ -51,42 +51,42 @@ const ye = ["onMousedown"], De = {
51
51
  columnIndex: t,
52
52
  rowIndex: s
53
53
  }, n) => {
54
- const { disabledDate: r, cellClassName: i } = a, o = l(K), c = q(e, { count: n, rowIndex: s, columnIndex: t }), u = e.dayjs.toDate();
55
- return e.selected = o.find(
54
+ const { disabledDate: o, cellClassName: i } = a, r = m(K), c = q(e, { count: n, rowIndex: s, columnIndex: t }), u = e.dayjs.toDate();
55
+ return e.selected = r.find(
56
56
  (se) => se.valueOf() === e.dayjs.valueOf()
57
- ), e.isSelected = !!e.selected, e.isCurrent = A(e), e.disabled = r == null ? void 0 : r(u), e.customClass = i == null ? void 0 : i(u), c;
57
+ ), e.isSelected = !!e.selected, e.isCurrent = A(e), e.disabled = o == null ? void 0 : o(u), e.customClass = i == null ? void 0 : i(u), c;
58
58
  }, J = (e) => {
59
59
  if (a.selectionMode === "week") {
60
60
  const [t, s] = a.showWeekNumber ? [1, 7] : [0, 6], n = F(e[t + 1]);
61
61
  e[t].inRange = n, e[t].start = n, e[s].inRange = n, e[s].end = n;
62
62
  }
63
- }, D = m(() => {
64
- const { minDate: e, maxDate: t, rangeState: s, showWeekNumber: n } = a, r = v.value, i = B.value, o = "day";
63
+ }, D = p(() => {
64
+ const { minDate: e, maxDate: t, rangeState: s, showWeekNumber: n } = a, o = g.value, i = B.value, r = "day";
65
65
  let c = 1;
66
66
  if (n)
67
67
  for (let u = 0; u < 6; u++)
68
68
  i[u][0] || (i[u][0] = {
69
69
  type: "week",
70
- text: b.value.add(u * 7 + 1, o).week()
70
+ text: b.value.add(u * 7 + 1, r).week()
71
71
  });
72
72
  return me({ row: 6, column: 7 }, i, {
73
73
  startDate: e,
74
74
  columnIndexOffset: n ? 1 : 0,
75
75
  nextEndDate: s.endDate || t || s.selecting && e || null,
76
- now: j().locale(l(_)).startOf(o),
77
- unit: o,
78
- relativeDateGetter: (u) => b.value.add(u - r, o),
76
+ now: j().locale(m(_)).startOf(r),
77
+ unit: r,
78
+ relativeDateGetter: (u) => b.value.add(u - o, r),
79
79
  setCellMetadata: (...u) => {
80
80
  H(...u, c) && (c += 1);
81
81
  },
82
82
  setRowMetadata: J
83
83
  }), i;
84
84
  });
85
- re(
85
+ oe(
86
86
  () => a.date,
87
87
  async () => {
88
88
  var e, t;
89
- (e = S.value) != null && e.contains(document.activeElement) && (await oe(), (t = k.value) == null || t.focus());
89
+ (e = S.value) != null && e.contains(document.activeElement) && (await re(), (t = k.value) == null || t.focus());
90
90
  }
91
91
  );
92
92
  const Q = async () => {
@@ -96,14 +96,14 @@ const ye = ["onMousedown"], De = {
96
96
  const t = [];
97
97
  return w(e.type) && !e.disabled ? (t.push("available"), e.type === "today" && t.push("today")) : t.push(e.type), A(e) && t.push("current"), e.inRange && (w(e.type) || a.selectionMode === "week") && (t.push("in-range"), e.start && t.push("start-date"), e.end && t.push("end-date")), e.disabled && t.push("disabled"), e.selected && t.push("selected"), e.customClass && t.push(e.customClass), t.join(" ");
98
98
  }, I = (e, t) => {
99
- const s = e * 7 + (t - (a.showWeekNumber ? 1 : 0)) - v.value;
99
+ const s = e * 7 + (t - (a.showWeekNumber ? 1 : 0)) - g.value;
100
100
  return b.value.add(s, "day");
101
101
  }, Z = (e) => {
102
- var r;
102
+ var o;
103
103
  if (!a.rangeState.selecting)
104
104
  return;
105
105
  let t = e.target;
106
- if (t.tagName === "SPAN" && (t = (r = t.parentNode) == null ? void 0 : r.parentNode), t.tagName === "DIV" && (t = t.parentNode), t.tagName !== "TD")
106
+ if (t.tagName === "SPAN" && (t = (o = t.parentNode) == null ? void 0 : o.parentNode), t.tagName === "DIV" && (t = t.parentNode), t.tagName !== "TD")
107
107
  return;
108
108
  const s = t.parentNode.rowIndex - 1, n = t.cellIndex;
109
109
  D.value[s][n].disabled || (s !== V.value || n !== E.value) && (V.value = s, E.value = n, d("changerange", {
@@ -111,35 +111,35 @@ const ye = ["onMousedown"], De = {
111
111
  endDate: I(s, n)
112
112
  }));
113
113
  }, T = (e) => !W.value && (e == null ? void 0 : e.text) === 1 && e.type === "normal" || e.isCurrent, ee = (e) => {
114
- g || W.value || a.selectionMode !== "date" || P(e, !0);
114
+ v || W.value || a.selectionMode !== "date" || P(e, !0);
115
115
  }, te = (e) => {
116
- e.target.closest("td") && (g = !0);
116
+ e.target.closest("td") && (v = !0);
117
117
  }, ae = (e) => {
118
- e.target.closest("td") && (g = !1);
118
+ e.target.closest("td") && (v = !1);
119
119
  }, P = (e, t = !1) => {
120
120
  const s = e.target.closest("td");
121
121
  if (!s)
122
122
  return;
123
- const n = s.parentNode.rowIndex - 1, r = s.cellIndex, i = D.value[n][r];
123
+ const n = s.parentNode.rowIndex - 1, o = s.cellIndex, i = D.value[n][o];
124
124
  if (i.disabled || i.type === "week")
125
125
  return;
126
- const o = I(n, r);
126
+ const r = I(n, o);
127
127
  if (a.selectionMode === "range")
128
- !a.rangeState.selecting || !a.minDate ? (d("pick", { minDate: o, maxDate: null }), d("select", !0)) : (o >= a.minDate ? d("pick", { minDate: a.minDate, maxDate: o }) : d("pick", { minDate: o, maxDate: a.minDate }), d("select", !1));
128
+ !a.rangeState.selecting || !a.minDate ? (d("pick", { minDate: r, maxDate: null }), d("select", !0)) : (r >= a.minDate ? d("pick", { minDate: a.minDate, maxDate: r }) : d("pick", { minDate: r, maxDate: a.minDate }), d("select", !1));
129
129
  else if (a.selectionMode === "date")
130
- d("pick", o, t);
130
+ d("pick", r, t);
131
131
  else if (a.selectionMode === "week") {
132
- const c = o.week(), u = `${o.year()}w${c}`;
132
+ const c = r.week(), u = `${r.year()}w${c}`;
133
133
  d("pick", {
134
- year: o.year(),
134
+ year: r.year(),
135
135
  week: c,
136
136
  value: u,
137
- date: o.startOf("week")
137
+ date: r.startOf("week")
138
138
  });
139
139
  } else if (a.selectionMode === "dates") {
140
- const c = i.selected ? N(a.parsedValue).filter(
141
- (u) => (u == null ? void 0 : u.valueOf()) !== o.valueOf()
142
- ) : N(a.parsedValue).concat([o]);
140
+ const c = i.selected ? x(a.parsedValue).filter(
141
+ (u) => (u == null ? void 0 : u.valueOf()) !== r.valueOf()
142
+ ) : x(a.parsedValue).concat([r]);
143
143
  d("pick", c);
144
144
  }
145
145
  }, F = (e) => {
@@ -157,12 +157,12 @@ const ye = ["onMousedown"], De = {
157
157
  * @description focus on current cell
158
158
  */
159
159
  focus: Q
160
- }), (e, t) => (f(), p("table", {
160
+ }), (e, t) => (l(), f("table", {
161
161
  role: "grid",
162
162
  "aria-label": "使用方向鍵與 Enter 鍵以選擇日期",
163
163
  cellspacing: "0",
164
164
  cellpadding: "0",
165
- class: M([l(x).b(), { "is-week-mode": e.selectionMode === "week" }]),
165
+ class: M([m(N).b(), { "is-week-mode": e.selectionMode === "week" }]),
166
166
  onClick: P,
167
167
  onMousemove: Z,
168
168
  onMousedown: ue(te, ["prevent"]),
@@ -173,29 +173,29 @@ const ye = ["onMousedown"], De = {
173
173
  ref: S
174
174
  }, [
175
175
  $("tr", null, [
176
- e.showWeekNumber ? (f(), p("th", De, "周")) : ie("", !0),
177
- (f(!0), p(C, null, O(l(U), (s, n) => (f(), p("th", {
176
+ e.showWeekNumber ? (l(), f("th", De, "周")) : ie("", !0),
177
+ (l(!0), f(C, null, O(U.value, (s, n) => (l(), f("th", {
178
178
  key: n,
179
179
  scope: "col",
180
180
  "aria-label": "星期" + s
181
181
  }, ce(s), 9, ke))), 128))
182
182
  ]),
183
- (f(!0), p(C, null, O(l(D), (s, n) => (f(), p("tr", {
183
+ (l(!0), f(C, null, O(D.value, (s, n) => (l(), f("tr", {
184
184
  key: n,
185
- class: M([l(x).e("row"), { current: F(s[1]) }])
185
+ class: M([m(N).e("row"), { current: F(s[1]) }])
186
186
  }, [
187
- (f(!0), p(C, null, O(s, (r, i) => (f(), p("td", {
187
+ (l(!0), f(C, null, O(s, (o, i) => (l(), f("td", {
188
188
  key: `${n}.${i}`,
189
189
  ref_for: !0,
190
- ref: (o) => T(r) && (k.value = o),
191
- class: M(Y(r)),
192
- "aria-current": r.isCurrent ? "date" : void 0,
193
- "aria-selected": r.isCurrent,
194
- tabindex: T(r) ? 0 : -1,
190
+ ref: (r) => T(o) && (k.value = r),
191
+ class: M(Y(o)),
192
+ "aria-current": o.isCurrent ? "date" : void 0,
193
+ "aria-selected": o.isCurrent,
194
+ tabindex: T(o) ? 0 : -1,
195
195
  onFocus: ee
196
196
  }, [
197
- de(l(he), { cell: r }, null, 8, ["cell"])
198
- ], 42, ge))), 128))
197
+ de(m(he), { cell: o }, null, 8, ["cell"])
198
+ ], 42, ve))), 128))
199
199
  ], 2))), 128))
200
200
  ], 512)
201
201
  ], 42, ye));
@@ -1,5 +1,5 @@
1
- import { defineComponent as P, ref as f, computed as j, watch as Y, nextTick as $, openBlock as u, createElementBlock as p, normalizeClass as N, unref as g, createElementVNode as b, Fragment as O, renderList as M, withKeys as I, withModifiers as R, toDisplayString as q } from "vue";
2
- import x from "dayjs";
1
+ import { defineComponent as P, ref as f, computed as j, watch as Y, nextTick as $, openBlock as u, createElementBlock as p, normalizeClass as C, unref as N, createElementVNode as g, Fragment as O, renderList as M, withKeys as I, withModifiers as R, toDisplayString as q } from "vue";
2
+ import b from "dayjs";
3
3
  import { useNamespace as G } from "../../../hooks/use-namespace/index.js";
4
4
  import "@popperjs/core";
5
5
  import "lodash";
@@ -18,9 +18,9 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, pe
18
18
  emits: ["changerange", "pick", "select"],
19
19
  setup(A, { expose: E, emit: d }) {
20
20
  const e = A, B = (a, t, o) => {
21
- const r = x().locale(o).startOf("month").month(t).year(a), n = r.daysInMonth();
21
+ const r = b().locale(o).startOf("month").month(t).year(a), n = r.daysInMonth();
22
22
  return U(n).map((s) => r.add(s, "day").toDate());
23
- }, K = G("month-table"), v = f("zh-cn"), w = f(), h = f();
23
+ }, K = G("month-table"), x = f("zh-cn"), v = f(), h = f();
24
24
  f(
25
25
  e.date.locale("en").localeData().monthsShort().map((a) => a.toLowerCase())
26
26
  );
@@ -28,9 +28,9 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, pe
28
28
  [],
29
29
  [],
30
30
  []
31
- ]), S = f(), k = f(), _ = j(() => {
31
+ ]), w = f(), S = f(), k = j(() => {
32
32
  var o, r;
33
- const a = V.value, t = x().locale(v.value).startOf("month");
33
+ const a = V.value, t = b().locale(x.value).startOf("month");
34
34
  for (let n = 0; n < 3; n++) {
35
35
  const s = a[n];
36
36
  for (let i = 0; i < 4; i++) {
@@ -45,8 +45,8 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, pe
45
45
  disabled: !1
46
46
  });
47
47
  c.type = "normal";
48
- const C = n * 4 + i, l = e.date.startOf("year").month(C), m = e.rangeState.endDate || e.maxDate || e.rangeState.selecting && e.minDate || null;
49
- c.inRange = !!(e.minDate && l.isSameOrAfter(e.minDate, "month") && m && l.isSameOrBefore(m, "month")) || !!(e.minDate && l.isSameOrBefore(e.minDate, "month") && m && l.isSameOrAfter(m, "month")), (o = e.minDate) != null && o.isSameOrAfter(m) ? (c.start = !!(m && l.isSame(m, "month")), c.end = e.minDate && l.isSame(e.minDate, "month")) : (c.start = !!(e.minDate && l.isSame(e.minDate, "month")), c.end = !!(m && l.isSame(m, "month"))), t.isSame(l) && (c.type = "today"), c.text = C, c.disabled = ((r = e.disabledDate) == null ? void 0 : r.call(e, l.toDate())) || !1;
48
+ const _ = n * 4 + i, l = e.date.startOf("year").month(_), m = e.rangeState.endDate || e.maxDate || e.rangeState.selecting && e.minDate || null;
49
+ c.inRange = !!(e.minDate && l.isSameOrAfter(e.minDate, "month") && m && l.isSameOrBefore(m, "month")) || !!(e.minDate && l.isSameOrBefore(e.minDate, "month") && m && l.isSameOrAfter(m, "month")), (o = e.minDate) != null && o.isSameOrAfter(m) ? (c.start = !!(m && l.isSame(m, "month")), c.end = e.minDate && l.isSame(e.minDate, "month")) : (c.start = !!(e.minDate && l.isSame(e.minDate, "month")), c.end = !!(m && l.isSame(m, "month"))), t.isSame(l) && (c.type = "today"), c.text = _, c.disabled = ((r = e.disabledDate) == null ? void 0 : r.call(e, l.toDate())) || !1;
50
50
  }
51
51
  }
52
52
  return a;
@@ -55,8 +55,8 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, pe
55
55
  (a = h.value) == null || a.focus();
56
56
  }, F = (a) => {
57
57
  const t = {}, o = e.date.year(), r = /* @__PURE__ */ new Date(), n = a.text;
58
- return t.disabled = e.disabledDate ? B(o, n, v.value).every(e.disabledDate) : !1, t.current = T(e.parsedValue).findIndex(
59
- (s) => x.isDayjs(s) && s.year() === o && s.month() === n
58
+ return t.disabled = e.disabledDate ? B(o, n, x.value).every(e.disabledDate) : !1, t.current = T(e.parsedValue).findIndex(
59
+ (s) => b.isDayjs(s) && s.year() === o && s.month() === n
60
60
  ) >= 0, t.today = r.getFullYear() === o && r.getMonth() === n, a.inRange && (t["in-range"] = !0, a.start && (t["start-date"] = !0), a.end && (t["end-date"] = !0)), t;
61
61
  }, D = (a) => {
62
62
  const t = e.date.year(), o = a.text;
@@ -71,7 +71,7 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, pe
71
71
  if (t.tagName === "A" && (t = (n = t.parentNode) == null ? void 0 : n.parentNode), t.tagName === "DIV" && (t = t.parentNode), t.tagName !== "TD")
72
72
  return;
73
73
  const o = t.parentNode.rowIndex, r = t.cellIndex;
74
- _.value[o][r].disabled || (o !== S.value || r !== k.value) && (S.value = o, k.value = r, d("changerange", {
74
+ k.value[o][r].disabled || (o !== w.value || r !== S.value) && (w.value = o, S.value = r, d("changerange", {
75
75
  selecting: !0,
76
76
  endDate: e.date.startOf("year").month(o * 4 + r)
77
77
  }));
@@ -89,7 +89,7 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, pe
89
89
  () => e.date,
90
90
  async () => {
91
91
  var a, t;
92
- (a = w.value) != null && a.contains(document.activeElement) && (await $(), (t = h.value) == null || t.focus());
92
+ (a = v.value) != null && a.contains(document.activeElement) && (await $(), (t = h.value) == null || t.focus());
93
93
  }
94
94
  ), E({
95
95
  /**
@@ -99,20 +99,20 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, pe
99
99
  }), (a, t) => (u(), p("table", {
100
100
  role: "grid",
101
101
  "aria-label": "使用方向鍵與 Enter 鍵以選擇月份",
102
- class: N(g(K).b()),
102
+ class: C(N(K).b()),
103
103
  onClick: y,
104
104
  onMousemove: L
105
105
  }, [
106
- b("tbody", {
106
+ g("tbody", {
107
107
  ref_key: "tbodyRef",
108
- ref: w
108
+ ref: v
109
109
  }, [
110
- (u(!0), p(O, null, M(g(_), (o, r) => (u(), p("tr", { key: r }, [
110
+ (u(!0), p(O, null, M(k.value, (o, r) => (u(), p("tr", { key: r }, [
111
111
  (u(!0), p(O, null, M(o, (n, s) => (u(), p("td", {
112
112
  key: s,
113
113
  ref_for: !0,
114
114
  ref: (i) => D(n) && (h.value = i),
115
- class: N(F(n)),
115
+ class: C(F(n)),
116
116
  "aria-selected": `${D(n)}`,
117
117
  tabindex: D(n) ? 0 : -1,
118
118
  onKeydown: [
@@ -120,8 +120,8 @@ const W = ["aria-selected", "tabindex", "onKeydown"], X = { class: "cell" }, pe
120
120
  I(R(y, ["prevent", "stop"]), ["enter"])
121
121
  ]
122
122
  }, [
123
- b("div", null, [
124
- b("span", X, q(g(Q)["month" + (n.text + 1)]), 1)
123
+ g("div", null, [
124
+ g("span", X, q(N(Q)["month" + (n.text + 1)]), 1)
125
125
  ])
126
126
  ], 42, W))), 128))
127
127
  ]))), 128))
@@ -1,6 +1,6 @@
1
- import { defineComponent as R, ref as p, computed as S, watch as z, nextTick as A, openBlock as l, createElementBlock as c, normalizeClass as v, unref as d, createElementVNode as u, Fragment as y, renderList as g, withKeys as h, withModifiers as x, toDisplayString as B } from "vue";
2
- import { castArray as C } from "../utils.js";
3
- import D from "dayjs";
1
+ import { defineComponent as N, ref as f, computed as R, watch as S, nextTick as z, openBlock as l, createElementBlock as c, normalizeClass as _, unref as A, createElementVNode as p, Fragment as m, renderList as k, withKeys as g, withModifiers as h, toDisplayString as B } from "vue";
2
+ import { castArray as x } from "../utils.js";
3
+ import C from "dayjs";
4
4
  import { useNamespace as M } from "../../../hooks/use-namespace/index.js";
5
5
  import "@popperjs/core";
6
6
  import "lodash";
@@ -11,67 +11,67 @@ import "../../../utils/ns-cover.js";
11
11
  import "../../time-picker/index.js";
12
12
  import { basicYearTableProps as F } from "../props/basic-year-table.js";
13
13
  import { rangeArr as L } from "../../time-picker/utils.js";
14
- const P = ["aria-selected", "tabindex", "onKeydown"], $ = { class: "cell" }, q = { key: 1 }, oe = /* @__PURE__ */ R({
14
+ const P = ["aria-selected", "tabindex", "onKeydown"], $ = { class: "cell" }, q = { key: 1 }, oe = /* @__PURE__ */ N({
15
15
  __name: "basic-year-table",
16
16
  props: F,
17
17
  emits: ["pick"],
18
- setup(w, { expose: T, emit: Y }) {
19
- const n = w, E = (e, t) => {
20
- const r = D(String(e)).locale(t).startOf("year"), k = r.endOf("year").dayOfYear();
21
- return L(k).map((o) => r.add(o, "day").toDate());
22
- }, K = M("year-table"), b = p("zh-cn"), _ = p(), i = p(), s = S(() => Math.floor(n.date.year() / 10) * 10), O = () => {
18
+ setup(D, { expose: w, emit: T }) {
19
+ const n = D, Y = (e, t) => {
20
+ const r = C(String(e)).locale(t).startOf("year"), v = r.endOf("year").dayOfYear();
21
+ return L(v).map((o) => r.add(o, "day").toDate());
22
+ }, E = M("year-table"), y = f("zh-cn"), b = f(), d = f(), s = R(() => Math.floor(n.date.year() / 10) * 10), K = () => {
23
23
  var e;
24
- (e = i.value) == null || e.focus();
25
- }, I = (e) => {
26
- const t = {}, r = D().locale(b.value);
27
- return t.disabled = n.disabledDate ? E(e, b.value).every(n.disabledDate) : !1, t.current = C(n.parsedValue).findIndex((a) => a.year() === e) >= 0, t.today = r.year() === e, t;
28
- }, f = (e) => e === s.value && n.date.year() < s.value && n.date.year() > s.value + 9 || C(n.date).findIndex((t) => t.year() === e) >= 0, m = (e) => {
24
+ (e = d.value) == null || e.focus();
25
+ }, O = (e) => {
26
+ const t = {}, r = C().locale(y.value);
27
+ return t.disabled = n.disabledDate ? Y(e, y.value).every(n.disabledDate) : !1, t.current = x(n.parsedValue).findIndex((a) => a.year() === e) >= 0, t.today = r.year() === e, t;
28
+ }, i = (e) => e === s.value && n.date.year() < s.value && n.date.year() > s.value + 9 || x(n.date).findIndex((t) => t.year() === e) >= 0, u = (e) => {
29
29
  const r = e.target.closest("td");
30
30
  if (r && r.textContent) {
31
31
  if (V(r, "disabled"))
32
32
  return;
33
33
  const a = r.textContent || r.innerText;
34
- Y("pick", Number(a));
34
+ T("pick", Number(a));
35
35
  }
36
36
  };
37
- return z(
37
+ return S(
38
38
  () => n.date,
39
39
  async () => {
40
40
  var e, t;
41
- (e = _.value) != null && e.contains(document.activeElement) && (await A(), (t = i.value) == null || t.focus());
41
+ (e = b.value) != null && e.contains(document.activeElement) && (await z(), (t = d.value) == null || t.focus());
42
42
  }
43
- ), T({
43
+ ), w({
44
44
  /**
45
45
  * @description focus on the current cell
46
46
  */
47
- focus: O
47
+ focus: K
48
48
  }), (e, t) => (l(), c("table", {
49
49
  role: "grid",
50
50
  "aria-label": "使用方向鍵與 Enter 鍵以選擇年份",
51
- class: v(d(K).b()),
52
- onClick: m
51
+ class: _(A(E).b()),
52
+ onClick: u
53
53
  }, [
54
- u("tbody", {
54
+ p("tbody", {
55
55
  ref_key: "tbodyRef",
56
- ref: _
56
+ ref: b
57
57
  }, [
58
- (l(), c(y, null, g(3, (r, a) => u("tr", { key: a }, [
59
- (l(), c(y, null, g(4, (k, o) => (l(), c(y, {
58
+ (l(), c(m, null, k(3, (r, a) => p("tr", { key: a }, [
59
+ (l(), c(m, null, k(4, (v, o) => (l(), c(m, {
60
60
  key: a + "_" + o
61
61
  }, [
62
62
  a * 4 + o < 10 ? (l(), c("td", {
63
63
  key: 0,
64
64
  ref_for: !0,
65
- ref: (N) => f(d(s) + a * 4 + o) && (i.value = N),
66
- class: v(["available", I(d(s) + a * 4 + o)]),
67
- "aria-selected": `${f(d(s) + a * 4 + o)}`,
68
- tabindex: f(d(s) + a * 4 + o) ? 0 : -1,
65
+ ref: (I) => i(s.value + a * 4 + o) && (d.value = I),
66
+ class: _(["available", O(s.value + a * 4 + o)]),
67
+ "aria-selected": `${i(s.value + a * 4 + o)}`,
68
+ tabindex: i(s.value + a * 4 + o) ? 0 : -1,
69
69
  onKeydown: [
70
- h(x(m, ["prevent", "stop"]), ["space"]),
71
- h(x(m, ["prevent", "stop"]), ["enter"])
70
+ g(h(u, ["prevent", "stop"]), ["space"]),
71
+ g(h(u, ["prevent", "stop"]), ["enter"])
72
72
  ]
73
73
  }, [
74
- u("span", $, B(d(s) + a * 4 + o), 1)
74
+ p("span", $, B(s.value + a * 4 + o), 1)
75
75
  ], 42, P)) : (l(), c("td", q))
76
76
  ], 64))), 64))
77
77
  ])), 64))