vft 0.0.511 → 0.0.514

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 (137) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/cascader/cascader.vue2.js +202 -203
  3. package/es/components/cascader-panel/menu.vue2.js +49 -50
  4. package/es/components/clamp-toggle/clamp-toggle.vue2.js +18 -19
  5. package/es/components/color-picker/color-picker.vue2.js +133 -134
  6. package/es/components/config-provider/config-provider.vue.d.ts +0 -2
  7. package/es/components/config-provider/config-provider.vue2.js +4 -5
  8. package/es/components/config-provider/constants.d.ts +0 -1
  9. package/es/components/config-provider/constants.js +2 -3
  10. package/es/components/config-provider/hooks/use-global-config.js +30 -33
  11. package/es/components/config-provider/index.d.ts +0 -9
  12. package/es/components/config-provider/index.js +5 -6
  13. package/es/components/date-picker/composables/use-basic-date-table.js +82 -83
  14. package/es/components/date-picker/composables/use-month-range-header.js +14 -15
  15. package/es/components/date-picker/composables/use-panel-date-range.js +23 -24
  16. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +38 -39
  17. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +38 -39
  18. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +183 -184
  19. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +224 -225
  20. package/es/components/date-time-select/date-time-select.vue2.js +36 -39
  21. package/es/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
  22. package/es/components/dropdown/dropdown-item.vue.d.ts +1 -1
  23. package/es/components/dropdown/dropdown.vue.d.ts +1 -1
  24. package/es/components/dropdown/dropdown.vue2.js +67 -68
  25. package/es/components/dropdown/index.d.ts +33 -33
  26. package/es/components/empty/empty.vue2.js +38 -39
  27. package/es/components/full-screen/full-screen.vue2.js +17 -18
  28. package/es/components/image/image.vue2.js +59 -60
  29. package/es/components/image-viewer/image-viewer.vue2.js +44 -45
  30. package/es/components/index.js +97 -98
  31. package/es/components/md-container/md-container.vue2.js +74 -75
  32. package/es/components/md-container/toc.js +36 -37
  33. package/es/components/message-box/message-box.vue2.js +3 -3
  34. package/es/components/message-box/method.js +47 -48
  35. package/es/components/modal/modal-footer-action.vue2.js +24 -25
  36. package/es/components/multiple-tabs/multiple-tabs.vue2.js +15 -16
  37. package/es/components/multiple-tabs/use/use-tab-dropdown.js +53 -54
  38. package/es/components/popconfirm/popconfirm.vue2.js +39 -40
  39. package/es/components/search/search.vue2.js +50 -51
  40. package/es/components/select/useSelect.js +231 -232
  41. package/es/components/super-form/super-form-item.vue2.js +66 -66
  42. package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +65 -66
  43. package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +133 -134
  44. package/es/components/transfer/transfer-panel.vue2.js +56 -57
  45. package/es/components/transfer/transfer.vue2.js +69 -70
  46. package/es/components/tree/tree.vue2.js +59 -60
  47. package/es/components/upload/upload-content.vue2.js +49 -50
  48. package/es/components/upload/upload-list.vue2.js +45 -46
  49. package/es/components/upload/upload.vue2.js +99 -100
  50. package/es/hooks/use-z-index/index.js +3 -3
  51. package/es/index.d.ts +0 -1
  52. package/es/index.js +1 -5
  53. package/es/package.json.d.ts +1 -1
  54. package/es/package.json.js +1 -1
  55. package/lib/components/cascader/cascader.vue2.cjs +1 -1
  56. package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
  57. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  58. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  59. package/lib/components/config-provider/config-provider.vue.d.ts +0 -2
  60. package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
  61. package/lib/components/config-provider/constants.cjs +1 -1
  62. package/lib/components/config-provider/constants.d.ts +0 -1
  63. package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
  64. package/lib/components/config-provider/index.cjs +1 -1
  65. package/lib/components/config-provider/index.d.ts +0 -9
  66. package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
  67. package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
  68. package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
  69. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  70. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  71. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  72. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  73. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  74. package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
  75. package/lib/components/dropdown/dropdown-item.vue.d.ts +1 -1
  76. package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
  77. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  78. package/lib/components/dropdown/index.d.ts +33 -33
  79. package/lib/components/empty/empty.vue2.cjs +1 -1
  80. package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
  81. package/lib/components/image/image.vue2.cjs +1 -1
  82. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  83. package/lib/components/index.cjs +1 -1
  84. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  85. package/lib/components/md-container/toc.cjs +1 -1
  86. package/lib/components/message-box/message-box.vue2.cjs +1 -1
  87. package/lib/components/message-box/method.cjs +1 -1
  88. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  89. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  90. package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
  91. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  92. package/lib/components/search/search.vue2.cjs +1 -1
  93. package/lib/components/select/useSelect.cjs +1 -1
  94. package/lib/components/super-form/super-form-item.vue2.cjs +1 -1
  95. package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
  96. package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
  97. package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
  98. package/lib/components/transfer/transfer.vue2.cjs +1 -1
  99. package/lib/components/tree/tree.vue2.cjs +1 -1
  100. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  101. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  102. package/lib/components/upload/upload.vue2.cjs +1 -1
  103. package/lib/index.cjs +1 -1
  104. package/lib/index.d.ts +0 -1
  105. package/lib/package.json.cjs +1 -1
  106. package/lib/package.json.d.ts +1 -1
  107. package/package.json +3 -3
  108. package/theme-style/index.css +1 -1
  109. package/theme-style/src/image-viewer.scss +12 -0
  110. package/theme-style/src/message-box.scss +2 -2
  111. package/theme-style/src/table.scss +6 -0
  112. package/theme-style/vft-image-viewer.css +1 -1
  113. package/theme-style/vft-message-box.css +1 -1
  114. package/theme-style/vft-table.css +1 -1
  115. package/web-types.json +1 -1
  116. package/es/locale/index.d.js +0 -1
  117. package/es/locale/index.d.ts +0 -26
  118. package/es/locale/index.js +0 -10
  119. package/es/locale/lang/en.d.ts +0 -183
  120. package/es/locale/lang/en.js +0 -241
  121. package/es/locale/lang/zh-cn.d.ts +0 -183
  122. package/es/locale/lang/zh-cn.js +0 -241
  123. package/es/locale/lang/zh-tw.d.ts +0 -183
  124. package/es/locale/lang/zh-tw.js +0 -241
  125. package/es/locale/use-locale.d.ts +0 -17
  126. package/es/locale/use-locale.js +0 -56
  127. package/lib/locale/index.cjs +0 -1
  128. package/lib/locale/index.d.cjs +0 -1
  129. package/lib/locale/index.d.ts +0 -26
  130. package/lib/locale/lang/en.cjs +0 -1
  131. package/lib/locale/lang/en.d.ts +0 -183
  132. package/lib/locale/lang/zh-cn.cjs +0 -1
  133. package/lib/locale/lang/zh-cn.d.ts +0 -183
  134. package/lib/locale/lang/zh-tw.cjs +0 -1
  135. package/lib/locale/lang/zh-tw.d.ts +0 -183
  136. package/lib/locale/use-locale.cjs +0 -1
  137. package/lib/locale/use-locale.d.ts +0 -17
@@ -1,191 +1,190 @@
1
- import { defineComponent as rt, useAttrs as st, useSlots as ut, ref as g, inject as ae, toRef as it, computed as m, watch as A, openBlock as C, createElementBlock as I, normalizeClass as i, unref as o, createElementVNode as h, renderSlot as ct, Fragment as dt, renderList as vt, toDisplayString as S, createCommentVNode as B, createVNode as T, withDirectives as P, vShow as N, withKeys as ye, createBlock as le, withCtx as ke, createTextVNode as we, nextTick as L } from "vue";
1
+ import { defineComponent as nt, useAttrs as rt, useSlots as st, ref as g, inject as ee, toRef as ut, computed as m, watch as x, openBlock as C, createElementBlock as I, normalizeClass as i, unref as o, createElementVNode as h, renderSlot as it, Fragment as ct, renderList as dt, toDisplayString as te, createCommentVNode as S, createVNode as T, withDirectives as P, vShow as N, withKeys as he, createBlock as ae, withCtx as ye, createTextVNode as ke, nextTick as z } from "vue";
2
2
  import w from "dayjs";
3
- import { VftButton as be } from "../../button/index.js";
4
- import { ClickOutside as mt } from "@vft/directives";
3
+ import { VftButton as we } from "../../button/index.js";
4
+ import { ClickOutside as vt } from "@vft/directives";
5
5
  import "@vueuse/core";
6
- import { isArray as J, isFunction as Ve } from "@vft/utils";
6
+ import { isArray as A, isFunction as be } from "@vft/utils";
7
7
  import "../../config-provider/hooks/use-global-config.js";
8
8
  import { EVENT_CODE as k } from "../../../constants/aria.js";
9
9
  import "lodash-es";
10
10
  import "../../form/index.js";
11
- import { useNamespace as De } from "../../../hooks/use-namespace/index.js";
11
+ import { useNamespace as Ve } from "../../../hooks/use-namespace/index.js";
12
12
  import "../../../hooks/use-model-toggle/index.js";
13
13
  import "@popperjs/core";
14
14
  import "../../../hooks/use-z-index/index.js";
15
- import { VftInput as ge } from "../../input/index.js";
15
+ import { VftInput as De } from "../../input/index.js";
16
16
  import "../../time-picker/index.js";
17
- import { VftIcon as W } from "../../icon/index.js";
17
+ import { VftIcon as L } from "../../icon/index.js";
18
18
  import "../../tooltip/index.js";
19
- import { panelDatePickProps as ft } from "../props/panel-date-pick.js";
20
- import { getValidDateOfMonth as Ce, getValidDateOfYear as Te, correctlyParseUserInput as Pe } from "../utils.js";
21
- import { ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY as pt } from "../constants.js";
22
- import ht from "./basic-date-table.vue2.js";
23
- import yt from "./basic-month-table.vue2.js";
24
- import kt from "./basic-year-table.vue2.js";
25
- import wt from "../../../locale/use-locale.js";
26
- import { PICKER_BASE_INJECTION_KEY as bt } from "../../time-picker/constants.js";
27
- import { TOOLTIP_INJECTION_KEY as Vt } from "../../tooltip/constants.js";
28
- import { extractTimeFormat as Dt, extractDateFormat as gt } from "../../time-picker/utils.js";
29
- import Ct from "../../time-picker/time-picker-com/panel-time-pick.vue2.js";
30
- const Tt = ["onClick"], ta = /* @__PURE__ */ rt({
19
+ import { panelDatePickProps as mt } from "../props/panel-date-pick.js";
20
+ import { getValidDateOfMonth as ge, getValidDateOfYear as Ce, correctlyParseUserInput as Te } from "../utils.js";
21
+ import { ROOT_PICKER_IS_DEFAULT_FORMAT_INJECTION_KEY as ft } from "../constants.js";
22
+ import pt from "./basic-date-table.vue2.js";
23
+ import ht from "./basic-month-table.vue2.js";
24
+ import yt from "./basic-year-table.vue2.js";
25
+ import { PICKER_BASE_INJECTION_KEY as kt } from "../../time-picker/constants.js";
26
+ import { TOOLTIP_INJECTION_KEY as wt } from "../../tooltip/constants.js";
27
+ import { extractTimeFormat as bt, extractDateFormat as Vt } from "../../time-picker/utils.js";
28
+ import Dt from "../../time-picker/time-picker-com/panel-time-pick.vue2.js";
29
+ const gt = ["onClick"], Zt = /* @__PURE__ */ nt({
31
30
  __name: "panel-date-pick",
32
- props: ft,
31
+ props: mt,
33
32
  emits: ["pick", "set-picker-option", "panel-change"],
34
- setup(Fe, { emit: $e }) {
35
- const n = Fe, b = $e, Ie = (e, t, l) => !0, f = De("picker-panel"), V = De("date-picker"), Ne = st(), Ee = ut(), { t: E } = wt(), d = g("zh-cn"), oe = ae(bt), ne = ae(
36
- pt
37
- ), Me = ae(Vt), { shortcuts: re, disabledDate: c, cellClassName: Oe, defaultTime: H } = oe.props, M = it(oe.props, "defaultValue"), U = g(), a = g(w().locale(d.value)), q = g(!1);
38
- let G = !1;
39
- const se = m(() => w(H).locale(d.value)), Ye = m(() => a.value.month()), ue = m(() => a.value.year()), ie = g([]), F = g(null), $ = g(null), Q = (e) => ie.value.length > 0 ? Ie(e, ie.value, n.format || "HH:mm:ss") : !0, ce = (e) => H && !pe.value && !q.value && !G ? se.value.year(e.year()).month(e.month()).date(e.date()) : O.value ? e.millisecond(0) : e.startOf("day"), v = (e, ...t) => {
33
+ setup(Pe, { emit: Fe }) {
34
+ const n = Pe, b = Fe, $e = (e, t, l) => !0, f = Ve("picker-panel"), V = Ve("date-picker"), Ie = rt(), Ne = st(), d = g("zh-cn"), le = ee(kt), oe = ee(
35
+ ft
36
+ ), Ee = ee(wt), { shortcuts: ne, disabledDate: c, cellClassName: Me, defaultTime: J } = le.props, E = ut(le.props, "defaultValue"), _ = g(), a = g(w().locale(d.value)), W = g(!1);
37
+ let H = !1;
38
+ const re = m(() => w(J).locale(d.value)), Oe = m(() => a.value.month()), se = m(() => a.value.year()), ue = g([]), F = g(null), $ = g(null), q = (e) => ue.value.length > 0 ? $e(e, ue.value, n.format || "HH:mm:ss") : !0, ie = (e) => J && !fe.value && !W.value && !H ? re.value.year(e.year()).month(e.month()).date(e.date()) : M.value ? e.millisecond(0) : e.startOf("day"), v = (e, ...t) => {
40
39
  if (!e)
41
40
  b("pick", e, ...t);
42
- else if (J(e)) {
43
- const l = e.map(ce);
41
+ else if (A(e)) {
42
+ const l = e.map(ie);
44
43
  b("pick", l, ...t);
45
44
  } else
46
- b("pick", ce(e), ...t);
47
- F.value = null, $.value = null, q.value = !1, G = !1;
48
- }, _e = async (e, t) => {
45
+ b("pick", ie(e), ...t);
46
+ F.value = null, $.value = null, W.value = !1, H = !1;
47
+ }, Ye = async (e, t) => {
49
48
  if (u.value === "date") {
50
49
  e = e;
51
50
  let l = n.parsedValue ? n.parsedValue.year(e.year()).month(e.month()).date(e.date()) : e;
52
- Q(l), a.value = l, v(l, O.value || t), n.type === "datetime" && (await L(), _());
51
+ q(l), a.value = l, v(l, M.value || t), n.type === "datetime" && (await z(), Y());
53
52
  } else u.value === "week" ? v(e.date) : u.value === "dates" && v(e, !0);
54
- }, de = (e) => {
53
+ }, ce = (e) => {
55
54
  const t = e ? "add" : "subtract";
56
- a.value = a.value[t](1, "month"), z("month");
57
- }, ve = (e) => {
55
+ a.value = a.value[t](1, "month"), U("month");
56
+ }, de = (e) => {
58
57
  const t = a.value, l = e ? "add" : "subtract";
59
- a.value = s.value === "year" ? t[l](10, "year") : t[l](1, "year"), z("year");
58
+ a.value = s.value === "year" ? t[l](10, "year") : t[l](1, "year"), U("year");
60
59
  }, s = g("date"), Re = m(() => {
61
- const e = E("year");
60
+ const e = "";
62
61
  if (s.value === "year") {
63
- const t = Math.floor(ue.value / 10) * 10;
64
- return e ? `${t} ${e} - ${t + 9} ${e}` : `${t} - ${t + 9}`;
62
+ const t = Math.floor(se.value / 10) * 10;
63
+ return `${t} ${e} - ${t + 9} ${e}`;
65
64
  }
66
- return `${ue.value} ${e}`;
65
+ return `${se.value} ${e}`;
67
66
  }), Ke = (e) => {
68
- const t = Ve(e.value) ? e.value() : e.value;
67
+ const t = be(e.value) ? e.value() : e.value;
69
68
  if (t) {
70
- G = !0, v(w(t).locale(d.value));
69
+ H = !0, v(w(t).locale(d.value));
71
70
  return;
72
71
  }
73
72
  e.onClick && e.onClick({
74
- attrs: Ne,
75
- slots: Ee,
73
+ attrs: Ie,
74
+ slots: Ne,
76
75
  emit: b
77
76
  });
78
77
  }, u = m(() => {
79
78
  const { type: e } = n;
80
79
  return ["week", "month", "months", "year", "years", "dates"].includes(e) ? e : "date";
81
- }), X = m(() => u.value === "dates" || u.value === "months" || u.value === "years"), Se = m(() => u.value === "date" ? s.value : u.value), me = m(() => !!re.length), Be = async (e, t) => {
82
- u.value === "month" ? (a.value = Ce(
80
+ }), G = m(() => u.value === "dates" || u.value === "months" || u.value === "years"), Se = m(() => u.value === "date" ? s.value : u.value), ve = m(() => !!ne.length), _e = async (e, t) => {
81
+ u.value === "month" ? (a.value = ge(
83
82
  a.value,
84
83
  a.value.year(),
85
84
  e,
86
85
  d.value,
87
86
  c
88
- ), v(a.value, !1)) : u.value === "months" ? v(e, t ?? !0) : (a.value = Ce(
87
+ ), v(a.value, !1)) : u.value === "months" ? v(e, t ?? !0) : (a.value = ge(
89
88
  a.value,
90
89
  a.value.year(),
91
90
  e,
92
91
  d.value,
93
92
  c
94
- ), s.value = "date", ["month", "year", "date", "week"].includes(u.value) && (v(a.value, !0), await L(), _())), z("month");
95
- }, Ue = async (e, t) => {
93
+ ), s.value = "date", ["month", "year", "date", "week"].includes(u.value) && (v(a.value, !0), await z(), Y())), U("month");
94
+ }, Be = async (e, t) => {
96
95
  if (u.value === "year") {
97
96
  const l = a.value.startOf("year").year(e);
98
- a.value = Te(l, d.value, c), v(a.value, !1);
97
+ a.value = Ce(l, d.value, c), v(a.value, !1);
99
98
  } else if (u.value === "years")
100
99
  v(e, t ?? !0);
101
100
  else {
102
101
  const l = a.value.year(e);
103
- a.value = Te(l, d.value, c), s.value = "month", ["month", "year", "date", "week"].includes(u.value) && (v(a.value, !0), await L(), _());
102
+ a.value = Ce(l, d.value, c), s.value = "month", ["month", "year", "date", "week"].includes(u.value) && (v(a.value, !0), await z(), Y());
104
103
  }
105
- z("year");
106
- }, x = async (e) => {
107
- s.value = e, await L(), _();
108
- }, O = m(
104
+ U("year");
105
+ }, B = async (e) => {
106
+ s.value = e, await z(), Y();
107
+ }, M = m(
109
108
  () => n.type === "datetime" || n.type === "datetimerange"
110
- ), xe = m(() => {
111
- const e = O.value || u.value === "dates", t = u.value === "years", l = u.value === "months", p = s.value === "date", y = s.value === "year", R = s.value === "month";
109
+ ), Ue = m(() => {
110
+ const e = M.value || u.value === "dates", t = u.value === "years", l = u.value === "months", p = s.value === "date", y = s.value === "year", R = s.value === "month";
112
111
  return e && p || t && y || l && R;
113
- }), ze = m(() => c ? n.parsedValue ? J(n.parsedValue) ? c(n.parsedValue[0].toDate()) : c(n.parsedValue.toDate()) : !0 : !1), Ae = () => {
114
- if (X.value)
112
+ }), xe = m(() => c ? n.parsedValue ? A(n.parsedValue) ? c(n.parsedValue[0].toDate()) : c(n.parsedValue.toDate()) : !0 : !1), ze = () => {
113
+ if (G.value)
115
114
  v(n.parsedValue);
116
115
  else {
117
116
  let e = n.parsedValue;
118
117
  if (!e) {
119
- const t = w(H).locale(d.value), l = ee();
118
+ const t = w(J).locale(d.value), l = Z();
120
119
  e = t.year(l.year()).month(l.month()).date(l.date());
121
120
  }
122
121
  a.value = e, v(e);
123
122
  }
124
- }, Le = m(() => c ? c(w().locale(d.value).toDate()) : !1), Je = () => {
123
+ }, Ae = m(() => c ? c(w().locale(d.value).toDate()) : !1), Le = () => {
125
124
  const t = w().locale(d.value).toDate();
126
- q.value = !0, (!c || !c(t)) && Q(t) && (a.value = w().locale(d.value), v(a.value));
127
- }, Z = m(() => n.timeFormat || Dt(n.format)), fe = m(() => n.dateFormat || gt(n.format)), pe = m(() => {
125
+ W.value = !0, (!c || !c(t)) && q(t) && (a.value = w().locale(d.value), v(a.value));
126
+ }, Q = m(() => n.timeFormat || bt(n.format)), me = m(() => n.dateFormat || Vt(n.format)), fe = m(() => {
128
127
  if ($.value) return $.value;
129
- if (!(!n.parsedValue && !M.value))
128
+ if (!(!n.parsedValue && !E.value))
130
129
  return (n.parsedValue || a.value).format(
131
- Z.value
130
+ Q.value
132
131
  );
133
- }), We = m(() => {
132
+ }), Je = m(() => {
134
133
  if (F.value) return F.value;
135
- if (!(!n.parsedValue && !M.value))
134
+ if (!(!n.parsedValue && !E.value))
136
135
  return (n.parsedValue || a.value).format(
137
- fe.value
136
+ me.value
138
137
  );
139
- }), Y = g(!1), He = () => {
140
- Y.value = !0;
141
- }, qe = () => {
142
- Y.value = !1;
143
- }, j = (e) => ({
138
+ }), O = g(!1), We = () => {
139
+ O.value = !0;
140
+ }, He = () => {
141
+ O.value = !1;
142
+ }, X = (e) => ({
144
143
  hour: e.hour(),
145
144
  minute: e.minute(),
146
145
  second: e.second(),
147
146
  year: e.year(),
148
147
  month: e.month(),
149
148
  date: e.date()
150
- }), Ge = (e, t, l) => {
151
- const { hour: p, minute: y, second: R } = j(e), te = n.parsedValue ? n.parsedValue.hour(p).minute(y).second(R) : e;
152
- a.value = te, v(a.value, !0), l || (Y.value = t);
153
- }, Qe = (e) => {
154
- const t = w(e, Z.value).locale(d.value);
155
- if (t.isValid() && Q(t)) {
156
- const { year: l, month: p, date: y } = j(a.value);
157
- a.value = t.year(l).month(p).date(y), $.value = null, Y.value = !1, v(a.value, !0);
149
+ }), qe = (e, t, l) => {
150
+ const { hour: p, minute: y, second: R } = X(e), j = n.parsedValue ? n.parsedValue.hour(p).minute(y).second(R) : e;
151
+ a.value = j, v(a.value, !0), l || (O.value = t);
152
+ }, Ge = (e) => {
153
+ const t = w(e, Q.value).locale(d.value);
154
+ if (t.isValid() && q(t)) {
155
+ const { year: l, month: p, date: y } = X(a.value);
156
+ a.value = t.year(l).month(p).date(y), $.value = null, O.value = !1, v(a.value, !0);
158
157
  }
159
- }, Xe = (e) => {
160
- const t = Pe(
158
+ }, Qe = (e) => {
159
+ const t = Te(
161
160
  e,
162
- fe.value,
161
+ me.value,
163
162
  d.value,
164
- ne
163
+ oe
165
164
  );
166
165
  if (t.isValid()) {
167
166
  if (c && c(t.toDate()))
168
167
  return;
169
- const { hour: l, minute: p, second: y } = j(a.value);
168
+ const { hour: l, minute: p, second: y } = X(a.value);
170
169
  a.value = t.hour(l).minute(p).second(y), F.value = null, v(a.value, !0);
171
170
  }
172
- }, Ze = (e) => w.isDayjs(e) && e.isValid() && (c ? !c(e.toDate()) : !0), je = (e) => J(e) ? e.map((t) => t.format(n.format)) : e.format(n.format), et = (e) => Pe(
171
+ }, Xe = (e) => w.isDayjs(e) && e.isValid() && (c ? !c(e.toDate()) : !0), Ze = (e) => A(e) ? e.map((t) => t.format(n.format)) : e.format(n.format), je = (e) => Te(
173
172
  e,
174
173
  n.format,
175
174
  d.value,
176
- ne
177
- ), ee = () => {
178
- const e = w(M.value).locale(d.value);
179
- if (!M.value) {
180
- const t = se.value;
175
+ oe
176
+ ), Z = () => {
177
+ const e = w(E.value).locale(d.value);
178
+ if (!E.value) {
179
+ const t = re.value;
181
180
  return w().hour(t.hour()).minute(t.minute()).second(t.second()).locale(d.value);
182
181
  }
183
182
  return e;
184
- }, _ = () => {
185
- ["week", "month", "year", "date"].includes(u.value) && U.value?.focus();
186
- }, tt = () => {
187
- _(), u.value === "week" && he(k.down);
188
- }, at = (e) => {
183
+ }, Y = () => {
184
+ ["week", "month", "year", "date"].includes(u.value) && _.value?.focus();
185
+ }, et = () => {
186
+ Y(), u.value === "week" && pe(k.down);
187
+ }, tt = (e) => {
189
188
  const { code: t } = e;
190
189
  [
191
190
  k.up,
@@ -196,11 +195,11 @@ const Tt = ["onClick"], ta = /* @__PURE__ */ rt({
196
195
  k.end,
197
196
  k.pageUp,
198
197
  k.pageDown
199
- ].includes(t) && (he(t), e.stopPropagation(), e.preventDefault()), [k.enter, k.space, k.numpadEnter].includes(
198
+ ].includes(t) && (pe(t), e.stopPropagation(), e.preventDefault()), [k.enter, k.space, k.numpadEnter].includes(
200
199
  t
201
200
  ) && F.value === null && $.value === null && (e.preventDefault(), v(a.value, !1));
202
- }, he = (e) => {
203
- const { up: t, down: l, left: p, right: y, home: R, end: te, pageUp: lt, pageDown: ot } = k, nt = {
201
+ }, pe = (e) => {
202
+ const { up: t, down: l, left: p, right: y, home: R, end: j, pageUp: at, pageDown: lt } = k, ot = {
204
203
  year: {
205
204
  [t]: -4,
206
205
  [l]: 4,
@@ -228,25 +227,25 @@ const Tt = ["onClick"], ta = /* @__PURE__ */ rt({
228
227
  [p]: -1,
229
228
  [y]: 1,
230
229
  [R]: (r) => -r.getDay(),
231
- [te]: (r) => -r.getDay() + 6,
232
- [lt]: (r) => -new Date(r.getFullYear(), r.getMonth(), 0).getDate(),
233
- [ot]: (r) => new Date(r.getFullYear(), r.getMonth() + 1, 0).getDate(),
230
+ [j]: (r) => -r.getDay() + 6,
231
+ [at]: (r) => -new Date(r.getFullYear(), r.getMonth(), 0).getDate(),
232
+ [lt]: (r) => new Date(r.getFullYear(), r.getMonth() + 1, 0).getDate(),
234
233
  offset: (r, D) => r.setDate(r.getDate() + D)
235
234
  }
236
235
  }, K = a.value.toDate();
237
236
  for (; Math.abs(a.value.diff(K, "year", !0)) < 1; ) {
238
- const r = nt[Se.value];
237
+ const r = ot[Se.value];
239
238
  if (!r) return;
240
239
  if (r.offset(
241
240
  K,
242
- Ve(r[e]) ? r[e](K) : r[e] ?? 0
241
+ be(r[e]) ? r[e](K) : r[e] ?? 0
243
242
  ), c && c(K))
244
243
  break;
245
244
  const D = w(K).locale(d.value);
246
245
  a.value = D, b("pick", D, !0);
247
246
  break;
248
247
  }
249
- }, z = (e) => {
248
+ }, U = (e) => {
250
249
  b(
251
250
  "panel-change",
252
251
  a.value.toDate(),
@@ -254,7 +253,7 @@ const Tt = ["onClick"], ta = /* @__PURE__ */ rt({
254
253
  s.value
255
254
  );
256
255
  };
257
- return A(
256
+ return x(
258
257
  () => u.value,
259
258
  (e) => {
260
259
  if (["month", "year"].includes(e)) {
@@ -270,95 +269,95 @@ const Tt = ["onClick"], ta = /* @__PURE__ */ rt({
270
269
  s.value = "date";
271
270
  },
272
271
  { immediate: !0 }
273
- ), A(
272
+ ), x(
274
273
  () => s.value,
275
274
  () => {
276
- Me?.updatePopper();
275
+ Ee?.updatePopper();
277
276
  }
278
- ), A(
279
- () => M.value,
277
+ ), x(
278
+ () => E.value,
280
279
  (e) => {
281
- e && (a.value = ee());
280
+ e && (a.value = Z());
282
281
  },
283
282
  { immediate: !0 }
284
- ), A(
283
+ ), x(
285
284
  () => n.parsedValue,
286
285
  (e) => {
287
286
  if (e) {
288
- if (X.value || J(e)) return;
287
+ if (G.value || A(e)) return;
289
288
  a.value = e;
290
289
  } else
291
- a.value = ee();
290
+ a.value = Z();
292
291
  },
293
292
  { immediate: !0 }
294
- ), b("set-picker-option", ["isValidValue", Ze]), b("set-picker-option", ["formatToString", je]), b("set-picker-option", ["parseUserInput", et]), b("set-picker-option", ["handleFocusPicker", tt]), (e, t) => (C(), I("div", {
293
+ ), b("set-picker-option", ["isValidValue", Xe]), b("set-picker-option", ["formatToString", Ze]), b("set-picker-option", ["parseUserInput", je]), b("set-picker-option", ["handleFocusPicker", et]), (e, t) => (C(), I("div", {
295
294
  class: i([
296
295
  o(f).b(),
297
296
  o(V).b(),
298
297
  {
299
- "has-sidebar": e.$slots.sidebar || me.value,
300
- "has-time": O.value
298
+ "has-sidebar": e.$slots.sidebar || ve.value,
299
+ "has-time": M.value
301
300
  }
302
301
  ])
303
302
  }, [
304
303
  h("div", {
305
304
  class: i(o(f).e("body-wrapper"))
306
305
  }, [
307
- ct(e.$slots, "sidebar", {
306
+ it(e.$slots, "sidebar", {
308
307
  class: i(o(f).e("sidebar"))
309
308
  }),
310
- me.value ? (C(), I("div", {
309
+ ve.value ? (C(), I("div", {
311
310
  key: 0,
312
311
  class: i(o(f).e("sidebar"))
313
312
  }, [
314
- (C(!0), I(dt, null, vt(o(re), (l, p) => (C(), I("button", {
313
+ (C(!0), I(ct, null, dt(o(ne), (l, p) => (C(), I("button", {
315
314
  key: p,
316
315
  type: "button",
317
316
  class: i(o(f).e("shortcut")),
318
317
  onClick: (y) => Ke(l)
319
- }, S(l.text), 11, Tt))), 128))
320
- ], 2)) : B("", !0),
318
+ }, te(l.text), 11, gt))), 128))
319
+ ], 2)) : S("", !0),
321
320
  h("div", {
322
321
  class: i(o(f).e("body"))
323
322
  }, [
324
- O.value ? (C(), I("div", {
323
+ M.value ? (C(), I("div", {
325
324
  key: 0,
326
325
  class: i(o(V).e("time-header"))
327
326
  }, [
328
327
  h("span", {
329
328
  class: i(o(V).e("editor-wrap"))
330
329
  }, [
331
- T(o(ge), {
332
- placeholder: o(E)("selectDate"),
333
- "model-value": We.value,
330
+ T(o(De), {
331
+ placeholder: "选择日期",
332
+ "model-value": Je.value,
334
333
  size: "small",
335
334
  "validate-event": !1,
336
335
  onInput: t[0] || (t[0] = (l) => F.value = l),
337
- onChange: Xe
338
- }, null, 8, ["placeholder", "model-value"])
336
+ onChange: Qe
337
+ }, null, 8, ["model-value"])
339
338
  ], 2),
340
339
  P((C(), I("span", {
341
340
  class: i(o(V).e("editor-wrap"))
342
341
  }, [
343
- T(o(ge), {
344
- placeholder: o(E)("selectTime"),
345
- "model-value": pe.value,
342
+ T(o(De), {
343
+ placeholder: "选择时间",
344
+ "model-value": fe.value,
346
345
  size: "small",
347
346
  "validate-event": !1,
348
- onFocus: He,
347
+ onFocus: We,
349
348
  onInput: t[1] || (t[1] = (l) => $.value = l),
350
- onChange: Qe
351
- }, null, 8, ["placeholder", "model-value"]),
352
- T(o(Ct), {
353
- visible: Y.value,
354
- format: Z.value,
349
+ onChange: Ge
350
+ }, null, 8, ["model-value"]),
351
+ T(o(Dt), {
352
+ visible: O.value,
353
+ format: Q.value,
355
354
  "parsed-value": a.value,
356
- onPick: Ge
355
+ onPick: qe
357
356
  }, null, 8, ["visible", "format", "parsed-value"])
358
357
  ], 2)), [
359
- [o(mt), qe]
358
+ [o(vt), He]
360
359
  ])
361
- ], 2)) : B("", !0),
360
+ ], 2)) : S("", !0),
362
361
  P(h("div", {
363
362
  class: i([
364
363
  o(V).e("header"),
@@ -371,16 +370,16 @@ const Tt = ["onClick"], ta = /* @__PURE__ */ rt({
371
370
  h("button", {
372
371
  type: "button",
373
372
  class: i(["d-arrow-left", o(f).e("icon-btn")]),
374
- onClick: t[2] || (t[2] = (l) => ve(!1))
373
+ onClick: t[2] || (t[2] = (l) => de(!1))
375
374
  }, [
376
- T(o(W), { icon: "icon-d-arrow-left" })
375
+ T(o(L), { icon: "icon-d-arrow-left" })
377
376
  ], 2),
378
377
  P(h("button", {
379
378
  type: "button",
380
379
  class: i([o(f).e("icon-btn"), "arrow-left"]),
381
- onClick: t[3] || (t[3] = (l) => de(!1))
380
+ onClick: t[3] || (t[3] = (l) => ce(!1))
382
381
  }, [
383
- T(o(W), { icon: "icon-arrow-left" })
382
+ T(o(L), { icon: "icon-arrow-left" })
384
383
  ], 2), [
385
384
  [N, s.value === "date"]
386
385
  ])
@@ -390,9 +389,9 @@ const Tt = ["onClick"], ta = /* @__PURE__ */ rt({
390
389
  class: i(o(V).e("header-label")),
391
390
  "aria-live": "polite",
392
391
  tabindex: "0",
393
- onKeydown: t[4] || (t[4] = ye((l) => x("year"), ["enter"])),
394
- onClick: t[5] || (t[5] = (l) => x("year"))
395
- }, S(Re.value), 35),
392
+ onKeydown: t[4] || (t[4] = he((l) => B("year"), ["enter"])),
393
+ onClick: t[5] || (t[5] = (l) => B("year"))
394
+ }, te(Re.value), 35),
396
395
  P(h("span", {
397
396
  role: "button",
398
397
  "aria-live": "polite",
@@ -401,9 +400,9 @@ const Tt = ["onClick"], ta = /* @__PURE__ */ rt({
401
400
  o(V).e("header-label"),
402
401
  { active: s.value === "month" }
403
402
  ]),
404
- onKeydown: t[6] || (t[6] = ye((l) => x("month"), ["enter"])),
405
- onClick: t[7] || (t[7] = (l) => x("month"))
406
- }, S(Ye.value + 1), 35), [
403
+ onKeydown: t[6] || (t[6] = he((l) => B("month"), ["enter"])),
404
+ onClick: t[7] || (t[7] = (l) => B("month"))
405
+ }, te(Oe.value + 1), 35), [
407
406
  [N, s.value === "date"]
408
407
  ]),
409
408
  h("span", {
@@ -412,18 +411,18 @@ const Tt = ["onClick"], ta = /* @__PURE__ */ rt({
412
411
  P(h("button", {
413
412
  type: "button",
414
413
  class: i([o(f).e("icon-btn"), "arrow-right"]),
415
- onClick: t[8] || (t[8] = (l) => de(!0))
414
+ onClick: t[8] || (t[8] = (l) => ce(!0))
416
415
  }, [
417
- T(o(W), { icon: "icon-arrow-right" })
416
+ T(o(L), { icon: "icon-arrow-right" })
418
417
  ], 2), [
419
418
  [N, s.value === "date"]
420
419
  ]),
421
420
  h("button", {
422
421
  type: "button",
423
422
  class: i([o(f).e("icon-btn"), "d-arrow-right"]),
424
- onClick: t[9] || (t[9] = (l) => ve(!0))
423
+ onClick: t[9] || (t[9] = (l) => de(!0))
425
424
  }, [
426
- T(o(W), { icon: "icon-d-arrow-right" })
425
+ T(o(L), { icon: "icon-d-arrow-right" })
427
426
  ], 2)
428
427
  ], 2)
429
428
  ], 2), [
@@ -431,78 +430,78 @@ const Tt = ["onClick"], ta = /* @__PURE__ */ rt({
431
430
  ]),
432
431
  h("div", {
433
432
  class: i(o(f).e("content")),
434
- onKeydown: at
433
+ onKeydown: tt
435
434
  }, [
436
- s.value === "date" ? (C(), le(ht, {
435
+ s.value === "date" ? (C(), ae(pt, {
437
436
  key: 0,
438
437
  ref_key: "currentViewRef",
439
- ref: U,
438
+ ref: _,
440
439
  "selection-mode": u.value,
441
440
  date: a.value,
442
441
  "parsed-value": e.parsedValue,
443
442
  "disabled-date": o(c),
444
- "cell-class-name": o(Oe),
443
+ "cell-class-name": o(Me),
445
444
  "show-week-number": e.showWeekNumber,
446
- onPick: _e
447
- }, null, 8, ["selection-mode", "date", "parsed-value", "disabled-date", "cell-class-name", "show-week-number"])) : B("", !0),
448
- s.value === "year" ? (C(), le(kt, {
445
+ onPick: Ye
446
+ }, null, 8, ["selection-mode", "date", "parsed-value", "disabled-date", "cell-class-name", "show-week-number"])) : S("", !0),
447
+ s.value === "year" ? (C(), ae(yt, {
449
448
  key: 1,
450
449
  ref_key: "currentViewRef",
451
- ref: U,
450
+ ref: _,
452
451
  "selection-mode": u.value,
453
452
  date: a.value,
454
453
  "disabled-date": o(c),
455
454
  "parsed-value": e.parsedValue,
456
- onPick: Ue
457
- }, null, 8, ["selection-mode", "date", "disabled-date", "parsed-value"])) : B("", !0),
458
- s.value === "month" ? (C(), le(yt, {
455
+ onPick: Be
456
+ }, null, 8, ["selection-mode", "date", "disabled-date", "parsed-value"])) : S("", !0),
457
+ s.value === "month" ? (C(), ae(ht, {
459
458
  key: 2,
460
459
  ref_key: "currentViewRef",
461
- ref: U,
460
+ ref: _,
462
461
  "selection-mode": u.value,
463
462
  date: a.value,
464
463
  "parsed-value": e.parsedValue,
465
464
  "disabled-date": o(c),
466
- onPick: Be
467
- }, null, 8, ["selection-mode", "date", "parsed-value", "disabled-date"])) : B("", !0)
465
+ onPick: _e
466
+ }, null, 8, ["selection-mode", "date", "parsed-value", "disabled-date"])) : S("", !0)
468
467
  ], 34)
469
468
  ], 2)
470
469
  ], 2),
471
470
  P(h("div", {
472
471
  class: i(o(f).e("footer"))
473
472
  }, [
474
- P(T(o(be), {
473
+ P(T(o(we), {
475
474
  text: "",
476
475
  size: "small",
477
476
  class: i(o(f).e("link-btn")),
478
- disabled: Le.value,
479
- onClick: Je
477
+ disabled: Ae.value,
478
+ onClick: Le
480
479
  }, {
481
- default: ke(() => [
482
- we(S(o(E)("now")), 1)
483
- ]),
480
+ default: ye(() => [...t[10] || (t[10] = [
481
+ ke(" 此刻 ", -1)
482
+ ])]),
484
483
  _: 1
485
484
  }, 8, ["class", "disabled"]), [
486
- [N, !X.value && e.showNow]
485
+ [N, !G.value && e.showNow]
487
486
  ]),
488
- T(o(be), {
487
+ T(o(we), {
489
488
  plain: "",
490
489
  size: "small",
491
490
  class: i(o(f).e("link-btn")),
492
- disabled: ze.value,
493
- onClick: Ae
491
+ disabled: xe.value,
492
+ onClick: ze
494
493
  }, {
495
- default: ke(() => [
496
- we(S(o(E)("confirm")), 1)
497
- ]),
494
+ default: ye(() => [...t[11] || (t[11] = [
495
+ ke(" 确认 ", -1)
496
+ ])]),
498
497
  _: 1
499
498
  }, 8, ["class", "disabled"])
500
499
  ], 2), [
501
- [N, xe.value]
500
+ [N, Ue.value]
502
501
  ])
503
502
  ], 2));
504
503
  }
505
504
  });
506
505
  export {
507
- ta as default
506
+ Zt as default
508
507
  };