vft 0.0.511 → 0.0.513
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.
- package/dist/index.css +1 -1
- package/es/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/es/components/autocomplete/index.d.ts +6 -6
- package/es/components/button/index.d.ts +9 -9
- package/es/components/cascader/cascader.vue2.js +202 -203
- package/es/components/cascader-panel/menu.vue2.js +49 -50
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +18 -19
- package/es/components/color-picker/color-picker.vue2.js +133 -134
- package/es/components/config-provider/config-provider.vue.d.ts +0 -2
- package/es/components/config-provider/config-provider.vue2.js +4 -5
- package/es/components/config-provider/constants.d.ts +0 -1
- package/es/components/config-provider/constants.js +2 -3
- package/es/components/config-provider/hooks/use-global-config.js +30 -33
- package/es/components/config-provider/index.d.ts +0 -9
- package/es/components/config-provider/index.js +5 -6
- package/es/components/date-picker/composables/use-basic-date-table.js +82 -83
- package/es/components/date-picker/composables/use-month-range-header.js +14 -15
- package/es/components/date-picker/composables/use-panel-date-range.js +23 -24
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +38 -39
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +38 -39
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +183 -184
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +224 -225
- package/es/components/date-time-select/date-time-select.vue2.js +36 -39
- package/es/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue.d.ts +1 -1
- package/es/components/dropdown/dropdown.vue2.js +67 -68
- package/es/components/dropdown/index.d.ts +33 -33
- package/es/components/empty/empty.vue2.js +38 -39
- package/es/components/full-screen/full-screen.vue2.js +17 -18
- package/es/components/image/image.vue2.js +59 -60
- package/es/components/image-viewer/image-viewer.vue2.js +44 -45
- package/es/components/index.js +97 -98
- package/es/components/md-container/md-container.vue2.js +74 -75
- package/es/components/md-container/toc.js +36 -37
- package/es/components/message-box/message-box.vue2.js +3 -3
- package/es/components/message-box/method.js +47 -48
- package/es/components/modal/modal-footer-action.vue2.js +24 -25
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +15 -16
- package/es/components/multiple-tabs/use/use-tab-dropdown.js +53 -54
- package/es/components/popconfirm/index.d.ts +15 -15
- package/es/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/es/components/popconfirm/popconfirm.vue2.js +39 -40
- package/es/components/search/search.vue2.js +50 -51
- package/es/components/select/index.d.ts +4 -4
- package/es/components/select/select.vue.d.ts +4 -4
- package/es/components/select/useSelect.d.ts +4 -4
- package/es/components/select/useSelect.js +231 -232
- package/es/components/time-picker/time-picker-com/panel-time-pick.vue2.js +65 -66
- package/es/components/time-picker/time-picker-com/panel-time-range.vue2.js +133 -134
- package/es/components/transfer/transfer-panel.vue2.js +56 -57
- package/es/components/transfer/transfer.vue2.js +69 -70
- package/es/components/tree/tree.vue2.js +59 -60
- package/es/components/upload/upload-content.vue2.js +49 -50
- package/es/components/upload/upload-list.vue2.js +45 -46
- package/es/components/upload/upload.vue2.js +99 -100
- package/es/hooks/use-z-index/index.js +3 -3
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -5
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/components/autocomplete/autocomplete.vue.d.ts +2 -2
- package/lib/components/autocomplete/index.d.ts +6 -6
- package/lib/components/button/index.d.ts +9 -9
- package/lib/components/cascader/cascader.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +4 -4
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue.d.ts +0 -2
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/config-provider/constants.cjs +1 -1
- package/lib/components/config-provider/constants.d.ts +0 -1
- package/lib/components/config-provider/hooks/use-global-config.cjs +1 -1
- package/lib/components/config-provider/index.cjs +1 -1
- package/lib/components/config-provider/index.d.ts +0 -9
- package/lib/components/date-picker/composables/use-basic-date-table.cjs +1 -1
- package/lib/components/date-picker/composables/use-month-range-header.cjs +1 -1
- package/lib/components/date-picker/composables/use-panel-date-range.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown-item.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue.d.ts +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/dropdown/index.d.ts +33 -33
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/index.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-container/toc.cjs +1 -1
- package/lib/components/message-box/message-box.vue2.cjs +1 -1
- package/lib/components/message-box/method.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
- package/lib/components/popconfirm/index.d.ts +15 -15
- package/lib/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/index.d.ts +4 -4
- package/lib/components/select/select.vue.d.ts +4 -4
- package/lib/components/select/useSelect.cjs +1 -1
- package/lib/components/select/useSelect.d.ts +4 -4
- package/lib/components/time-picker/time-picker-com/panel-time-pick.vue2.cjs +1 -1
- package/lib/components/time-picker/time-picker-com/panel-time-range.vue2.cjs +1 -1
- package/lib/components/transfer/transfer-panel.vue2.cjs +1 -1
- package/lib/components/transfer/transfer.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/index.cjs +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +2 -2
- package/theme-style/index.css +1 -1
- package/theme-style/src/message-box.scss +2 -2
- package/theme-style/src/table.scss +2 -0
- package/theme-style/vft-message-box.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/web-types.json +1 -1
- package/es/locale/index.d.js +0 -1
- package/es/locale/index.d.ts +0 -26
- package/es/locale/index.js +0 -10
- package/es/locale/lang/en.d.ts +0 -183
- package/es/locale/lang/en.js +0 -241
- package/es/locale/lang/zh-cn.d.ts +0 -183
- package/es/locale/lang/zh-cn.js +0 -241
- package/es/locale/lang/zh-tw.d.ts +0 -183
- package/es/locale/lang/zh-tw.js +0 -241
- package/es/locale/use-locale.d.ts +0 -17
- package/es/locale/use-locale.js +0 -56
- package/lib/locale/index.cjs +0 -1
- package/lib/locale/index.d.cjs +0 -1
- package/lib/locale/index.d.ts +0 -26
- package/lib/locale/lang/en.cjs +0 -1
- package/lib/locale/lang/en.d.ts +0 -183
- package/lib/locale/lang/zh-cn.cjs +0 -1
- package/lib/locale/lang/zh-cn.d.ts +0 -183
- package/lib/locale/lang/zh-tw.cjs +0 -1
- package/lib/locale/lang/zh-tw.d.ts +0 -183
- package/lib/locale/use-locale.cjs +0 -1
- package/lib/locale/use-locale.d.ts +0 -17
|
@@ -1,110 +1,109 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as F, inject as L, ref as C, computed as d, openBlock as w, createBlock as Q, Transition as W, withCtx as X, createElementBlock as Z, normalizeClass as r, unref as s, createElementVNode as p, createVNode as ee, createCommentVNode as te } from "vue";
|
|
2
2
|
import f from "dayjs";
|
|
3
|
-
import { EVENT_CODE as
|
|
3
|
+
import { EVENT_CODE as ne } from "../../../constants/aria.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
|
-
import { isUndefined as
|
|
5
|
+
import { isUndefined as oe } from "@vft/utils";
|
|
6
6
|
import "../../config-provider/hooks/use-global-config.js";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "../../form/index.js";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as se } from "../../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../../hooks/use-z-index/index.js";
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
const Pe = /* @__PURE__ */ Q({
|
|
13
|
+
import { PICKER_BASE_INJECTION_KEY as ae } from "../constants.js";
|
|
14
|
+
import { panelTimePickerProps as ie } from "../props/panel-time-picker.js";
|
|
15
|
+
import { useTimePanel as re } from "../composables/use-time-panel.js";
|
|
16
|
+
import { useOldValue as le, buildAvailableTimeSlotGetter as ce } from "../composables/use-time-picker.js";
|
|
17
|
+
import pe from "./basic-time-spinner.vue2.js";
|
|
18
|
+
const _e = /* @__PURE__ */ F({
|
|
20
19
|
__name: "panel-time-pick",
|
|
21
|
-
props:
|
|
20
|
+
props: ie,
|
|
22
21
|
emits: ["pick", "select-range", "set-picker-option"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
arrowControl:
|
|
22
|
+
setup(T, { emit: A }) {
|
|
23
|
+
const n = T, o = A, R = L(ae), {
|
|
24
|
+
arrowControl: E,
|
|
26
25
|
disabledHours: b,
|
|
27
26
|
disabledMinutes: g,
|
|
28
27
|
disabledSeconds: v,
|
|
29
|
-
defaultValue:
|
|
30
|
-
} =
|
|
31
|
-
const t = f(e).locale(
|
|
28
|
+
defaultValue: _
|
|
29
|
+
} = R.props, { getAvailableHours: N, getAvailableMinutes: O, getAvailableSeconds: D } = ce(b, g, v), i = se("time"), u = C("zh-cn"), k = C([0, 2]), y = le(n), I = d(() => oe(n.actualVisible) ? `${i.namespace.value}-zoom-in-top` : ""), l = d(() => n.format.includes("ss")), P = d(() => n.format.includes("A") ? "A" : n.format.includes("a") ? "a" : ""), B = (e) => {
|
|
30
|
+
const t = f(e).locale(u.value), a = m(t);
|
|
32
31
|
return t.isSame(a);
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
t ||
|
|
37
|
-
},
|
|
38
|
-
if (!
|
|
32
|
+
}, K = () => {
|
|
33
|
+
o("pick", y.value, !1);
|
|
34
|
+
}, x = (e = !1, t = !1) => {
|
|
35
|
+
t || o("pick", n.parsedValue, e);
|
|
36
|
+
}, z = (e) => {
|
|
37
|
+
if (!n.visible)
|
|
39
38
|
return;
|
|
40
|
-
const t =
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
},
|
|
39
|
+
const t = m(e).millisecond(0);
|
|
40
|
+
o("pick", t, !0);
|
|
41
|
+
}, M = (e, t) => {
|
|
42
|
+
o("select-range", e, t), k.value = [e, t];
|
|
43
|
+
}, U = (e) => {
|
|
45
44
|
const t = [0, 3].concat(l.value ? [6] : []), a = ["hours", "minutes"].concat(
|
|
46
45
|
l.value ? ["seconds"] : []
|
|
47
|
-
), c = (t.indexOf(
|
|
48
|
-
|
|
49
|
-
},
|
|
50
|
-
const t = e.code, { left: a, right:
|
|
51
|
-
if ([a,
|
|
52
|
-
|
|
46
|
+
), c = (t.indexOf(k.value[0]) + e + t.length) % t.length;
|
|
47
|
+
h.start_emitSelectRange(a[c]);
|
|
48
|
+
}, $ = (e) => {
|
|
49
|
+
const t = e.code, { left: a, right: V, up: c, down: q } = ne;
|
|
50
|
+
if ([a, V].includes(t)) {
|
|
51
|
+
U(t === a ? -1 : 1), e.preventDefault();
|
|
53
52
|
return;
|
|
54
53
|
}
|
|
55
|
-
if ([c,
|
|
56
|
-
const
|
|
57
|
-
|
|
54
|
+
if ([c, q].includes(t)) {
|
|
55
|
+
const S = t === c ? -1 : 1;
|
|
56
|
+
h.start_scrollDown(S), e.preventDefault();
|
|
58
57
|
}
|
|
59
|
-
}, { timePickerOptions:
|
|
60
|
-
getAvailableHours:
|
|
61
|
-
getAvailableMinutes:
|
|
62
|
-
getAvailableSeconds:
|
|
63
|
-
}),
|
|
64
|
-
return
|
|
65
|
-
default:
|
|
66
|
-
e.actualVisible || e.visible ? (
|
|
58
|
+
}, { timePickerOptions: h, onSetOption: j, getAvailableTime: H } = re({
|
|
59
|
+
getAvailableHours: N,
|
|
60
|
+
getAvailableMinutes: O,
|
|
61
|
+
getAvailableSeconds: D
|
|
62
|
+
}), m = (e) => H(e, n.datetimeRole || "", !0), G = (e) => e ? f(e, n.format).locale(u.value) : null, J = (e) => e ? e.format(n.format) : null, Y = () => f(_).locale(u.value);
|
|
63
|
+
return o("set-picker-option", ["isValidValue", B]), o("set-picker-option", ["formatToString", J]), o("set-picker-option", ["parseUserInput", G]), o("set-picker-option", ["handleKeydownInput", $]), o("set-picker-option", ["getRangeAvailableTime", m]), o("set-picker-option", ["getDefaultValue", Y]), (e, t) => (w(), Q(W, { name: I.value }, {
|
|
64
|
+
default: X(() => [
|
|
65
|
+
e.actualVisible || e.visible ? (w(), Z("div", {
|
|
67
66
|
key: 0,
|
|
68
|
-
class: r(
|
|
67
|
+
class: r(s(i).b("panel"))
|
|
69
68
|
}, [
|
|
70
69
|
p("div", {
|
|
71
|
-
class: r([
|
|
70
|
+
class: r([s(i).be("panel", "content"), { "has-seconds": l.value }])
|
|
72
71
|
}, [
|
|
73
|
-
|
|
72
|
+
ee(pe, {
|
|
74
73
|
ref: "spinner",
|
|
75
74
|
role: e.datetimeRole || "start",
|
|
76
|
-
"arrow-control":
|
|
75
|
+
"arrow-control": s(E),
|
|
77
76
|
"show-seconds": l.value,
|
|
78
|
-
"am-pm-mode":
|
|
77
|
+
"am-pm-mode": P.value,
|
|
79
78
|
"spinner-date": e.parsedValue,
|
|
80
|
-
"disabled-hours":
|
|
81
|
-
"disabled-minutes":
|
|
82
|
-
"disabled-seconds":
|
|
83
|
-
onChange:
|
|
84
|
-
onSetOption:
|
|
85
|
-
onSelectRange:
|
|
79
|
+
"disabled-hours": s(b),
|
|
80
|
+
"disabled-minutes": s(g),
|
|
81
|
+
"disabled-seconds": s(v),
|
|
82
|
+
onChange: z,
|
|
83
|
+
onSetOption: s(j),
|
|
84
|
+
onSelectRange: M
|
|
86
85
|
}, null, 8, ["role", "arrow-control", "show-seconds", "am-pm-mode", "spinner-date", "disabled-hours", "disabled-minutes", "disabled-seconds", "onSetOption"])
|
|
87
86
|
], 2),
|
|
88
87
|
p("div", {
|
|
89
|
-
class: r(
|
|
88
|
+
class: r(s(i).be("panel", "footer"))
|
|
90
89
|
}, [
|
|
91
90
|
p("button", {
|
|
92
91
|
type: "button",
|
|
93
|
-
class: r(["cancel", [
|
|
94
|
-
onClick:
|
|
95
|
-
},
|
|
92
|
+
class: r(["cancel", [s(i).be("panel", "btn")]]),
|
|
93
|
+
onClick: K
|
|
94
|
+
}, " 取消 ", 2),
|
|
96
95
|
p("button", {
|
|
97
96
|
type: "button",
|
|
98
|
-
class: r(["confirm", [
|
|
99
|
-
onClick: t[0] || (t[0] = (a) =>
|
|
100
|
-
},
|
|
97
|
+
class: r(["confirm", [s(i).be("panel", "btn")]]),
|
|
98
|
+
onClick: t[0] || (t[0] = (a) => x())
|
|
99
|
+
}, " 确认 ", 2)
|
|
101
100
|
], 2)
|
|
102
|
-
], 2)) :
|
|
101
|
+
], 2)) : te("", !0)
|
|
103
102
|
]),
|
|
104
103
|
_: 1
|
|
105
104
|
}, 8, ["name"]));
|
|
106
105
|
}
|
|
107
106
|
});
|
|
108
107
|
export {
|
|
109
|
-
|
|
108
|
+
_e as default
|
|
110
109
|
};
|
|
@@ -1,193 +1,192 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ve, ref as j, inject as be, computed as d, openBlock as ge, createElementBlock as he, normalizeClass as u, unref as s, createElementVNode as m, createVNode as z, createCommentVNode as ke } from "vue";
|
|
2
2
|
import S from "dayjs";
|
|
3
|
-
import { union as
|
|
3
|
+
import { union as A } from "lodash-es";
|
|
4
4
|
import "@vueuse/core";
|
|
5
|
-
import { isArray as
|
|
5
|
+
import { isArray as M } from "@vft/utils";
|
|
6
6
|
import "../../config-provider/hooks/use-global-config.js";
|
|
7
|
-
import { EVENT_CODE as
|
|
7
|
+
import { EVENT_CODE as Se } from "../../../constants/aria.js";
|
|
8
8
|
import "../../form/index.js";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as U } from "../../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../../hooks/use-z-index/index.js";
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
const Ae = ["disabled"], qe = /* @__PURE__ */ ge({
|
|
13
|
+
import { PICKER_BASE_INJECTION_KEY as Ce } from "../constants.js";
|
|
14
|
+
import { panelTimeRangeProps as De } from "../props/panel-time-range.js";
|
|
15
|
+
import { useTimePanel as we } from "../composables/use-time-panel.js";
|
|
16
|
+
import { useOldValue as Ve, buildAvailableTimeSlotGetter as _e } from "../composables/use-time-picker.js";
|
|
17
|
+
import G from "./basic-time-spinner.vue2.js";
|
|
18
|
+
const Re = ["disabled"], Ge = /* @__PURE__ */ ve({
|
|
20
19
|
__name: "panel-time-range",
|
|
21
|
-
props:
|
|
20
|
+
props: De,
|
|
22
21
|
emits: ["pick", "select-range", "set-picker-option"],
|
|
23
|
-
setup(
|
|
24
|
-
const i =
|
|
22
|
+
setup(J, { emit: Y }) {
|
|
23
|
+
const i = J, c = Y, g = (e, t) => {
|
|
25
24
|
const n = [];
|
|
26
|
-
for (let
|
|
27
|
-
n.push(
|
|
25
|
+
for (let o = e; o <= t; o++)
|
|
26
|
+
n.push(o);
|
|
28
27
|
return n;
|
|
29
|
-
},
|
|
28
|
+
}, k = j("zh-cn"), a = U("time"), q = U("picker"), F = be(Ce), {
|
|
30
29
|
arrowControl: C,
|
|
31
|
-
disabledHours:
|
|
32
|
-
disabledMinutes:
|
|
33
|
-
disabledSeconds:
|
|
34
|
-
defaultValue:
|
|
35
|
-
} =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
disabledHours: O,
|
|
31
|
+
disabledMinutes: E,
|
|
32
|
+
disabledSeconds: N,
|
|
33
|
+
defaultValue: w
|
|
34
|
+
} = F.props, L = d(() => [
|
|
35
|
+
a.be("range-picker", "body"),
|
|
36
|
+
a.be("panel", "content"),
|
|
37
|
+
a.is("arrow", C),
|
|
39
38
|
b.value ? "has-seconds" : ""
|
|
40
|
-
]),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
]), Q = d(() => [
|
|
40
|
+
a.be("range-picker", "body"),
|
|
41
|
+
a.be("panel", "content"),
|
|
42
|
+
a.is("arrow", C),
|
|
44
43
|
b.value ? "has-seconds" : ""
|
|
45
|
-
]), f = d(() => i.parsedValue[0]), v = d(() => i.parsedValue[1]),
|
|
46
|
-
c("pick",
|
|
47
|
-
}, b = d(() => i.format.includes("ss")),
|
|
44
|
+
]), f = d(() => i.parsedValue[0]), v = d(() => i.parsedValue[1]), W = Ve(i), X = () => {
|
|
45
|
+
c("pick", W.value, !1);
|
|
46
|
+
}, b = d(() => i.format.includes("ss")), H = d(() => i.format.includes("A") ? "A" : i.format.includes("a") ? "a" : ""), Z = (e = !1) => {
|
|
48
47
|
c("pick", [f.value, v.value], e);
|
|
48
|
+
}, ee = (e) => {
|
|
49
|
+
I(e.millisecond(0), v.value);
|
|
50
|
+
}, te = (e) => {
|
|
51
|
+
I(f.value, e.millisecond(0));
|
|
49
52
|
}, ne = (e) => {
|
|
50
|
-
|
|
51
|
-
}, oe = (e) => {
|
|
52
|
-
K(f.value, e.millisecond(0));
|
|
53
|
-
}, ae = (e) => {
|
|
54
|
-
const t = e.map((a) => S(a).locale(h.value)), n = B(t);
|
|
53
|
+
const t = e.map((o) => S(o).locale(k.value)), n = P(t);
|
|
55
54
|
return t[0].isSame(n[0]) && t[1].isSame(n[1]);
|
|
56
|
-
},
|
|
55
|
+
}, I = (e, t) => {
|
|
57
56
|
i.visible && c("pick", [e, t], !0);
|
|
58
|
-
},
|
|
59
|
-
c("select-range", e, t, "min"),
|
|
60
|
-
},
|
|
57
|
+
}, oe = d(() => f.value > v.value), D = j([0, 2]), ae = (e, t) => {
|
|
58
|
+
c("select-range", e, t, "min"), D.value = [e, t];
|
|
59
|
+
}, K = d(() => b.value ? 11 : 8), se = (e, t) => {
|
|
61
60
|
c("select-range", e, t, "max");
|
|
62
|
-
const n =
|
|
63
|
-
|
|
64
|
-
},
|
|
61
|
+
const n = s(K);
|
|
62
|
+
D.value = [e + n, t + n];
|
|
63
|
+
}, re = (e) => {
|
|
65
64
|
const t = b.value ? [0, 3, 6, 11, 14, 17] : [0, 3, 8, 11], n = ["hours", "minutes"].concat(
|
|
66
65
|
b.value ? ["seconds"] : []
|
|
67
|
-
), r = (t.indexOf(
|
|
68
|
-
r < l ?
|
|
69
|
-
},
|
|
70
|
-
const t = e.code, { left: n, right:
|
|
71
|
-
if ([n,
|
|
72
|
-
|
|
66
|
+
), r = (t.indexOf(D.value[0]) + e + t.length) % t.length, l = t.length / 2;
|
|
67
|
+
r < l ? T.start_emitSelectRange(n[r]) : T.end_emitSelectRange(n[r - l]);
|
|
68
|
+
}, le = (e) => {
|
|
69
|
+
const t = e.code, { left: n, right: o, up: r, down: l } = Se;
|
|
70
|
+
if ([n, o].includes(t)) {
|
|
71
|
+
re(t === n ? -1 : 1), e.preventDefault();
|
|
73
72
|
return;
|
|
74
73
|
}
|
|
75
74
|
if ([r, l].includes(t)) {
|
|
76
|
-
const
|
|
77
|
-
|
|
75
|
+
const p = t === r ? -1 : 1, h = D.value[0] < K.value ? "start" : "end";
|
|
76
|
+
T[`${h}_scrollDown`](p), e.preventDefault();
|
|
78
77
|
}
|
|
79
|
-
},
|
|
80
|
-
const n =
|
|
81
|
-
return
|
|
82
|
-
},
|
|
83
|
-
const
|
|
84
|
-
if (e !==
|
|
85
|
-
return
|
|
86
|
-
const
|
|
87
|
-
return
|
|
88
|
-
},
|
|
89
|
-
const r =
|
|
90
|
-
if (e !==
|
|
78
|
+
}, V = (e, t) => {
|
|
79
|
+
const n = O ? O(e) : [], o = e === "start", l = (t || (o ? v.value : f.value)).hour(), p = o ? g(l + 1, 23) : g(0, l - 1);
|
|
80
|
+
return A(n, p);
|
|
81
|
+
}, _ = (e, t, n) => {
|
|
82
|
+
const o = E ? E(e, t) : [], r = t === "start", l = n || (r ? v.value : f.value), p = l.hour();
|
|
83
|
+
if (e !== p)
|
|
84
|
+
return o;
|
|
85
|
+
const h = l.minute(), x = r ? g(h + 1, 59) : g(0, h - 1);
|
|
86
|
+
return A(o, x);
|
|
87
|
+
}, R = (e, t, n, o) => {
|
|
88
|
+
const r = N ? N(e, t, n) : [], l = n === "start", p = o || (l ? v.value : f.value), h = p.hour(), x = p.minute();
|
|
89
|
+
if (e !== h || t !== x)
|
|
91
90
|
return r;
|
|
92
|
-
const
|
|
93
|
-
return
|
|
94
|
-
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
], { getAvailableHours:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
91
|
+
const $ = p.second(), fe = l ? g($ + 1, 59) : g(0, $ - 1);
|
|
92
|
+
return A(r, fe);
|
|
93
|
+
}, P = ([e, t]) => [
|
|
94
|
+
y(e, "start", !0, t),
|
|
95
|
+
y(t, "end", !1, e)
|
|
96
|
+
], { getAvailableHours: ie, getAvailableMinutes: ce, getAvailableSeconds: ue } = _e(
|
|
97
|
+
V,
|
|
98
|
+
_,
|
|
99
|
+
R
|
|
101
100
|
), {
|
|
102
|
-
timePickerOptions:
|
|
103
|
-
getAvailableTime:
|
|
104
|
-
onSetOption:
|
|
105
|
-
} =
|
|
106
|
-
getAvailableHours:
|
|
107
|
-
getAvailableMinutes:
|
|
108
|
-
getAvailableSeconds:
|
|
109
|
-
}),
|
|
110
|
-
if (
|
|
111
|
-
return
|
|
112
|
-
const e = S(
|
|
101
|
+
timePickerOptions: T,
|
|
102
|
+
getAvailableTime: y,
|
|
103
|
+
onSetOption: B
|
|
104
|
+
} = we({
|
|
105
|
+
getAvailableHours: ie,
|
|
106
|
+
getAvailableMinutes: ce,
|
|
107
|
+
getAvailableSeconds: ue
|
|
108
|
+
}), pe = (e) => e ? M(e) ? e.map((t) => S(t, i.format).locale(k.value)) : S(e, i.format).locale(k.value) : null, me = (e) => e ? M(e) ? e.map((t) => t.format(i.format)) : e.format(i.format) : null, de = () => {
|
|
109
|
+
if (M(w))
|
|
110
|
+
return w.map((t) => S(t).locale(k.value));
|
|
111
|
+
const e = S(w).locale(k.value);
|
|
113
112
|
return [e, e.add(60, "m")];
|
|
114
113
|
};
|
|
115
|
-
return c("set-picker-option", ["formatToString",
|
|
114
|
+
return c("set-picker-option", ["formatToString", me]), c("set-picker-option", ["parseUserInput", pe]), c("set-picker-option", ["isValidValue", ne]), c("set-picker-option", ["handleKeydownInput", le]), c("set-picker-option", ["getDefaultValue", de]), c("set-picker-option", ["getRangeAvailableTime", P]), (e, t) => e.actualVisible ? (ge(), he("div", {
|
|
116
115
|
key: 0,
|
|
117
|
-
class: u([
|
|
116
|
+
class: u([s(a).b("range-picker"), s(q).b("panel")])
|
|
118
117
|
}, [
|
|
119
|
-
|
|
120
|
-
class: u(
|
|
118
|
+
m("div", {
|
|
119
|
+
class: u(s(a).be("range-picker", "content"))
|
|
121
120
|
}, [
|
|
122
|
-
|
|
123
|
-
class: u(
|
|
121
|
+
m("div", {
|
|
122
|
+
class: u(s(a).be("range-picker", "cell"))
|
|
124
123
|
}, [
|
|
125
|
-
|
|
126
|
-
class: u(
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
class: u(
|
|
124
|
+
m("div", {
|
|
125
|
+
class: u(s(a).be("range-picker", "header"))
|
|
126
|
+
}, "开始时间", 2),
|
|
127
|
+
m("div", {
|
|
128
|
+
class: u(L.value)
|
|
130
129
|
}, [
|
|
131
|
-
G
|
|
130
|
+
z(G, {
|
|
132
131
|
ref: "minSpinner",
|
|
133
132
|
role: "start",
|
|
134
133
|
"show-seconds": b.value,
|
|
135
|
-
"am-pm-mode":
|
|
136
|
-
"arrow-control":
|
|
134
|
+
"am-pm-mode": H.value,
|
|
135
|
+
"arrow-control": s(C),
|
|
137
136
|
"spinner-date": f.value,
|
|
138
|
-
"disabled-hours":
|
|
139
|
-
"disabled-minutes":
|
|
140
|
-
"disabled-seconds":
|
|
141
|
-
onChange:
|
|
142
|
-
onSetOption:
|
|
143
|
-
onSelectRange:
|
|
137
|
+
"disabled-hours": V,
|
|
138
|
+
"disabled-minutes": _,
|
|
139
|
+
"disabled-seconds": R,
|
|
140
|
+
onChange: ee,
|
|
141
|
+
onSetOption: s(B),
|
|
142
|
+
onSelectRange: ae
|
|
144
143
|
}, null, 8, ["show-seconds", "am-pm-mode", "arrow-control", "spinner-date", "onSetOption"])
|
|
145
144
|
], 2)
|
|
146
145
|
], 2),
|
|
147
|
-
|
|
148
|
-
class: u(
|
|
146
|
+
m("div", {
|
|
147
|
+
class: u(s(a).be("range-picker", "cell"))
|
|
149
148
|
}, [
|
|
150
|
-
|
|
151
|
-
class: u(
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
class: u(
|
|
149
|
+
m("div", {
|
|
150
|
+
class: u(s(a).be("range-picker", "header"))
|
|
151
|
+
}, "结束时间", 2),
|
|
152
|
+
m("div", {
|
|
153
|
+
class: u(Q.value)
|
|
155
154
|
}, [
|
|
156
|
-
G
|
|
155
|
+
z(G, {
|
|
157
156
|
ref: "maxSpinner",
|
|
158
157
|
role: "end",
|
|
159
158
|
"show-seconds": b.value,
|
|
160
|
-
"am-pm-mode":
|
|
161
|
-
"arrow-control":
|
|
159
|
+
"am-pm-mode": H.value,
|
|
160
|
+
"arrow-control": s(C),
|
|
162
161
|
"spinner-date": v.value,
|
|
163
|
-
"disabled-hours":
|
|
164
|
-
"disabled-minutes":
|
|
165
|
-
"disabled-seconds":
|
|
166
|
-
onChange:
|
|
167
|
-
onSetOption:
|
|
168
|
-
onSelectRange:
|
|
162
|
+
"disabled-hours": V,
|
|
163
|
+
"disabled-minutes": _,
|
|
164
|
+
"disabled-seconds": R,
|
|
165
|
+
onChange: te,
|
|
166
|
+
onSetOption: s(B),
|
|
167
|
+
onSelectRange: se
|
|
169
168
|
}, null, 8, ["show-seconds", "am-pm-mode", "arrow-control", "spinner-date", "onSetOption"])
|
|
170
169
|
], 2)
|
|
171
170
|
], 2)
|
|
172
171
|
], 2),
|
|
173
|
-
|
|
174
|
-
class: u(
|
|
172
|
+
m("div", {
|
|
173
|
+
class: u(s(a).be("panel", "footer"))
|
|
175
174
|
}, [
|
|
176
|
-
|
|
175
|
+
m("button", {
|
|
177
176
|
type: "button",
|
|
178
|
-
class: u(["cancel", [
|
|
179
|
-
onClick: t[0] || (t[0] = (n) =>
|
|
180
|
-
},
|
|
181
|
-
|
|
177
|
+
class: u(["cancel", [s(a).be("panel", "btn")]]),
|
|
178
|
+
onClick: t[0] || (t[0] = (n) => X())
|
|
179
|
+
}, " 取消 ", 2),
|
|
180
|
+
m("button", {
|
|
182
181
|
type: "button",
|
|
183
|
-
class: u(["confirm", [
|
|
184
|
-
disabled:
|
|
185
|
-
onClick: t[1] || (t[1] = (n) =>
|
|
186
|
-
},
|
|
182
|
+
class: u(["confirm", [s(a).be("panel", "btn")]]),
|
|
183
|
+
disabled: oe.value,
|
|
184
|
+
onClick: t[1] || (t[1] = (n) => Z())
|
|
185
|
+
}, " 确认 ", 10, Re)
|
|
187
186
|
], 2)
|
|
188
|
-
], 2)) :
|
|
187
|
+
], 2)) : ke("", !0);
|
|
189
188
|
}
|
|
190
189
|
});
|
|
191
190
|
export {
|
|
192
|
-
|
|
191
|
+
Ge as default
|
|
193
192
|
};
|