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