@das-fed/upf-ui 6.4.0-dev.288 → 6.4.0-dev.290
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/package.json +7 -7
- package/packages/components/date-picker/index.js +829 -753
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/src/DatePicker.vue.d.ts +5 -5
- package/packages/components/date-picker/src/type.d.ts +22 -13
- package/packages/components/date-picker/style.css +1 -1
- package/packages/components/date-picker/style.css.gz +0 -0
- package/packages/components/form-item/index.js +3 -3
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/form-item/style.css +1 -1
- package/packages/components/form-item/style.css.gz +0 -0
- package/packages/components/input/index.js +972 -966
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/select/index.js +5 -4
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/text-tooltip/index.d.ts +1 -0
- package/packages/components/text-tooltip/index.js +733 -727
- package/packages/components/text-tooltip/index.js.gz +0 -0
- package/packages/components/text-tooltip/src/type.d.ts +16 -4
- package/packages/components/tree-select/index.js +132 -132
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/style.css +1 -1
- package/packages/components/tree-select/style.css.gz +0 -0
- package/packages/components/tree-v2/index.js +2170 -2164
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/release-meta.json +4 -4
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { withInstall as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { ConfigProvider as
|
|
4
|
-
import { DasAutoRegisterIcon as
|
|
5
|
-
import { DasTooltip as
|
|
6
|
-
import { DasErrorOverlayModel as
|
|
7
|
-
import { useModelValue as
|
|
8
|
-
import { vHoverInside as
|
|
9
|
-
import { useZIndex as
|
|
10
|
-
import { currentLang as
|
|
11
|
-
import { calcTextWidth as
|
|
12
|
-
import { isTimeZonePickerModeEnabled as
|
|
1
|
+
import { withInstall as Ae } from "@das-fed/upf-utils/with-install/index";
|
|
2
|
+
import { defineComponent as Ee, useCssVars as Be, ref as u, watch as ce, computed as a, useAttrs as Re, onBeforeUnmount as qe, openBlock as k, createElementBlock as V, normalizeClass as Ve, unref as d, normalizeStyle as he, createVNode as F, withCtx as y, withDirectives as Ne, createBlock as fe, mergeProps as Ie, createSlots as vt, renderSlot as L, normalizeProps as Ke, guardReactiveProps as He, createElementVNode as Q, toDisplayString as oe, Fragment as De, createCommentVNode as x, nextTick as Te, createTextVNode as ot, renderList as lt, withModifiers as ft } from "vue";
|
|
3
|
+
import { ConfigProvider as Ue, DatePicker as pt, RangePicker as mt, Dropdown as ht, Menu as yt, MenuItem as kt, TimePicker as bt, TimeRangePicker as gt } from "ant-design-vue";
|
|
4
|
+
import { DasAutoRegisterIcon as rt, DasIcon as Se } from "@das-fed/upf-ui/packages/components/icon/index";
|
|
5
|
+
import { DasTooltip as Xe } from "@das-fed/upf-ui/packages/components/tooltip/index";
|
|
6
|
+
import { DasErrorOverlayModel as Oe } from "@das-fed/upf-ui/packages/components/error-overlay-model/index";
|
|
7
|
+
import { useModelValue as ye } from "@das-fed/upf-utils/vue";
|
|
8
|
+
import { vHoverInside as We } from "@das-fed/upf-utils/directive/hoverInside/index";
|
|
9
|
+
import { useZIndex as Ge } from "@das-fed/upf-utils/hooks/popup-manager/use-zindex";
|
|
10
|
+
import { currentLang as Y, loadLocale as Je, t as $e, setI18nRule as Tt } from "@das-fed/upf-web/packages/i18n/index";
|
|
11
|
+
import { calcTextWidth as Qe } from "@das-fed/upf-utils/common-tools";
|
|
12
|
+
import { isTimeZonePickerModeEnabled as P, getTimeZoneDayjs as Le, resolvePickerTimeZone as Pe, toTimeZonePickerValue as Fe, fromTimeZonePickerValue as _e } from "@das-fed/upf-utils/common-tools/timezone-format";
|
|
13
13
|
import "ant-design-vue/es/date-picker/style/css";
|
|
14
14
|
import "ant-design-vue/es/config-provider/style/css";
|
|
15
|
-
import
|
|
16
|
-
import
|
|
15
|
+
import Me from "dayjs";
|
|
16
|
+
import { DasDatePicker as nt } from "@das-fed/upf-ui/packages/components/date-picker/index";
|
|
17
17
|
import "ant-design-vue/es/dropdown/style/css";
|
|
18
18
|
import "ant-design-vue/es/menu/style/css";
|
|
19
|
-
import { DasIconDengdai as
|
|
19
|
+
import { DasIconDengdai as wt } from "@das-fed/upf-ui/packages/icons/dengdai/index";
|
|
20
20
|
import "ant-design-vue/es/time-picker/style/css"
|
|
21
21
|
import '@das-fed/upf-ui/packages/components/date-picker/style.css';
|
|
22
22
|
;
|
|
23
|
-
const
|
|
23
|
+
const ut = {
|
|
24
24
|
now: ".ant-picker-now-btn",
|
|
25
25
|
today: ".ant-picker-today-btn"
|
|
26
|
-
},
|
|
27
|
-
const
|
|
28
|
-
return
|
|
29
|
-
},
|
|
30
|
-
if (!
|
|
31
|
-
const
|
|
32
|
-
return
|
|
33
|
-
},
|
|
34
|
-
const e =
|
|
35
|
-
return !e || !Array.isArray(
|
|
36
|
-
},
|
|
26
|
+
}, et = (r) => {
|
|
27
|
+
const S = r.target;
|
|
28
|
+
return S instanceof Element ? S.closest(ut.now) ? "now" : S.closest(ut.today) ? "today" : "" : "";
|
|
29
|
+
}, it = (r, S) => {
|
|
30
|
+
if (!S || !P(r)) return null;
|
|
31
|
+
const l = Le()().tz(Pe(r));
|
|
32
|
+
return S === "today" ? l.startOf("day") : l;
|
|
33
|
+
}, st = (r, S, l) => it(S, l) || r, dt = (r, S, l) => {
|
|
34
|
+
const e = it(S, l);
|
|
35
|
+
return !e || !Array.isArray(r) ? r : r.map((b) => b && e);
|
|
36
|
+
}, Ce = (r, S, l) => typeof document > "u" ? !1 : S && !l ? (document.addEventListener("click", r, !0), !0) : !S && l ? (document.removeEventListener("click", r, !0), !1) : l, Zt = {
|
|
37
37
|
key: 0,
|
|
38
38
|
class: "das-date-picker-error-label-content"
|
|
39
|
-
},
|
|
39
|
+
}, St = {
|
|
40
40
|
name: "DasDatePicker"
|
|
41
|
-
},
|
|
42
|
-
...
|
|
41
|
+
}, Ct = /* @__PURE__ */ Ee({
|
|
42
|
+
...St,
|
|
43
43
|
props: {
|
|
44
44
|
timeZoneMode: {},
|
|
45
45
|
timeZone: {},
|
|
@@ -50,6 +50,9 @@ const Ye = {
|
|
|
50
50
|
size: { default: "middle" },
|
|
51
51
|
width: { default: "230px" },
|
|
52
52
|
height: {},
|
|
53
|
+
format: {},
|
|
54
|
+
valueFormat: {},
|
|
55
|
+
showTime: {},
|
|
53
56
|
showToday: { type: Boolean, default: !1 },
|
|
54
57
|
disabled: { type: Boolean, default: !1 },
|
|
55
58
|
isView: { type: Boolean, default: !1 },
|
|
@@ -65,220 +68,264 @@ const Ye = {
|
|
|
65
68
|
formSize: {}
|
|
66
69
|
},
|
|
67
70
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
68
|
-
setup(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
setup(r, { expose: S, emit: l }) {
|
|
72
|
+
Be((t) => ({
|
|
73
|
+
v6aec5fd8: O.value,
|
|
74
|
+
v4e5ebd56: we.value
|
|
72
75
|
}));
|
|
73
|
-
const e =
|
|
74
|
-
|
|
76
|
+
const e = r, b = l;
|
|
77
|
+
rt({
|
|
75
78
|
right: import("@das-fed/upf-ui/packages/icons/right"),
|
|
76
79
|
left: import("@das-fed/upf-ui/packages/icons/left"),
|
|
77
80
|
"double-arrow-left": import("@das-fed/upf-ui/packages/icons/double-arrow-left"),
|
|
78
81
|
"double-arrow-right": import("@das-fed/upf-ui/packages/icons/double-arrow-right"),
|
|
79
82
|
riqixuanze: import("@das-fed/upf-ui/packages/icons/riqixuanze")
|
|
80
83
|
});
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
const j = u(void 0);
|
|
85
|
+
ce(Y, async () => {
|
|
86
|
+
j.value = await Je(Y.value);
|
|
84
87
|
}, { immediate: !0 });
|
|
85
|
-
const
|
|
88
|
+
const A = a(() => `date-picker-${Y.value}`), f = u(null), G = u(null), p = u(""), M = u(!1), Z = Re(), E = a(() => e.size === "table" || e.size === "middle" || e.size === "default" ? "middle" : e.size), q = ye(e, "modelValue"), J = ye(e, "error"), w = a(() => String(Z.picker ?? "date")), N = a(() => e.format ?? Z.format), I = a(() => e.showTime ?? Z.showTime ?? Z["show-time"]), K = a(() => e.valueFormat ?? Z.valueFormat ?? Z["value-format"]), R = a(() => ({
|
|
86
89
|
timeZoneMode: e.timeZoneMode,
|
|
87
90
|
timeZone: e.timeZone,
|
|
88
91
|
useClientTimeZone: e.useClientTimeZone,
|
|
89
|
-
timeZoneValueFormat
|
|
90
|
-
|
|
92
|
+
// timeZoneValueFormat 是最高优先级;未传时兼容旧业务继续使用 valueFormat 控制输出。
|
|
93
|
+
timeZoneValueFormat: e.timeZoneValueFormat ?? K.value
|
|
94
|
+
})), H = a(() => P(R.value)), pe = a(() => {
|
|
95
|
+
if (!H.value) return Z;
|
|
96
|
+
const { valueFormat: t, "value-format": i, ...s } = Z;
|
|
97
|
+
return s;
|
|
98
|
+
}), _ = a(() => Fe(q.value, R.value)), le = a(() => H.value ? void 0 : K.value), ne = a(() => H.value ? "das-ui-time-zone-picker-dropdown" : ""), ue = a(() => !I.value), ee = a(() => H.value ? Le()().tz(Pe(R.value)).format("YYYY-MM-DD") : ""), h = (t) => {
|
|
99
|
+
var i;
|
|
100
|
+
return Array.isArray(t) ? t.map(h) : t != null && t.format ? {
|
|
101
|
+
text: t.format("YYYY-MM-DD HH:mm:ss.SSS Z"),
|
|
102
|
+
iso: (i = t.toISOString) == null ? void 0 : i.call(t),
|
|
103
|
+
isDayjs: !0
|
|
104
|
+
} : t;
|
|
105
|
+
}, m = (t, i = {}) => {
|
|
106
|
+
typeof window > "u" || window.__UPF_DATE_PICKER_TZ_DEBUG__;
|
|
107
|
+
}, B = (t, i) => {
|
|
108
|
+
if (!ue.value || !H.value) return t;
|
|
109
|
+
if (w.value === "date" && typeof i == "string" && i)
|
|
110
|
+
return Le()(i).tz(Pe(R.value), !0);
|
|
111
|
+
if (Me.isDayjs(t)) return t.startOf("day");
|
|
112
|
+
if (t == null || t === "") return t;
|
|
113
|
+
const s = Me(t);
|
|
114
|
+
return s.isValid() ? s.startOf("day") : t;
|
|
115
|
+
}, ie = (t) => {
|
|
116
|
+
var i;
|
|
117
|
+
return !ee.value || !((i = t == null ? void 0 : t.isValid) != null && i.call(t)) ? !1 : t.format("YYYY-MM-DD") === ee.value;
|
|
118
|
+
}, ve = a(() => e.isView ? e.noSetDefaultVal ? "" : "-" : e.placeholder || $e("请选择日期")), C = a(() => ({
|
|
91
119
|
width: e.width
|
|
92
|
-
})),
|
|
120
|
+
})), O = a(() => e.width ? e.width : "230px"), se = a(() => e.formSize), we = a(() => e.height ? e.height : se.value ? {
|
|
93
121
|
small: "24px",
|
|
94
122
|
default: "32px",
|
|
95
123
|
large: "40px"
|
|
96
|
-
}[
|
|
97
|
-
"z-index":
|
|
98
|
-
})),
|
|
124
|
+
}[se.value] : "auto"), U = u(3e3), Ze = a(() => ({
|
|
125
|
+
"z-index": U.value
|
|
126
|
+
})), $ = u(!1), de = u({
|
|
99
127
|
display: "block",
|
|
100
128
|
color: "var(--upf-color-error)",
|
|
101
129
|
"white-space": "break-spaces"
|
|
102
|
-
}),
|
|
103
|
-
const
|
|
104
|
-
return
|
|
105
|
-
},
|
|
106
|
-
var
|
|
107
|
-
const
|
|
108
|
-
return
|
|
109
|
-
},
|
|
110
|
-
var
|
|
111
|
-
const
|
|
112
|
-
return
|
|
113
|
-
}, X =
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
X.value =
|
|
130
|
+
}), z = u(!1), D = u(""), ke = a(() => _.value ? D.value : ve.value), xe = () => {
|
|
131
|
+
const t = e.size === "table" ? 12 : 14;
|
|
132
|
+
return Qe(ve.value, t);
|
|
133
|
+
}, be = () => {
|
|
134
|
+
var i;
|
|
135
|
+
const t = (i = f.value) == null ? void 0 : i.$el.querySelector(".ant-picker-input>input");
|
|
136
|
+
return _.value ? t == null ? void 0 : t.scrollWidth : xe();
|
|
137
|
+
}, ze = () => {
|
|
138
|
+
var s;
|
|
139
|
+
const t = (s = f.value) == null ? void 0 : s.$el.querySelector(".ant-picker-input>input");
|
|
140
|
+
return t ? (D.value = t.getAttribute("value"), t.removeAttribute("title"), (t == null ? void 0 : t.offsetWidth) ?? 0) : 0;
|
|
141
|
+
}, X = u(0), me = u(0);
|
|
142
|
+
ce(() => [ve.value, _.value], () => {
|
|
143
|
+
Te(() => {
|
|
144
|
+
X.value = ze(), me.value = be(), (X.value === me.value || me.value - X.value < 1) && (z.value = !1);
|
|
117
145
|
});
|
|
118
146
|
});
|
|
119
|
-
const
|
|
120
|
-
|
|
147
|
+
const n = u();
|
|
148
|
+
ce(
|
|
121
149
|
() => {
|
|
122
|
-
var
|
|
123
|
-
return (
|
|
150
|
+
var t;
|
|
151
|
+
return (t = G.value) == null ? void 0 : t.$tooltipRef.popperRef.contentRef;
|
|
124
152
|
},
|
|
125
|
-
(
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}),
|
|
129
|
-
|
|
130
|
-
|
|
153
|
+
(t) => {
|
|
154
|
+
t && (t.addEventListener("mouseenter", function() {
|
|
155
|
+
z.value = !0, n.value && clearTimeout(n.value);
|
|
156
|
+
}), t.addEventListener("mouseleave", function() {
|
|
157
|
+
n.value = setTimeout(() => {
|
|
158
|
+
z.value = !1;
|
|
131
159
|
}, 200);
|
|
132
160
|
}));
|
|
133
161
|
}
|
|
134
162
|
);
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
const
|
|
138
|
-
for (let
|
|
139
|
-
|
|
163
|
+
const c = (t) => {
|
|
164
|
+
t && (U.value = Ge().nextZIndex()), t ? W() : te(), b("openChange", t), Y.value === "en-US" && Te(() => {
|
|
165
|
+
const i = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
166
|
+
for (let s of i)
|
|
167
|
+
s && (s.innerText = "OK");
|
|
140
168
|
});
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
169
|
+
}, g = (t) => {
|
|
170
|
+
P(R.value) && (p.value = et(t));
|
|
171
|
+
}, W = () => {
|
|
172
|
+
p.value = "", M.value = Ce(
|
|
173
|
+
g,
|
|
174
|
+
P(R.value),
|
|
175
|
+
M.value
|
|
148
176
|
);
|
|
149
|
-
},
|
|
150
|
-
|
|
177
|
+
}, te = () => {
|
|
178
|
+
M.value = Ce(g, !1, M.value);
|
|
151
179
|
};
|
|
152
|
-
|
|
153
|
-
|
|
180
|
+
qe(() => {
|
|
181
|
+
te(), p.value = "";
|
|
154
182
|
});
|
|
155
|
-
const
|
|
156
|
-
X.value =
|
|
157
|
-
},
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}, 200),
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
},
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
|
|
183
|
+
const re = () => {
|
|
184
|
+
X.value = ze(), me.value = be(), X.value === me.value || me.value - X.value < 1 ? z.value = !1 : (z.value = !0, n.value && clearTimeout(n.value)), $.value = !0;
|
|
185
|
+
}, tt = () => {
|
|
186
|
+
n.value = setTimeout(() => {
|
|
187
|
+
z.value = !1;
|
|
188
|
+
}, 200), $.value = !1;
|
|
189
|
+
}, je = (t, i) => {
|
|
190
|
+
t ? re() : tt();
|
|
191
|
+
}, at = (t, i) => {
|
|
192
|
+
J.value = !1, b("update:error", J.value);
|
|
193
|
+
const s = st(t, R.value, p.value);
|
|
194
|
+
p.value = "";
|
|
195
|
+
const T = B(s, i);
|
|
196
|
+
m("change:before-format", {
|
|
197
|
+
rawDateType: typeof t,
|
|
198
|
+
rawDateIsDayjs: Me.isDayjs(t),
|
|
199
|
+
rawDate: h(t),
|
|
200
|
+
rawDateString: i,
|
|
201
|
+
shortcutDateType: typeof s,
|
|
202
|
+
shortcutDateIsDayjs: Me.isDayjs(s),
|
|
203
|
+
shortcutDate: h(s),
|
|
204
|
+
normalizedDate: h(T)
|
|
205
|
+
});
|
|
206
|
+
const ae = H.value ? _e(T, R.value) : T, ge = H.value && ae != null ? String(ae) : i;
|
|
207
|
+
m("change:emit", {
|
|
208
|
+
nextValue: h(ae),
|
|
209
|
+
nextDateString: ge
|
|
210
|
+
}), b("update:model-value", ae), b("change", ae, ge);
|
|
169
211
|
};
|
|
170
|
-
return
|
|
171
|
-
$datePicker:
|
|
212
|
+
return S({
|
|
213
|
+
$datePicker: f,
|
|
172
214
|
blur: () => {
|
|
173
|
-
|
|
215
|
+
f.value.blur();
|
|
174
216
|
},
|
|
175
217
|
focus: () => {
|
|
176
|
-
|
|
218
|
+
f.value.focus();
|
|
177
219
|
}
|
|
178
|
-
}), (
|
|
220
|
+
}), (t, i) => (k(), V(
|
|
179
221
|
"div",
|
|
180
222
|
{
|
|
181
|
-
class:
|
|
182
|
-
style:
|
|
223
|
+
class: Ve(["das-ui-date-picker", [r.borderType, e.isView ? "readonly" : "", d(J) ? "is-error" : ""]]),
|
|
224
|
+
style: he(C.value)
|
|
183
225
|
},
|
|
184
226
|
[
|
|
185
|
-
|
|
186
|
-
default:
|
|
187
|
-
|
|
227
|
+
F(d(Ue), { locale: j.value }, {
|
|
228
|
+
default: y(() => [
|
|
229
|
+
F(d(Xe), {
|
|
188
230
|
ref_key: "inputTooltipRef",
|
|
189
|
-
ref:
|
|
231
|
+
ref: G,
|
|
190
232
|
placement: "top",
|
|
191
233
|
trigger: "hover",
|
|
192
|
-
visible:
|
|
193
|
-
disabled: !
|
|
194
|
-
content:
|
|
234
|
+
visible: z.value,
|
|
235
|
+
disabled: !r.isTooltip,
|
|
236
|
+
content: ke.value
|
|
195
237
|
}, {
|
|
196
|
-
default:
|
|
197
|
-
var
|
|
238
|
+
default: y(() => {
|
|
239
|
+
var s;
|
|
198
240
|
return [
|
|
199
|
-
|
|
200
|
-
key:
|
|
241
|
+
Ne((k(), fe(d(pt), Ie({
|
|
242
|
+
key: A.value,
|
|
201
243
|
ref_key: "$datePicker",
|
|
202
|
-
ref:
|
|
203
|
-
},
|
|
204
|
-
value:
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
244
|
+
ref: f
|
|
245
|
+
}, pe.value, {
|
|
246
|
+
value: _.value,
|
|
247
|
+
format: N.value,
|
|
248
|
+
valueFormat: le.value,
|
|
249
|
+
size: E.value,
|
|
250
|
+
locale: (s = j.value) == null ? void 0 : s.DatePicker,
|
|
251
|
+
dropdownClassName: "das-ui-date-picker-dropdown " + ne.value + " " + r.dropdownClassName,
|
|
252
|
+
placeholder: ve.value,
|
|
253
|
+
showToday: r.showToday,
|
|
254
|
+
showTime: I.value,
|
|
255
|
+
bordered: r.borderType === "bordered",
|
|
212
256
|
disabled: e.disabled || e.isView,
|
|
213
|
-
style:
|
|
214
|
-
popupStyle:
|
|
215
|
-
onChange:
|
|
216
|
-
onOpenChange:
|
|
217
|
-
}),
|
|
218
|
-
dateRender:
|
|
219
|
-
L(
|
|
220
|
-
|
|
257
|
+
style: C.value,
|
|
258
|
+
popupStyle: Ze.value,
|
|
259
|
+
onChange: at,
|
|
260
|
+
onOpenChange: c
|
|
261
|
+
}), vt({
|
|
262
|
+
dateRender: y((T) => [
|
|
263
|
+
L(t.$slots, "dateRender", Ke(He(T)), () => [
|
|
264
|
+
Q(
|
|
221
265
|
"div",
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
266
|
+
{
|
|
267
|
+
class: Ve(["ant-picker-cell-inner", { "das-time-zone-picker-cell-today": ie(T.current) }])
|
|
268
|
+
},
|
|
269
|
+
oe(T.current.date()),
|
|
270
|
+
3
|
|
271
|
+
/* TEXT, CLASS */
|
|
226
272
|
)
|
|
227
273
|
], !0)
|
|
228
274
|
]),
|
|
229
|
-
nextIcon:
|
|
230
|
-
L(
|
|
231
|
-
|
|
275
|
+
nextIcon: y(() => [
|
|
276
|
+
L(t.$slots, "nextIcon", {}, () => [
|
|
277
|
+
F(d(Se), {
|
|
232
278
|
icon: "right",
|
|
233
279
|
size: "medium"
|
|
234
280
|
})
|
|
235
281
|
], !0)
|
|
236
282
|
]),
|
|
237
|
-
prevIcon:
|
|
238
|
-
L(
|
|
239
|
-
|
|
283
|
+
prevIcon: y(() => [
|
|
284
|
+
L(t.$slots, "prevIcon", {}, () => [
|
|
285
|
+
F(d(Se), {
|
|
240
286
|
icon: "left",
|
|
241
287
|
size: "medium"
|
|
242
288
|
})
|
|
243
289
|
], !0)
|
|
244
290
|
]),
|
|
245
|
-
superNextIcon:
|
|
246
|
-
L(
|
|
247
|
-
|
|
291
|
+
superNextIcon: y(() => [
|
|
292
|
+
L(t.$slots, "superNextIcon", {}, () => [
|
|
293
|
+
F(d(Se), {
|
|
248
294
|
icon: "double-arrow-right",
|
|
249
295
|
size: "medium"
|
|
250
296
|
})
|
|
251
297
|
], !0)
|
|
252
298
|
]),
|
|
253
|
-
superPrevIcon:
|
|
254
|
-
L(
|
|
255
|
-
|
|
299
|
+
superPrevIcon: y(() => [
|
|
300
|
+
L(t.$slots, "superPrevIcon", {}, () => [
|
|
301
|
+
F(d(Se), {
|
|
256
302
|
icon: "double-arrow-left",
|
|
257
303
|
size: "medium"
|
|
258
304
|
})
|
|
259
305
|
], !0)
|
|
260
306
|
]),
|
|
261
|
-
suffixIcon:
|
|
262
|
-
L(
|
|
263
|
-
|
|
307
|
+
suffixIcon: y(() => [
|
|
308
|
+
L(t.$slots, "suffixIcon", {}, () => [
|
|
309
|
+
F(d(Se), {
|
|
264
310
|
class: "das-suffix-icon",
|
|
265
311
|
icon: "riqixuanze",
|
|
266
|
-
size: "medium"
|
|
312
|
+
size: "medium",
|
|
313
|
+
"icon-color": "#666666"
|
|
267
314
|
})
|
|
268
315
|
], !0)
|
|
269
316
|
]),
|
|
270
317
|
_: 2
|
|
271
318
|
/* DYNAMIC */
|
|
272
319
|
}, [
|
|
273
|
-
|
|
320
|
+
t.$slots.renderExtraFooter ? {
|
|
274
321
|
name: "renderExtraFooter",
|
|
275
|
-
fn:
|
|
276
|
-
L(
|
|
322
|
+
fn: y(() => [
|
|
323
|
+
L(t.$slots, "renderExtraFooter", {}, void 0, !0)
|
|
277
324
|
]),
|
|
278
325
|
key: "0"
|
|
279
326
|
} : void 0
|
|
280
|
-
]), 1040, ["value", "valueFormat", "size", "locale", "dropdownClassName", "placeholder", "showToday", "bordered", "disabled", "style", "popupStyle"])), [
|
|
281
|
-
[
|
|
327
|
+
]), 1040, ["value", "format", "valueFormat", "size", "locale", "dropdownClassName", "placeholder", "showToday", "showTime", "bordered", "disabled", "style", "popupStyle"])), [
|
|
328
|
+
[d(We), je]
|
|
282
329
|
])
|
|
283
330
|
];
|
|
284
331
|
}),
|
|
@@ -289,51 +336,51 @@ const Ye = {
|
|
|
289
336
|
_: 3
|
|
290
337
|
/* FORWARDED */
|
|
291
338
|
}, 8, ["locale"]),
|
|
292
|
-
|
|
293
|
-
|
|
339
|
+
r.error && r.errorLabel ? (k(), V(
|
|
340
|
+
De,
|
|
294
341
|
{ key: 0 },
|
|
295
342
|
[
|
|
296
|
-
|
|
297
|
-
|
|
343
|
+
r.errorMode === "default" ? (k(), V("div", Zt, [
|
|
344
|
+
Q(
|
|
298
345
|
"span",
|
|
299
346
|
{
|
|
300
|
-
style:
|
|
347
|
+
style: he(de.value)
|
|
301
348
|
},
|
|
302
|
-
|
|
349
|
+
oe(r.errorLabel),
|
|
303
350
|
5
|
|
304
351
|
/* TEXT, STYLE */
|
|
305
352
|
)
|
|
306
|
-
])) :
|
|
307
|
-
|
|
353
|
+
])) : x("v-if", !0),
|
|
354
|
+
r.errorMode === "overlay" && $.value ? (k(), fe(d(Oe), {
|
|
308
355
|
key: 1,
|
|
309
|
-
errorLabel:
|
|
356
|
+
errorLabel: r.errorLabel,
|
|
310
357
|
getEl: () => {
|
|
311
|
-
var
|
|
312
|
-
return (
|
|
358
|
+
var s;
|
|
359
|
+
return (s = f.value) == null ? void 0 : s.$el;
|
|
313
360
|
},
|
|
314
|
-
errorModelZIndex:
|
|
315
|
-
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) :
|
|
361
|
+
errorModelZIndex: r.errorModelZIndex
|
|
362
|
+
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : x("v-if", !0)
|
|
316
363
|
],
|
|
317
364
|
64
|
|
318
365
|
/* STABLE_FRAGMENT */
|
|
319
|
-
)) :
|
|
366
|
+
)) : x("v-if", !0)
|
|
320
367
|
],
|
|
321
368
|
6
|
|
322
369
|
/* CLASS, STYLE */
|
|
323
370
|
));
|
|
324
371
|
}
|
|
325
|
-
}),
|
|
326
|
-
const
|
|
327
|
-
for (const [e,
|
|
328
|
-
|
|
329
|
-
return
|
|
330
|
-
},
|
|
372
|
+
}), Ye = (r, S) => {
|
|
373
|
+
const l = r.__vccOpts || r;
|
|
374
|
+
for (const [e, b] of S)
|
|
375
|
+
l[e] = b;
|
|
376
|
+
return l;
|
|
377
|
+
}, xt = /* @__PURE__ */ Ye(Ct, [["__scopeId", "data-v-e5f3f0c4"]]), zt = { class: "date-range-separator" }, Dt = {
|
|
331
378
|
key: 0,
|
|
332
379
|
class: "das-date-picker-error-label-content"
|
|
333
|
-
},
|
|
380
|
+
}, Mt = {
|
|
334
381
|
name: "DasDateRangePicker"
|
|
335
|
-
},
|
|
336
|
-
...
|
|
382
|
+
}, Vt = /* @__PURE__ */ Ee({
|
|
383
|
+
...Mt,
|
|
337
384
|
props: {
|
|
338
385
|
timeZoneMode: {},
|
|
339
386
|
timeZone: {},
|
|
@@ -363,145 +410,146 @@ const Ye = {
|
|
|
363
410
|
formSize: {}
|
|
364
411
|
},
|
|
365
412
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
366
|
-
setup(
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
413
|
+
setup(r, { emit: S }) {
|
|
414
|
+
Be((h) => ({
|
|
415
|
+
v1347d54f: Z.value,
|
|
416
|
+
v91bc76c4: M.value
|
|
370
417
|
}));
|
|
371
|
-
const
|
|
372
|
-
timeZoneMode:
|
|
373
|
-
timeZone:
|
|
374
|
-
useClientTimeZone:
|
|
375
|
-
timeZoneValueFormat
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
418
|
+
const l = r, e = S, b = Re(), j = a(() => l.placeholder ?? [$e("开始日期"), $e("结束日期")]), A = ye(l, "modelValue"), f = ye(l, "error"), G = a(() => ({
|
|
419
|
+
timeZoneMode: l.timeZoneMode,
|
|
420
|
+
timeZone: l.timeZone,
|
|
421
|
+
useClientTimeZone: l.useClientTimeZone,
|
|
422
|
+
// 与内部 DatePicker 保持同一优先级:timeZoneValueFormat 优先,未传回退 valueFormat。
|
|
423
|
+
timeZoneValueFormat: l.timeZoneValueFormat ?? l.valueFormat
|
|
424
|
+
})), p = a(() => {
|
|
425
|
+
var h, m;
|
|
426
|
+
return P(G.value) ? [
|
|
427
|
+
Fe((h = A.value) == null ? void 0 : h[0], G.value),
|
|
428
|
+
Fe((m = A.value) == null ? void 0 : m[1], G.value)
|
|
429
|
+
] : A.value;
|
|
430
|
+
}), M = a(() => l.width ? l.width : "230px"), Z = a(() => l.height ? l.height : "auto"), E = a(() => ({ ...b, ...l.prevAttrs })), q = a(() => ({ ...b, ...l.nextAttrs })), J = u(), w = u(!1), N = u({
|
|
383
431
|
display: "block",
|
|
384
432
|
color: "var(--upf-color-error)",
|
|
385
433
|
"white-space": "break-spaces"
|
|
386
|
-
}),
|
|
387
|
-
|
|
388
|
-
},
|
|
389
|
-
|
|
390
|
-
},
|
|
391
|
-
|
|
392
|
-
},
|
|
393
|
-
e("openChange",
|
|
394
|
-
const
|
|
395
|
-
for (let
|
|
396
|
-
|
|
434
|
+
}), I = () => {
|
|
435
|
+
w.value = !0;
|
|
436
|
+
}, K = () => {
|
|
437
|
+
w.value = !1;
|
|
438
|
+
}, R = (h, m) => {
|
|
439
|
+
h ? I() : K();
|
|
440
|
+
}, H = (h, m) => {
|
|
441
|
+
e("openChange", h, m), Y.value === "en-US" && Te(() => {
|
|
442
|
+
const B = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
443
|
+
for (let ie of B)
|
|
444
|
+
ie && (ie.innerText = "OK");
|
|
397
445
|
});
|
|
398
|
-
},
|
|
399
|
-
let
|
|
446
|
+
}, pe = a(() => {
|
|
447
|
+
let h = l.valueFormat ? l.valueFormat : l.format;
|
|
400
448
|
return [
|
|
401
|
-
|
|
402
|
-
|
|
449
|
+
p.value[0] ? Me.isDayjs(p.value[0]) ? p.value[0].format(h) : p.value[0] : "",
|
|
450
|
+
p.value[1] ? Me.isDayjs(p.value[1]) ? p.value[1].format(h) : p.value[1] : ""
|
|
403
451
|
];
|
|
404
|
-
}),
|
|
405
|
-
width:
|
|
406
|
-
})),
|
|
407
|
-
|
|
408
|
-
},
|
|
409
|
-
|
|
452
|
+
}), _ = (h) => l.disabledDate && l.disabledDate(h) === !0 ? !0 : !!(p.value[1] && h.isAfter(p.value[1], l.disabledUnit || void 0)), le = (h) => l.disabledDate && l.disabledDate(h) === !0 ? !0 : !!(p.value[0] && h.isBefore(p.value[0], l.disabledUnit || void 0)), ne = a(() => ({
|
|
453
|
+
width: l.width
|
|
454
|
+
})), ue = (h, m) => {
|
|
455
|
+
f.value = !1, e("update:model-value", A.value), e("change", A.value, pe.value);
|
|
456
|
+
}, ee = (h, m) => {
|
|
457
|
+
f.value = !1, e("update:model-value", A.value), e("change", A.value, pe.value);
|
|
410
458
|
};
|
|
411
|
-
return (
|
|
459
|
+
return (h, m) => Ne((k(), V(
|
|
412
460
|
"div",
|
|
413
461
|
{
|
|
414
462
|
class: "das-ui-date-range-picker",
|
|
415
|
-
style:
|
|
463
|
+
style: he(ne.value),
|
|
416
464
|
ref_key: "$dateRange",
|
|
417
|
-
ref:
|
|
465
|
+
ref: J
|
|
418
466
|
},
|
|
419
467
|
[
|
|
420
|
-
|
|
421
|
-
modelValue:
|
|
422
|
-
"onUpdate:modelValue":
|
|
423
|
-
size:
|
|
424
|
-
valueFormat:
|
|
425
|
-
timeZoneMode:
|
|
426
|
-
timeZone:
|
|
427
|
-
useClientTimeZone:
|
|
428
|
-
timeZoneValueFormat:
|
|
429
|
-
borderType:
|
|
430
|
-
error:
|
|
431
|
-
width:
|
|
432
|
-
"disabled-date":
|
|
433
|
-
placeholder:
|
|
434
|
-
onChange:
|
|
435
|
-
onOpenChange:
|
|
468
|
+
F(d(nt), Ie(E.value, {
|
|
469
|
+
modelValue: d(A)[0],
|
|
470
|
+
"onUpdate:modelValue": m[0] || (m[0] = (B) => d(A)[0] = B),
|
|
471
|
+
size: l.size,
|
|
472
|
+
valueFormat: l.valueFormat,
|
|
473
|
+
timeZoneMode: l.timeZoneMode,
|
|
474
|
+
timeZone: l.timeZone,
|
|
475
|
+
useClientTimeZone: l.useClientTimeZone,
|
|
476
|
+
timeZoneValueFormat: l.timeZoneValueFormat,
|
|
477
|
+
borderType: l.borderType,
|
|
478
|
+
error: d(f),
|
|
479
|
+
width: l.itemWidth,
|
|
480
|
+
"disabled-date": _,
|
|
481
|
+
placeholder: j.value[0],
|
|
482
|
+
onChange: ue,
|
|
483
|
+
onOpenChange: m[1] || (m[1] = (B) => H(B, "before"))
|
|
436
484
|
}), null, 16, ["modelValue", "size", "valueFormat", "timeZoneMode", "timeZone", "useClientTimeZone", "timeZoneValueFormat", "borderType", "error", "width", "placeholder"]),
|
|
437
|
-
L(
|
|
438
|
-
|
|
485
|
+
L(h.$slots, "separator", {}, () => [
|
|
486
|
+
Q(
|
|
439
487
|
"span",
|
|
440
|
-
|
|
441
|
-
|
|
488
|
+
zt,
|
|
489
|
+
oe(l.separator),
|
|
442
490
|
1
|
|
443
491
|
/* TEXT */
|
|
444
492
|
)
|
|
445
493
|
], !0),
|
|
446
|
-
|
|
447
|
-
modelValue:
|
|
448
|
-
"onUpdate:modelValue":
|
|
449
|
-
size:
|
|
450
|
-
valueFormat:
|
|
451
|
-
timeZoneMode:
|
|
452
|
-
timeZone:
|
|
453
|
-
useClientTimeZone:
|
|
454
|
-
timeZoneValueFormat:
|
|
455
|
-
borderType:
|
|
456
|
-
error:
|
|
457
|
-
width:
|
|
458
|
-
"disabled-date":
|
|
459
|
-
placeholder:
|
|
460
|
-
onChange:
|
|
461
|
-
onOpenChange:
|
|
494
|
+
F(d(nt), Ie(q.value, {
|
|
495
|
+
modelValue: d(A)[1],
|
|
496
|
+
"onUpdate:modelValue": m[2] || (m[2] = (B) => d(A)[1] = B),
|
|
497
|
+
size: l.size,
|
|
498
|
+
valueFormat: l.valueFormat,
|
|
499
|
+
timeZoneMode: l.timeZoneMode,
|
|
500
|
+
timeZone: l.timeZone,
|
|
501
|
+
useClientTimeZone: l.useClientTimeZone,
|
|
502
|
+
timeZoneValueFormat: l.timeZoneValueFormat,
|
|
503
|
+
borderType: l.borderType,
|
|
504
|
+
error: d(f),
|
|
505
|
+
width: l.itemWidth,
|
|
506
|
+
"disabled-date": le,
|
|
507
|
+
placeholder: j.value[1],
|
|
508
|
+
onChange: ee,
|
|
509
|
+
onOpenChange: m[3] || (m[3] = (B) => H(B, "after"))
|
|
462
510
|
}), null, 16, ["modelValue", "size", "valueFormat", "timeZoneMode", "timeZone", "useClientTimeZone", "timeZoneValueFormat", "borderType", "error", "width", "placeholder"]),
|
|
463
|
-
|
|
464
|
-
|
|
511
|
+
r.error && r.errorLabel ? (k(), V(
|
|
512
|
+
De,
|
|
465
513
|
{ key: 0 },
|
|
466
514
|
[
|
|
467
|
-
|
|
468
|
-
|
|
515
|
+
r.errorMode === "default" ? (k(), V("div", Dt, [
|
|
516
|
+
Q(
|
|
469
517
|
"span",
|
|
470
518
|
{
|
|
471
|
-
style:
|
|
519
|
+
style: he(N.value)
|
|
472
520
|
},
|
|
473
|
-
|
|
521
|
+
oe(r.errorLabel),
|
|
474
522
|
5
|
|
475
523
|
/* TEXT, STYLE */
|
|
476
524
|
)
|
|
477
|
-
])) :
|
|
478
|
-
|
|
525
|
+
])) : x("v-if", !0),
|
|
526
|
+
r.errorMode === "overlay" && w.value ? (k(), fe(d(Oe), {
|
|
479
527
|
key: 1,
|
|
480
|
-
errorLabel:
|
|
481
|
-
getEl: () =>
|
|
482
|
-
errorModelZIndex:
|
|
483
|
-
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) :
|
|
528
|
+
errorLabel: r.errorLabel,
|
|
529
|
+
getEl: () => J.value,
|
|
530
|
+
errorModelZIndex: r.errorModelZIndex
|
|
531
|
+
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : x("v-if", !0)
|
|
484
532
|
],
|
|
485
533
|
64
|
|
486
534
|
/* STABLE_FRAGMENT */
|
|
487
|
-
)) :
|
|
535
|
+
)) : x("v-if", !0)
|
|
488
536
|
],
|
|
489
537
|
4
|
|
490
538
|
/* STYLE */
|
|
491
539
|
)), [
|
|
492
|
-
[
|
|
540
|
+
[d(We), R]
|
|
493
541
|
]);
|
|
494
542
|
}
|
|
495
|
-
}),
|
|
543
|
+
}), It = /* @__PURE__ */ Ye(Vt, [["__scopeId", "data-v-85002b49"]]), $t = { class: "das-picker-footer-extra" }, Ft = {
|
|
496
544
|
key: 0,
|
|
497
545
|
class: "das-picker-ranges"
|
|
498
|
-
},
|
|
546
|
+
}, Lt = { class: "das-picker-preset-span" }, Pt = ["onClick"], At = {
|
|
499
547
|
key: 0,
|
|
500
548
|
class: "das-date-picker-error-label-content"
|
|
501
|
-
},
|
|
549
|
+
}, Et = {
|
|
502
550
|
name: "DasRangePicker"
|
|
503
|
-
},
|
|
504
|
-
...
|
|
551
|
+
}, Bt = /* @__PURE__ */ Ee({
|
|
552
|
+
...Et,
|
|
505
553
|
props: {
|
|
506
554
|
timeZoneMode: {},
|
|
507
555
|
timeZone: {},
|
|
@@ -531,229 +579,245 @@ const Ye = {
|
|
|
531
579
|
formSize: {}
|
|
532
580
|
},
|
|
533
581
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
534
|
-
setup(
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
582
|
+
setup(r, { expose: S, emit: l }) {
|
|
583
|
+
Be((o) => ({
|
|
584
|
+
ae2b9438: h.value,
|
|
585
|
+
v5a8d8cc9: B.value
|
|
538
586
|
}));
|
|
539
|
-
const e =
|
|
540
|
-
|
|
587
|
+
const e = r, b = l;
|
|
588
|
+
rt({
|
|
541
589
|
fold: import("@das-fed/upf-ui/packages/icons/fold"),
|
|
542
590
|
riqixuanze: import("@das-fed/upf-ui/packages/icons/riqixuanze")
|
|
543
591
|
});
|
|
544
|
-
const
|
|
545
|
-
|
|
546
|
-
|
|
592
|
+
const j = u(void 0);
|
|
593
|
+
ce(Y, async () => {
|
|
594
|
+
j.value = await Je(Y.value);
|
|
547
595
|
}, { immediate: !0 });
|
|
548
|
-
const
|
|
596
|
+
const A = a(() => `range-picker-${Y.value}`), f = u(null), G = u(null), p = u(""), M = u(!1), Z = Re(), E = a(() => e.size === "table" || e.size === "middle" || e.size === "default" ? "middle" : e.size), q = ye(e, "modelValue"), J = ye(e, "error"), w = a(() => e.valueFormat ?? Z.valueFormat ?? Z["value-format"]), N = a(() => ({
|
|
549
597
|
timeZoneMode: e.timeZoneMode,
|
|
550
598
|
timeZone: e.timeZone,
|
|
551
599
|
useClientTimeZone: e.useClientTimeZone,
|
|
552
|
-
timeZoneValueFormat
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
600
|
+
// timeZoneValueFormat 是最高优先级;未传时兼容旧业务继续使用 valueFormat 控制输出。
|
|
601
|
+
timeZoneValueFormat: e.timeZoneValueFormat ?? w.value
|
|
602
|
+
})), I = a(() => {
|
|
603
|
+
if (!(!Array.isArray(q.value) || q.value.length !== 2))
|
|
604
|
+
return P(N.value) ? q.value.map((o) => Fe(o, N.value)) : q.value;
|
|
605
|
+
}), K = a(() => P(N.value)), R = a(() => String(Z.picker ?? "date")), H = a(() => {
|
|
606
|
+
if (!K.value) return Z;
|
|
607
|
+
const { valueFormat: o, "value-format": t, ...i } = Z;
|
|
608
|
+
return i;
|
|
609
|
+
}), pe = a(() => K.value ? void 0 : w.value), _ = a(
|
|
610
|
+
() => K.value ? "das-ui-time-zone-picker-dropdown" : ""
|
|
611
|
+
), le = a(() => !e.showTime), ne = a(() => K.value ? Le()().tz(Pe(N.value)).format("YYYY-MM-DD") : ""), ue = (o) => {
|
|
612
|
+
var t;
|
|
613
|
+
return !ne.value || !((t = o == null ? void 0 : o.isValid) != null && t.call(o)) ? !1 : o.format("YYYY-MM-DD") === ne.value;
|
|
614
|
+
}, ee = (o, t) => !Array.isArray(o) || !le.value || !K.value ? o : R.value === "date" && Array.isArray(t) ? o.map((i, s) => {
|
|
615
|
+
const T = t[s];
|
|
616
|
+
return !i || !T ? i : Le()(T).tz(Pe(N.value), !0);
|
|
617
|
+
}) : o.map((i) => i != null && i.format ? i.startOf("day") : i), h = a(() => e.width ? e.width : "230px"), m = a(() => e.formSize), B = a(() => e.height ? e.height : m.value ? {
|
|
557
618
|
small: "24px",
|
|
558
619
|
default: "32px",
|
|
559
620
|
large: "40px"
|
|
560
|
-
}[
|
|
561
|
-
"z-index":
|
|
562
|
-
})),
|
|
621
|
+
}[m.value] : "auto"), ie = u(3e3), ve = a(() => ({
|
|
622
|
+
"z-index": ie.value
|
|
623
|
+
})), C = u(!1), O = u({
|
|
563
624
|
display: "block",
|
|
564
625
|
color: "var(--upf-color-error)",
|
|
565
626
|
"white-space": "break-spaces"
|
|
566
|
-
}),
|
|
567
|
-
var
|
|
568
|
-
return e.isView ? e.noSetDefaultVal ? ["", ""] : ["-", "-"] : (
|
|
569
|
-
}),
|
|
627
|
+
}), se = a(() => {
|
|
628
|
+
var o;
|
|
629
|
+
return e.isView ? e.noSetDefaultVal ? ["", ""] : ["-", "-"] : (o = e.placeholder) == null ? void 0 : o.map((t) => $e(t));
|
|
630
|
+
}), we = a(() => ({
|
|
570
631
|
width: e.width
|
|
571
|
-
})),
|
|
572
|
-
var
|
|
573
|
-
return (
|
|
574
|
-
}),
|
|
575
|
-
var
|
|
576
|
-
let
|
|
577
|
-
const
|
|
578
|
-
if (!
|
|
579
|
-
return
|
|
580
|
-
let
|
|
581
|
-
for (let
|
|
582
|
-
|
|
583
|
-
let ae = (
|
|
584
|
-
|
|
632
|
+
})), U = u(!1), Ze = u(["", ""]), $ = u("~"), de = a(() => {
|
|
633
|
+
var o;
|
|
634
|
+
return (o = I.value) != null && o.length && I.value[0] && I.value[1] ? Ze.value.join(" " + $.value + " ") : se.value.join(" " + $.value + " ");
|
|
635
|
+
}), z = u([0, 0]), D = u([0, 0]), ke = () => {
|
|
636
|
+
var s;
|
|
637
|
+
let o = [];
|
|
638
|
+
const t = (s = f.value) == null ? void 0 : s.$el.querySelectorAll(".ant-picker-input>input");
|
|
639
|
+
if (!t)
|
|
640
|
+
return o = [0, 0], o;
|
|
641
|
+
let i = [];
|
|
642
|
+
for (let T of t) {
|
|
643
|
+
i.push(T.getAttribute("value") || "");
|
|
644
|
+
let ae = (T == null ? void 0 : T.offsetWidth) ?? 0;
|
|
645
|
+
o.push(ae);
|
|
585
646
|
}
|
|
586
|
-
return
|
|
587
|
-
},
|
|
588
|
-
const
|
|
589
|
-
return
|
|
590
|
-
},
|
|
591
|
-
var
|
|
592
|
-
let
|
|
593
|
-
return ((
|
|
647
|
+
return Ze.value = i, o;
|
|
648
|
+
}, xe = (o) => {
|
|
649
|
+
const t = e.size === "table" ? 12 : 14;
|
|
650
|
+
return Qe(o, t);
|
|
651
|
+
}, be = () => {
|
|
652
|
+
var i;
|
|
653
|
+
let o = [];
|
|
654
|
+
return ((i = f.value) == null ? void 0 : i.$el.querySelectorAll(".ant-picker-input>input")).forEach((s, T) => {
|
|
594
655
|
var ae;
|
|
595
|
-
(ae =
|
|
596
|
-
}),
|
|
656
|
+
(ae = I.value) != null && ae.length && I.value[0] && I.value[0] ? o.push(s == null ? void 0 : s.scrollWidth) : o.push(xe(se.value[T]));
|
|
657
|
+
}), o;
|
|
597
658
|
};
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
659
|
+
ce(() => [se.value, I.value], () => {
|
|
660
|
+
Te(() => {
|
|
661
|
+
z.value = ke(), D.value = be(), (z.value[0] === D.value[0] || D.value[0] - z.value[0] < 1) && (z.value[1] === D.value[1] || D.value[1] - z.value[1] < 1) && (U.value = !1);
|
|
601
662
|
});
|
|
602
663
|
});
|
|
603
|
-
const
|
|
604
|
-
|
|
664
|
+
const X = u();
|
|
665
|
+
ce(
|
|
605
666
|
() => {
|
|
606
|
-
var
|
|
607
|
-
return (
|
|
667
|
+
var o;
|
|
668
|
+
return (o = G.value) == null ? void 0 : o.$tooltipRef.popperRef.contentRef;
|
|
608
669
|
},
|
|
609
|
-
(
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
}),
|
|
613
|
-
|
|
614
|
-
|
|
670
|
+
(o) => {
|
|
671
|
+
o && (o.addEventListener("mouseenter", function() {
|
|
672
|
+
U.value = !0, X.value && clearTimeout(X.value);
|
|
673
|
+
}), o.addEventListener("mouseleave", function() {
|
|
674
|
+
X.value = setTimeout(() => {
|
|
675
|
+
U.value = !1;
|
|
615
676
|
}, 200);
|
|
616
677
|
}));
|
|
617
678
|
}
|
|
618
679
|
);
|
|
619
|
-
const
|
|
620
|
-
|
|
621
|
-
const
|
|
622
|
-
for (let
|
|
623
|
-
|
|
680
|
+
const me = (o) => {
|
|
681
|
+
o && (ie.value = Ge().nextZIndex()), o ? n() : c(), b("openChange", o), Y.value === "en-US" && Te(() => {
|
|
682
|
+
const t = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
683
|
+
for (let i of t)
|
|
684
|
+
i && (i.innerText = "OK");
|
|
624
685
|
});
|
|
625
|
-
},
|
|
626
|
-
|
|
627
|
-
},
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
686
|
+
}, v = (o) => {
|
|
687
|
+
P(N.value) && (p.value = et(o));
|
|
688
|
+
}, n = () => {
|
|
689
|
+
p.value = "", M.value = Ce(
|
|
690
|
+
v,
|
|
691
|
+
P(N.value),
|
|
692
|
+
M.value
|
|
632
693
|
);
|
|
633
|
-
},
|
|
634
|
-
|
|
694
|
+
}, c = () => {
|
|
695
|
+
M.value = Ce(v, !1, M.value);
|
|
635
696
|
};
|
|
636
|
-
|
|
637
|
-
|
|
697
|
+
qe(() => {
|
|
698
|
+
c(), p.value = "";
|
|
638
699
|
});
|
|
639
|
-
const
|
|
640
|
-
|
|
641
|
-
},
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
}, 200),
|
|
645
|
-
},
|
|
646
|
-
|
|
647
|
-
},
|
|
648
|
-
const
|
|
649
|
-
|
|
650
|
-
const
|
|
651
|
-
|
|
652
|
-
},
|
|
653
|
-
if (
|
|
654
|
-
|
|
700
|
+
const g = () => {
|
|
701
|
+
z.value = ke(), D.value = be(), (z.value[0] === D.value[0] || D.value[0] - z.value[0] < 1) && (z.value[1] === D.value[1] || D.value[1] - z.value[1] < 1) ? U.value = !1 : (U.value = !0, X.value && clearTimeout(X.value)), C.value = !0;
|
|
702
|
+
}, W = () => {
|
|
703
|
+
X.value = setTimeout(() => {
|
|
704
|
+
U.value = !1;
|
|
705
|
+
}, 200), C.value = !1;
|
|
706
|
+
}, te = (o, t) => {
|
|
707
|
+
o ? g() : W();
|
|
708
|
+
}, re = (o, t) => {
|
|
709
|
+
const i = dt(o, N.value, p.value);
|
|
710
|
+
p.value = "";
|
|
711
|
+
const s = ee(i, t), T = K.value && Array.isArray(s) ? s.map((ge) => ge && _e(ge, N.value)) : s, ae = K.value && Array.isArray(T) ? T.map((ge) => ge == null ? "" : String(ge)) : t;
|
|
712
|
+
b("update:error", J.value), b("update:model-value", T), b("change", T, ae);
|
|
713
|
+
}, tt = (o, t) => {
|
|
714
|
+
if (J.value = !1, o === null) {
|
|
715
|
+
b("update:model-value", [null, null]), b("change", [null, null], t);
|
|
655
716
|
return;
|
|
656
717
|
}
|
|
657
|
-
|
|
658
|
-
},
|
|
659
|
-
|
|
718
|
+
re(o, t);
|
|
719
|
+
}, je = (o) => {
|
|
720
|
+
J.value = !1, re(o.value, [o.value[0].format(e.format), o.value[1].format(e.format)]), f.value.blur();
|
|
660
721
|
};
|
|
661
|
-
return
|
|
662
|
-
$rangePicker:
|
|
722
|
+
return S({
|
|
723
|
+
$rangePicker: f,
|
|
663
724
|
blur: () => {
|
|
664
|
-
|
|
725
|
+
f.value.blur();
|
|
665
726
|
},
|
|
666
727
|
focus: () => {
|
|
667
|
-
|
|
728
|
+
f.value.focus();
|
|
668
729
|
}
|
|
669
|
-
}), (
|
|
730
|
+
}), (o, t) => (k(), V(
|
|
670
731
|
"div",
|
|
671
732
|
{
|
|
672
|
-
class:
|
|
673
|
-
style:
|
|
733
|
+
class: Ve(["das-ui-range-picker", [r.borderType, e.isView ? "readonly" : "", d(J) ? "is-error" : ""]]),
|
|
734
|
+
style: he(we.value)
|
|
674
735
|
},
|
|
675
736
|
[
|
|
676
|
-
|
|
677
|
-
default:
|
|
678
|
-
|
|
737
|
+
F(d(Ue), { locale: j.value }, {
|
|
738
|
+
default: y(() => [
|
|
739
|
+
F(d(Xe), {
|
|
679
740
|
ref_key: "inputTooltipRef",
|
|
680
|
-
ref:
|
|
741
|
+
ref: G,
|
|
681
742
|
placement: "top",
|
|
682
743
|
trigger: "hover",
|
|
683
|
-
visible:
|
|
684
|
-
disabled: !
|
|
685
|
-
content:
|
|
744
|
+
visible: U.value,
|
|
745
|
+
disabled: !r.isTooltip,
|
|
746
|
+
content: de.value
|
|
686
747
|
}, {
|
|
687
|
-
default:
|
|
688
|
-
var
|
|
748
|
+
default: y(() => {
|
|
749
|
+
var i;
|
|
689
750
|
return [
|
|
690
|
-
|
|
691
|
-
key:
|
|
751
|
+
Ne((k(), fe(d(mt), Ie({
|
|
752
|
+
key: A.value,
|
|
692
753
|
ref_key: "$rangePicker",
|
|
693
|
-
ref:
|
|
694
|
-
},
|
|
695
|
-
value:
|
|
754
|
+
ref: f
|
|
755
|
+
}, H.value, {
|
|
756
|
+
value: I.value,
|
|
696
757
|
size: E.value,
|
|
697
|
-
locale: (
|
|
698
|
-
valueFormat:
|
|
699
|
-
dropdownClassName: "das-ui-range-picker-dropdown " +
|
|
700
|
-
placeholder:
|
|
701
|
-
showToday:
|
|
702
|
-
showTime:
|
|
703
|
-
bordered:
|
|
758
|
+
locale: (i = j.value) == null ? void 0 : i.DatePicker,
|
|
759
|
+
valueFormat: pe.value,
|
|
760
|
+
dropdownClassName: "das-ui-range-picker-dropdown " + _.value + " " + r.dropdownClassName,
|
|
761
|
+
placeholder: se.value,
|
|
762
|
+
showToday: r.showToday,
|
|
763
|
+
showTime: r.showTime,
|
|
764
|
+
bordered: r.borderType === "bordered",
|
|
704
765
|
disabled: e.disabled || e.isView,
|
|
705
|
-
style:
|
|
706
|
-
popupStyle:
|
|
707
|
-
onChange:
|
|
708
|
-
onOpenChange:
|
|
766
|
+
style: we.value,
|
|
767
|
+
popupStyle: ve.value,
|
|
768
|
+
onChange: tt,
|
|
769
|
+
onOpenChange: me
|
|
709
770
|
}), {
|
|
710
|
-
dateRender:
|
|
711
|
-
L(
|
|
712
|
-
|
|
771
|
+
dateRender: y((s) => [
|
|
772
|
+
L(o.$slots, "dateRender", Ke(He(s)), () => [
|
|
773
|
+
Q(
|
|
713
774
|
"div",
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
775
|
+
{
|
|
776
|
+
class: Ve(["ant-picker-cell-inner", { "das-time-zone-picker-cell-today": ue(s.current) }])
|
|
777
|
+
},
|
|
778
|
+
oe(s.current.date()),
|
|
779
|
+
3
|
|
780
|
+
/* TEXT, CLASS */
|
|
718
781
|
)
|
|
719
782
|
], !0)
|
|
720
783
|
]),
|
|
721
|
-
nextIcon:
|
|
722
|
-
|
|
723
|
-
|
|
784
|
+
nextIcon: y(() => [
|
|
785
|
+
x(' <slot name="nextIcon"> '),
|
|
786
|
+
t[1] || (t[1] = ot(
|
|
724
787
|
" XX ",
|
|
725
788
|
-1
|
|
726
789
|
/* CACHED */
|
|
727
790
|
)),
|
|
728
|
-
|
|
791
|
+
x(" </slot> ")
|
|
729
792
|
]),
|
|
730
|
-
prevIcon:
|
|
731
|
-
L(
|
|
732
|
-
|
|
793
|
+
prevIcon: y(() => [
|
|
794
|
+
L(o.$slots, "prevIcon", {}, () => [
|
|
795
|
+
x(' <das-icon icon="left"></das-icon> ')
|
|
733
796
|
], !0)
|
|
734
797
|
]),
|
|
735
|
-
superNextIcon:
|
|
736
|
-
L(
|
|
737
|
-
|
|
798
|
+
superNextIcon: y(() => [
|
|
799
|
+
L(o.$slots, "superNextIcon", {}, () => [
|
|
800
|
+
x(' <das-icon icon="double-arrow-right"></das-icon> ')
|
|
738
801
|
], !0)
|
|
739
802
|
]),
|
|
740
|
-
superPrevIcon:
|
|
741
|
-
L(
|
|
742
|
-
|
|
803
|
+
superPrevIcon: y(() => [
|
|
804
|
+
L(o.$slots, "superPrevIcon", {}, () => [
|
|
805
|
+
x(' <das-icon icon="double-arrow-left"></das-icon> ')
|
|
743
806
|
], !0)
|
|
744
807
|
]),
|
|
745
|
-
suffixIcon:
|
|
746
|
-
L(
|
|
747
|
-
|
|
808
|
+
suffixIcon: y(() => [
|
|
809
|
+
L(o.$slots, "suffixIcon", {}, () => [
|
|
810
|
+
F(d(Se), {
|
|
748
811
|
class: "das-suffix-icon",
|
|
749
812
|
icon: "riqixuanze",
|
|
750
|
-
size: "medium"
|
|
813
|
+
size: "medium",
|
|
814
|
+
"icon-color": "#666666"
|
|
751
815
|
})
|
|
752
816
|
], !0)
|
|
753
817
|
]),
|
|
754
|
-
separator:
|
|
755
|
-
L(
|
|
756
|
-
|
|
818
|
+
separator: y(() => [
|
|
819
|
+
L(o.$slots, "separator", {}, () => [
|
|
820
|
+
t[2] || (t[2] = Q(
|
|
757
821
|
"div",
|
|
758
822
|
{ style: { padding: "0 8px" } },
|
|
759
823
|
"~",
|
|
@@ -762,19 +826,19 @@ const Ye = {
|
|
|
762
826
|
))
|
|
763
827
|
], !0)
|
|
764
828
|
]),
|
|
765
|
-
renderExtraFooter:
|
|
766
|
-
|
|
767
|
-
L(
|
|
829
|
+
renderExtraFooter: y(() => [
|
|
830
|
+
Q("div", $t, [
|
|
831
|
+
L(o.$slots, "renderExtraFooter", {}, void 0, !0)
|
|
768
832
|
]),
|
|
769
|
-
|
|
770
|
-
(
|
|
771
|
-
|
|
833
|
+
r.showTime || r.ranges && r.ranges.length ? (k(), V("div", Ft, [
|
|
834
|
+
(k(!0), V(
|
|
835
|
+
De,
|
|
772
836
|
null,
|
|
773
|
-
|
|
837
|
+
lt(r.ranges, (s) => (k(), V("div", {
|
|
774
838
|
class: "das-picker-preset",
|
|
775
|
-
key:
|
|
839
|
+
key: s.key
|
|
776
840
|
}, [
|
|
777
|
-
|
|
841
|
+
x(` <el-dropdown v-if="item.type==='dropdown' && item.children.length" trigger="click" :teleported="false" placement='bottom-end'>\r
|
|
778
842
|
\r
|
|
779
843
|
<span class="das-picker-preset-span" >\r
|
|
780
844
|
{{ item.key }}<das-icon icon="fold" size='mini'></das-icon>\r
|
|
@@ -791,31 +855,31 @@ const Ye = {
|
|
|
791
855
|
</el-dropdown-menu>\r
|
|
792
856
|
</template>\r
|
|
793
857
|
</el-dropdown> `),
|
|
794
|
-
|
|
795
|
-
|
|
858
|
+
s.type === "dropdown" && s.children.length ? (k(), fe(
|
|
859
|
+
d(ht),
|
|
796
860
|
{
|
|
797
861
|
key: 0,
|
|
798
862
|
trigger: ["click"]
|
|
799
863
|
},
|
|
800
864
|
{
|
|
801
|
-
overlay:
|
|
802
|
-
|
|
803
|
-
|
|
865
|
+
overlay: y(() => [
|
|
866
|
+
F(
|
|
867
|
+
d(yt),
|
|
804
868
|
null,
|
|
805
869
|
{
|
|
806
|
-
default:
|
|
807
|
-
(
|
|
808
|
-
|
|
870
|
+
default: y(() => [
|
|
871
|
+
(k(!0), V(
|
|
872
|
+
De,
|
|
809
873
|
null,
|
|
810
|
-
|
|
811
|
-
key:
|
|
812
|
-
onClick: (ae) =>
|
|
874
|
+
lt(s.children, (T) => (k(), fe(d(kt), {
|
|
875
|
+
key: T.key,
|
|
876
|
+
onClick: (ae) => je(T)
|
|
813
877
|
}, {
|
|
814
|
-
default:
|
|
815
|
-
(
|
|
878
|
+
default: y(() => [
|
|
879
|
+
(k(), V(
|
|
816
880
|
"span",
|
|
817
|
-
{ key:
|
|
818
|
-
|
|
881
|
+
{ key: T },
|
|
882
|
+
oe(T.key),
|
|
819
883
|
1
|
|
820
884
|
/* TEXT */
|
|
821
885
|
))
|
|
@@ -834,19 +898,19 @@ const Ye = {
|
|
|
834
898
|
/* DYNAMIC_SLOTS */
|
|
835
899
|
)
|
|
836
900
|
]),
|
|
837
|
-
default:
|
|
838
|
-
|
|
901
|
+
default: y(() => [
|
|
902
|
+
Q("a", {
|
|
839
903
|
class: "ant-dropdown-link",
|
|
840
|
-
onClick:
|
|
904
|
+
onClick: t[0] || (t[0] = ft(() => {
|
|
841
905
|
}, ["prevent"]))
|
|
842
906
|
}, [
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
907
|
+
Q("span", Lt, [
|
|
908
|
+
ot(
|
|
909
|
+
oe(s.key) + " ",
|
|
846
910
|
1
|
|
847
911
|
/* TEXT */
|
|
848
912
|
),
|
|
849
|
-
|
|
913
|
+
F(d(Se), {
|
|
850
914
|
icon: "fold",
|
|
851
915
|
size: "mini",
|
|
852
916
|
style: { display: "inline-block" }
|
|
@@ -859,24 +923,24 @@ const Ye = {
|
|
|
859
923
|
},
|
|
860
924
|
1024
|
|
861
925
|
/* DYNAMIC_SLOTS */
|
|
862
|
-
)) : (
|
|
926
|
+
)) : (k(), V("span", {
|
|
863
927
|
key: 1,
|
|
864
928
|
class: "das-picker-preset-span",
|
|
865
|
-
onClick: (
|
|
866
|
-
},
|
|
929
|
+
onClick: (T) => je(s)
|
|
930
|
+
}, oe(s.key), 9, Pt))
|
|
867
931
|
]))),
|
|
868
932
|
128
|
|
869
933
|
/* KEYED_FRAGMENT */
|
|
870
934
|
)),
|
|
871
|
-
|
|
935
|
+
x(` <div class="das-picker-ok">\r
|
|
872
936
|
<das-button btnType="primary" size="middle">Ok</das-button>\r
|
|
873
937
|
</div> `)
|
|
874
|
-
])) :
|
|
938
|
+
])) : x("v-if", !0)
|
|
875
939
|
]),
|
|
876
940
|
_: 3
|
|
877
941
|
/* FORWARDED */
|
|
878
942
|
}, 16, ["value", "size", "locale", "valueFormat", "dropdownClassName", "placeholder", "showToday", "showTime", "bordered", "disabled", "style", "popupStyle"])), [
|
|
879
|
-
[
|
|
943
|
+
[d(We), te]
|
|
880
944
|
])
|
|
881
945
|
];
|
|
882
946
|
}),
|
|
@@ -887,52 +951,52 @@ const Ye = {
|
|
|
887
951
|
_: 3
|
|
888
952
|
/* FORWARDED */
|
|
889
953
|
}, 8, ["locale"]),
|
|
890
|
-
|
|
954
|
+
x(` <div\r
|
|
891
955
|
:class="[errorMode === 'default' ? 'das-date-picker-error-label-content' : 'das-date-picker-overlay-error-label-content', 'das-picker-label-content']"\r
|
|
892
956
|
v-if="(errorMode === 'default' || (errorMode === 'overlay' && isHoverInInput)) && currError && !!errorLabel"\r
|
|
893
957
|
>\r
|
|
894
958
|
<span v-if="currError" class="das-picker-error-label label" :title="errorLabel">{{ errorLabel }}</span>\r
|
|
895
959
|
</div> `),
|
|
896
|
-
|
|
897
|
-
|
|
960
|
+
r.error && r.errorLabel ? (k(), V(
|
|
961
|
+
De,
|
|
898
962
|
{ key: 0 },
|
|
899
963
|
[
|
|
900
|
-
|
|
901
|
-
|
|
964
|
+
r.errorMode === "default" ? (k(), V("div", At, [
|
|
965
|
+
Q(
|
|
902
966
|
"span",
|
|
903
967
|
{
|
|
904
|
-
style:
|
|
968
|
+
style: he(O.value)
|
|
905
969
|
},
|
|
906
|
-
|
|
970
|
+
oe(r.errorLabel),
|
|
907
971
|
5
|
|
908
972
|
/* TEXT, STYLE */
|
|
909
973
|
)
|
|
910
|
-
])) :
|
|
911
|
-
|
|
974
|
+
])) : x("v-if", !0),
|
|
975
|
+
r.errorMode === "overlay" && C.value ? (k(), fe(d(Oe), {
|
|
912
976
|
key: 1,
|
|
913
|
-
errorLabel:
|
|
977
|
+
errorLabel: r.errorLabel,
|
|
914
978
|
getEl: () => {
|
|
915
|
-
var
|
|
916
|
-
return (
|
|
979
|
+
var i;
|
|
980
|
+
return (i = f.value) == null ? void 0 : i.$el;
|
|
917
981
|
},
|
|
918
|
-
errorModelZIndex:
|
|
919
|
-
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) :
|
|
982
|
+
errorModelZIndex: r.errorModelZIndex
|
|
983
|
+
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : x("v-if", !0)
|
|
920
984
|
],
|
|
921
985
|
64
|
|
922
986
|
/* STABLE_FRAGMENT */
|
|
923
|
-
)) :
|
|
987
|
+
)) : x("v-if", !0)
|
|
924
988
|
],
|
|
925
989
|
6
|
|
926
990
|
/* CLASS, STYLE */
|
|
927
991
|
));
|
|
928
992
|
}
|
|
929
|
-
}),
|
|
993
|
+
}), Rt = /* @__PURE__ */ Ye(Bt, [["__scopeId", "data-v-d992f10c"]]), Nt = { class: "ant-picker-cell-inner" }, Ot = {
|
|
930
994
|
key: 0,
|
|
931
995
|
class: "das-date-picker-error-label-content"
|
|
932
|
-
},
|
|
996
|
+
}, Wt = {
|
|
933
997
|
name: "DasDatePicker"
|
|
934
|
-
},
|
|
935
|
-
...
|
|
998
|
+
}, Yt = /* @__PURE__ */ Ee({
|
|
999
|
+
...Wt,
|
|
936
1000
|
props: {
|
|
937
1001
|
timeZoneMode: {},
|
|
938
1002
|
timeZone: {},
|
|
@@ -958,167 +1022,173 @@ const Ye = {
|
|
|
958
1022
|
formSize: {}
|
|
959
1023
|
},
|
|
960
1024
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
961
|
-
setup(
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
1025
|
+
setup(r, { expose: S, emit: l }) {
|
|
1026
|
+
Be((v) => ({
|
|
1027
|
+
e0a13a8a: K.value,
|
|
1028
|
+
v4c6dfad2: pe.value
|
|
965
1029
|
}));
|
|
966
|
-
const e =
|
|
967
|
-
|
|
968
|
-
|
|
1030
|
+
const e = r, b = l, j = u(void 0);
|
|
1031
|
+
ce(Y, async () => {
|
|
1032
|
+
j.value = await Je(Y.value);
|
|
969
1033
|
}, { immediate: !0 });
|
|
970
|
-
const
|
|
1034
|
+
const A = a(() => `time-picker-${Y.value}`), f = u(null), G = u(null), p = u(""), M = u(!1), Z = Re(), E = ye(e, "modelValue"), q = ye(e, "error"), J = a(() => Z.valueFormat ?? Z["value-format"]), w = a(() => ({
|
|
971
1035
|
timeZoneMode: e.timeZoneMode,
|
|
972
1036
|
timeZone: e.timeZone,
|
|
973
1037
|
useClientTimeZone: e.useClientTimeZone,
|
|
974
|
-
timeZoneValueFormat
|
|
975
|
-
|
|
1038
|
+
// timeZoneValueFormat 是最高优先级;未传时兼容旧业务继续使用 valueFormat 控制输出。
|
|
1039
|
+
timeZoneValueFormat: e.timeZoneValueFormat ?? J.value
|
|
1040
|
+
})), N = a(() => {
|
|
1041
|
+
if (!P(w.value)) return Z;
|
|
1042
|
+
const { valueFormat: v, "value-format": n, ...c } = Z;
|
|
1043
|
+
return c;
|
|
1044
|
+
}), I = a(() => Fe(E.value, w.value)), K = a(() => e.width ? e.width : "230px"), R = a(() => e.formSize), H = a(() => e.size === "large" ? "large" : e.size === "small" || e.size === "table" ? "small" : "middle"), pe = a(() => e.height ? e.height : R.value ? {
|
|
976
1045
|
small: "24px",
|
|
977
1046
|
default: "32px",
|
|
978
1047
|
large: "40px"
|
|
979
|
-
}[
|
|
1048
|
+
}[R.value] : "auto"), _ = a(() => ({
|
|
980
1049
|
width: e.width
|
|
981
|
-
})),
|
|
982
|
-
"z-index":
|
|
983
|
-
})),
|
|
1050
|
+
})), le = a(() => e.isView ? e.noSetDefaultVal ? "" : "-" : $e(e.placeholder)), ne = u(3e3), ue = a(() => ({
|
|
1051
|
+
"z-index": ne.value
|
|
1052
|
+
})), ee = u(!1), h = u({
|
|
984
1053
|
display: "block",
|
|
985
1054
|
color: "var(--upf-color-error)",
|
|
986
1055
|
"white-space": "break-spaces"
|
|
987
|
-
}),
|
|
988
|
-
|
|
1056
|
+
}), m = (v) => {
|
|
1057
|
+
v && (ne.value = Ge().nextZIndex()), v ? ie() : ve(), b("openChange", v), String(Y.value).startsWith("en") && Te(() => {
|
|
989
1058
|
const n = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
990
|
-
for (let
|
|
991
|
-
|
|
1059
|
+
for (let c of n)
|
|
1060
|
+
c && (c.innerText = "OK");
|
|
992
1061
|
});
|
|
993
|
-
},
|
|
994
|
-
|
|
995
|
-
},
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1062
|
+
}, B = (v) => {
|
|
1063
|
+
P(w.value) && (p.value = et(v));
|
|
1064
|
+
}, ie = () => {
|
|
1065
|
+
p.value = "", M.value = Ce(
|
|
1066
|
+
B,
|
|
1067
|
+
P(w.value),
|
|
1068
|
+
M.value
|
|
1000
1069
|
);
|
|
1001
|
-
},
|
|
1002
|
-
|
|
1070
|
+
}, ve = () => {
|
|
1071
|
+
M.value = Ce(B, !1, M.value);
|
|
1003
1072
|
};
|
|
1004
|
-
|
|
1005
|
-
|
|
1073
|
+
qe(() => {
|
|
1074
|
+
ve(), p.value = "";
|
|
1006
1075
|
});
|
|
1007
|
-
const
|
|
1008
|
-
const
|
|
1009
|
-
return
|
|
1010
|
-
},
|
|
1076
|
+
const C = u(!1), O = u(""), se = a(() => I.value ? O.value : le.value), we = () => {
|
|
1077
|
+
const v = e.size === "table" ? 12 : 14;
|
|
1078
|
+
return Qe(le.value, v);
|
|
1079
|
+
}, U = () => {
|
|
1011
1080
|
var n;
|
|
1012
|
-
const
|
|
1013
|
-
return
|
|
1014
|
-
},
|
|
1015
|
-
var
|
|
1016
|
-
const
|
|
1017
|
-
return
|
|
1018
|
-
},
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1081
|
+
const v = (n = f.value) == null ? void 0 : n.$el.querySelector(".ant-picker-input>input");
|
|
1082
|
+
return I.value ? v == null ? void 0 : v.scrollWidth : we();
|
|
1083
|
+
}, Ze = () => {
|
|
1084
|
+
var c;
|
|
1085
|
+
const v = (c = f.value) == null ? void 0 : c.$el.querySelector(".ant-picker-input>input");
|
|
1086
|
+
return v ? (O.value = v.getAttribute("value"), v.removeAttribute("title"), (v == null ? void 0 : v.offsetWidth) ?? 0) : 0;
|
|
1087
|
+
}, $ = u(0), de = u(0);
|
|
1088
|
+
ce(() => [le.value, I.value], () => {
|
|
1089
|
+
Te(() => {
|
|
1090
|
+
$.value = Ze(), de.value = U(), ($.value === de.value || de.value - $.value < 1) && (C.value = !1);
|
|
1022
1091
|
});
|
|
1023
1092
|
});
|
|
1024
|
-
const
|
|
1025
|
-
|
|
1093
|
+
const D = u();
|
|
1094
|
+
ce(
|
|
1026
1095
|
() => {
|
|
1027
|
-
var
|
|
1028
|
-
return (
|
|
1096
|
+
var v;
|
|
1097
|
+
return (v = G.value) == null ? void 0 : v.$tooltipRef.popperRef.contentRef;
|
|
1029
1098
|
},
|
|
1030
|
-
(
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
}),
|
|
1034
|
-
|
|
1035
|
-
|
|
1099
|
+
(v) => {
|
|
1100
|
+
v && (v.addEventListener("mouseenter", function() {
|
|
1101
|
+
C.value = !0, D.value && clearTimeout(D.value);
|
|
1102
|
+
}), v.addEventListener("mouseleave", function() {
|
|
1103
|
+
D.value = setTimeout(() => {
|
|
1104
|
+
C.value = !1;
|
|
1036
1105
|
}, 200);
|
|
1037
1106
|
}));
|
|
1038
1107
|
}
|
|
1039
1108
|
);
|
|
1040
|
-
const
|
|
1041
|
-
|
|
1042
|
-
},
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
}, 200),
|
|
1046
|
-
},
|
|
1047
|
-
|
|
1048
|
-
},
|
|
1049
|
-
|
|
1050
|
-
const
|
|
1051
|
-
|
|
1052
|
-
const
|
|
1053
|
-
|
|
1109
|
+
const ke = () => {
|
|
1110
|
+
$.value = Ze(), de.value = U(), $.value === de.value || de.value - $.value < 1 ? C.value = !1 : (C.value = !0, D.value && clearTimeout(D.value)), ee.value = !0;
|
|
1111
|
+
}, xe = () => {
|
|
1112
|
+
D.value = setTimeout(() => {
|
|
1113
|
+
C.value = !1;
|
|
1114
|
+
}, 200), ee.value = !1;
|
|
1115
|
+
}, be = (v) => {
|
|
1116
|
+
v ? ke() : xe();
|
|
1117
|
+
}, ze = (v, n) => {
|
|
1118
|
+
q.value = !1, b("update:error", q.value);
|
|
1119
|
+
const c = st(v, w.value, p.value);
|
|
1120
|
+
p.value = "";
|
|
1121
|
+
const g = P(w.value) ? _e(c, w.value) : c, W = P(w.value) && g != null ? String(g) : n;
|
|
1122
|
+
b("update:model-value", g), b("change", g, W);
|
|
1054
1123
|
};
|
|
1055
|
-
return
|
|
1056
|
-
$timePicker:
|
|
1124
|
+
return S({
|
|
1125
|
+
$timePicker: f,
|
|
1057
1126
|
blur: () => {
|
|
1058
|
-
|
|
1127
|
+
f.value.blur();
|
|
1059
1128
|
},
|
|
1060
1129
|
focus: () => {
|
|
1061
|
-
|
|
1130
|
+
f.value.focus();
|
|
1062
1131
|
}
|
|
1063
|
-
}), (
|
|
1132
|
+
}), (v, n) => (k(), V(
|
|
1064
1133
|
"div",
|
|
1065
1134
|
{
|
|
1066
|
-
class:
|
|
1067
|
-
style:
|
|
1135
|
+
class: Ve(["das-ui-time-picker", [r.borderType, e.isView ? "readonly" : "", d(q) ? "is-error" : ""]]),
|
|
1136
|
+
style: he(_.value)
|
|
1068
1137
|
},
|
|
1069
1138
|
[
|
|
1070
|
-
|
|
1071
|
-
default:
|
|
1072
|
-
|
|
1139
|
+
F(d(Ue), { locale: j.value }, {
|
|
1140
|
+
default: y(() => [
|
|
1141
|
+
F(d(Xe), {
|
|
1073
1142
|
ref_key: "inputTooltipRef",
|
|
1074
|
-
ref:
|
|
1143
|
+
ref: G,
|
|
1075
1144
|
placement: "top",
|
|
1076
1145
|
trigger: "hover",
|
|
1077
|
-
visible:
|
|
1078
|
-
disabled: !
|
|
1079
|
-
content:
|
|
1146
|
+
visible: C.value,
|
|
1147
|
+
disabled: !r.isTooltip,
|
|
1148
|
+
content: se.value
|
|
1080
1149
|
}, {
|
|
1081
|
-
default:
|
|
1082
|
-
|
|
1083
|
-
key:
|
|
1150
|
+
default: y(() => [
|
|
1151
|
+
Ne((k(), fe(d(bt), Ie({
|
|
1152
|
+
key: A.value,
|
|
1084
1153
|
ref_key: "$timePicker",
|
|
1085
|
-
ref:
|
|
1086
|
-
},
|
|
1087
|
-
value:
|
|
1088
|
-
size:
|
|
1089
|
-
popupClassName: "das-ui-time-picker-dropdown " +
|
|
1090
|
-
showNow:
|
|
1091
|
-
bordered:
|
|
1092
|
-
placeholder:
|
|
1154
|
+
ref: f
|
|
1155
|
+
}, N.value, {
|
|
1156
|
+
value: I.value,
|
|
1157
|
+
size: H.value,
|
|
1158
|
+
popupClassName: "das-ui-time-picker-dropdown " + r.dropdownClassName,
|
|
1159
|
+
showNow: r.showNow,
|
|
1160
|
+
bordered: r.borderType === "bordered",
|
|
1161
|
+
placeholder: le.value,
|
|
1093
1162
|
disabled: e.disabled || e.isView,
|
|
1094
|
-
style:
|
|
1095
|
-
popupStyle:
|
|
1096
|
-
onChange:
|
|
1097
|
-
onOpenChange:
|
|
1163
|
+
style: _.value,
|
|
1164
|
+
popupStyle: ue.value,
|
|
1165
|
+
onChange: ze,
|
|
1166
|
+
onOpenChange: m
|
|
1098
1167
|
}), {
|
|
1099
|
-
dateRender:
|
|
1100
|
-
L(
|
|
1101
|
-
|
|
1168
|
+
dateRender: y((c) => [
|
|
1169
|
+
L(v.$slots, "dateRender", Ke(He(c)), () => [
|
|
1170
|
+
Q(
|
|
1102
1171
|
"div",
|
|
1103
|
-
|
|
1104
|
-
|
|
1172
|
+
Nt,
|
|
1173
|
+
oe(c.current.date()),
|
|
1105
1174
|
1
|
|
1106
1175
|
/* TEXT */
|
|
1107
1176
|
)
|
|
1108
1177
|
], !0)
|
|
1109
1178
|
]),
|
|
1110
|
-
suffixIcon:
|
|
1111
|
-
L(
|
|
1112
|
-
|
|
1179
|
+
suffixIcon: y(() => [
|
|
1180
|
+
L(v.$slots, "suffixIcon", {}, () => [
|
|
1181
|
+
F(d(wt), {
|
|
1113
1182
|
class: "das-suffix-icon",
|
|
1114
|
-
size: "medium"
|
|
1183
|
+
size: "medium",
|
|
1184
|
+
iconColor: "#666666"
|
|
1115
1185
|
})
|
|
1116
1186
|
], !0)
|
|
1117
1187
|
]),
|
|
1118
1188
|
_: 3
|
|
1119
1189
|
/* FORWARDED */
|
|
1120
1190
|
}, 16, ["value", "size", "popupClassName", "showNow", "bordered", "placeholder", "disabled", "style", "popupStyle"])), [
|
|
1121
|
-
[
|
|
1191
|
+
[d(We), be]
|
|
1122
1192
|
])
|
|
1123
1193
|
]),
|
|
1124
1194
|
_: 3
|
|
@@ -1128,31 +1198,31 @@ const Ye = {
|
|
|
1128
1198
|
_: 3
|
|
1129
1199
|
/* FORWARDED */
|
|
1130
1200
|
}, 8, ["locale"]),
|
|
1131
|
-
|
|
1132
|
-
|
|
1201
|
+
r.error && r.errorLabel ? (k(), V(
|
|
1202
|
+
De,
|
|
1133
1203
|
{ key: 0 },
|
|
1134
1204
|
[
|
|
1135
|
-
|
|
1136
|
-
|
|
1205
|
+
r.errorMode === "default" ? (k(), V("div", Ot, [
|
|
1206
|
+
Q(
|
|
1137
1207
|
"span",
|
|
1138
1208
|
{
|
|
1139
|
-
style:
|
|
1209
|
+
style: he(h.value)
|
|
1140
1210
|
},
|
|
1141
|
-
|
|
1211
|
+
oe(r.errorLabel),
|
|
1142
1212
|
5
|
|
1143
1213
|
/* TEXT, STYLE */
|
|
1144
1214
|
)
|
|
1145
|
-
])) :
|
|
1146
|
-
|
|
1215
|
+
])) : x("v-if", !0),
|
|
1216
|
+
r.errorMode === "overlay" && ee.value ? (k(), fe(d(Oe), {
|
|
1147
1217
|
key: 1,
|
|
1148
|
-
errorLabel:
|
|
1218
|
+
errorLabel: r.errorLabel,
|
|
1149
1219
|
getEl: () => {
|
|
1150
|
-
var
|
|
1151
|
-
return (
|
|
1220
|
+
var c;
|
|
1221
|
+
return (c = f.value) == null ? void 0 : c.$el;
|
|
1152
1222
|
},
|
|
1153
|
-
errorModelZIndex:
|
|
1154
|
-
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) :
|
|
1155
|
-
|
|
1223
|
+
errorModelZIndex: r.errorModelZIndex
|
|
1224
|
+
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : x("v-if", !0),
|
|
1225
|
+
x(` <template v-else-if="errorMode === 'overlay' && isHoverInInput">\r
|
|
1156
1226
|
<teleport to="body" v-if="teleported">\r
|
|
1157
1227
|
<div ref="$errorModel" :style="errorModelStyle">\r
|
|
1158
1228
|
<span :style="errorLabelStyle">{{ errorLabel }}</span>\r
|
|
@@ -1166,19 +1236,19 @@ const Ye = {
|
|
|
1166
1236
|
],
|
|
1167
1237
|
64
|
|
1168
1238
|
/* STABLE_FRAGMENT */
|
|
1169
|
-
)) :
|
|
1239
|
+
)) : x("v-if", !0)
|
|
1170
1240
|
],
|
|
1171
1241
|
6
|
|
1172
1242
|
/* CLASS, STYLE */
|
|
1173
1243
|
));
|
|
1174
1244
|
}
|
|
1175
|
-
}),
|
|
1245
|
+
}), jt = /* @__PURE__ */ Ye(Yt, [["__scopeId", "data-v-5d351731"]]), qt = { class: "ant-picker-cell-inner" }, Kt = {
|
|
1176
1246
|
key: 0,
|
|
1177
1247
|
class: "das-date-picker-error-label-content"
|
|
1178
|
-
},
|
|
1248
|
+
}, Ht = {
|
|
1179
1249
|
name: "DasDatePicker"
|
|
1180
|
-
},
|
|
1181
|
-
...
|
|
1250
|
+
}, Ut = /* @__PURE__ */ Ee({
|
|
1251
|
+
...Ht,
|
|
1182
1252
|
props: {
|
|
1183
1253
|
timeZoneMode: {},
|
|
1184
1254
|
timeZone: {},
|
|
@@ -1204,189 +1274,195 @@ const Ye = {
|
|
|
1204
1274
|
formSize: {}
|
|
1205
1275
|
},
|
|
1206
1276
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
1207
|
-
setup(
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
})),
|
|
1277
|
+
setup(r, { expose: S, emit: l }) {
|
|
1278
|
+
Be((n) => ({
|
|
1279
|
+
f466b758: K.value,
|
|
1280
|
+
v19f8ec59: pe.value
|
|
1281
|
+
})), rt({
|
|
1212
1282
|
dengdai: import("@das-fed/upf-ui/packages/icons/dengdai")
|
|
1213
1283
|
});
|
|
1214
|
-
const e =
|
|
1215
|
-
|
|
1216
|
-
|
|
1284
|
+
const e = r, b = l, j = u(void 0);
|
|
1285
|
+
ce(Y, async () => {
|
|
1286
|
+
j.value = await Je(Y.value);
|
|
1217
1287
|
}, { immediate: !0 });
|
|
1218
|
-
const
|
|
1288
|
+
const A = a(() => `time-range-picker-${Y.value}`), f = u(null), G = u(null), p = u(""), M = u(!1), Z = Re(), E = ye(e, "modelValue"), q = ye(e, "error"), J = a(() => Z.valueFormat ?? Z["value-format"]), w = a(() => ({
|
|
1219
1289
|
timeZoneMode: e.timeZoneMode,
|
|
1220
1290
|
timeZone: e.timeZone,
|
|
1221
1291
|
useClientTimeZone: e.useClientTimeZone,
|
|
1222
|
-
timeZoneValueFormat
|
|
1223
|
-
|
|
1292
|
+
// timeZoneValueFormat 是最高优先级;未传时兼容旧业务继续使用 valueFormat 控制输出。
|
|
1293
|
+
timeZoneValueFormat: e.timeZoneValueFormat ?? J.value
|
|
1294
|
+
})), N = a(() => {
|
|
1295
|
+
if (!P(w.value)) return Z;
|
|
1296
|
+
const { valueFormat: n, "value-format": c, ...g } = Z;
|
|
1297
|
+
return g;
|
|
1298
|
+
}), I = a(() => !Array.isArray(E.value) || !P(w.value) ? E.value : E.value.map((n) => Fe(n, w.value))), K = a(() => e.width ? e.width : "230px"), R = a(() => e.formSize), H = a(() => e.size === "large" ? "large" : e.size === "small" || e.size === "table" ? "small" : "middle"), pe = a(() => e.height ? e.height : R.value ? {
|
|
1224
1299
|
small: "24px",
|
|
1225
1300
|
default: "32px",
|
|
1226
1301
|
large: "40px"
|
|
1227
|
-
}[
|
|
1228
|
-
"z-index":
|
|
1229
|
-
})),
|
|
1302
|
+
}[R.value] : "auto"), _ = u(3e3), le = a(() => ({
|
|
1303
|
+
"z-index": _.value
|
|
1304
|
+
})), ne = a(() => ({
|
|
1230
1305
|
width: e.width
|
|
1231
|
-
})),
|
|
1306
|
+
})), ue = a(() => {
|
|
1232
1307
|
var n;
|
|
1233
|
-
return e.isView ? e.noSetDefaultVal ? ["", ""] : ["-", "-"] : (n = e.placeholder) == null ? void 0 : n.map((
|
|
1234
|
-
}),
|
|
1308
|
+
return e.isView ? e.noSetDefaultVal ? ["", ""] : ["-", "-"] : (n = e.placeholder) == null ? void 0 : n.map((c) => $e(c));
|
|
1309
|
+
}), ee = u(!1), h = u({
|
|
1235
1310
|
display: "block",
|
|
1236
1311
|
color: "var(--upf-color-error)",
|
|
1237
1312
|
"white-space": "break-spaces"
|
|
1238
|
-
}),
|
|
1313
|
+
}), m = u(!1), B = u(["", ""]), ie = u("~"), ve = a(() => {
|
|
1239
1314
|
var n;
|
|
1240
|
-
return (n = E.value) != null && n.length && E.value[0] && E.value[1] ?
|
|
1241
|
-
}),
|
|
1242
|
-
var
|
|
1315
|
+
return (n = E.value) != null && n.length && E.value[0] && E.value[1] ? B.value.join(" " + ie.value + " ") : ue.value.join(" " + ie.value + " ");
|
|
1316
|
+
}), C = u([0, 0]), O = u([0, 0]), se = () => {
|
|
1317
|
+
var W;
|
|
1243
1318
|
let n = [];
|
|
1244
|
-
const
|
|
1245
|
-
if (!
|
|
1319
|
+
const c = (W = f.value) == null ? void 0 : W.$el.querySelectorAll(".ant-picker-input>input");
|
|
1320
|
+
if (!c)
|
|
1246
1321
|
return n = [0, 0], n;
|
|
1247
|
-
let
|
|
1248
|
-
for (let
|
|
1249
|
-
|
|
1250
|
-
let
|
|
1251
|
-
n.push(
|
|
1322
|
+
let g = [];
|
|
1323
|
+
for (let te of c) {
|
|
1324
|
+
g.push(te.getAttribute("value") || "");
|
|
1325
|
+
let re = (te == null ? void 0 : te.offsetWidth) ?? 0;
|
|
1326
|
+
n.push(re);
|
|
1252
1327
|
}
|
|
1253
|
-
return
|
|
1254
|
-
},
|
|
1255
|
-
const
|
|
1256
|
-
return
|
|
1257
|
-
},
|
|
1258
|
-
var
|
|
1328
|
+
return B.value = g, n;
|
|
1329
|
+
}, we = (n) => {
|
|
1330
|
+
const c = e.size === "table" ? 12 : 14;
|
|
1331
|
+
return Qe(n, c);
|
|
1332
|
+
}, U = () => {
|
|
1333
|
+
var g;
|
|
1259
1334
|
let n = [];
|
|
1260
|
-
return ((
|
|
1261
|
-
E.value.length && E.value[0] && E.value[0] ? n.push(
|
|
1335
|
+
return ((g = f.value) == null ? void 0 : g.$el.querySelectorAll(".ant-picker-input>input")).forEach((W, te) => {
|
|
1336
|
+
E.value.length && E.value[0] && E.value[0] ? n.push(W == null ? void 0 : W.scrollWidth) : n.push(we(ue.value[te]));
|
|
1262
1337
|
}), n;
|
|
1263
1338
|
};
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1339
|
+
ce(() => [ue.value, E.value], () => {
|
|
1340
|
+
Te(() => {
|
|
1341
|
+
C.value = se(), O.value = U(), (C.value[0] === O.value[0] || O.value[0] - C.value[0] < 1) && (C.value[1] === O.value[1] || O.value[1] - C.value[1] < 1) && (m.value = !1);
|
|
1267
1342
|
});
|
|
1268
1343
|
});
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1344
|
+
const $ = u();
|
|
1345
|
+
ce(
|
|
1271
1346
|
() => {
|
|
1272
1347
|
var n;
|
|
1273
|
-
return (n =
|
|
1348
|
+
return (n = G.value) == null ? void 0 : n.$tooltipRef.popperRef.contentRef;
|
|
1274
1349
|
},
|
|
1275
1350
|
(n) => {
|
|
1276
1351
|
n && (n.addEventListener("mouseenter", function() {
|
|
1277
|
-
|
|
1352
|
+
m.value = !0, $.value && clearTimeout($.value);
|
|
1278
1353
|
}), n.addEventListener("mouseleave", function() {
|
|
1279
|
-
|
|
1280
|
-
|
|
1354
|
+
$.value = setTimeout(() => {
|
|
1355
|
+
m.value = !1;
|
|
1281
1356
|
}, 200);
|
|
1282
1357
|
}));
|
|
1283
1358
|
}
|
|
1284
1359
|
);
|
|
1285
|
-
const
|
|
1286
|
-
n && (
|
|
1287
|
-
const
|
|
1288
|
-
for (let
|
|
1289
|
-
|
|
1360
|
+
const de = (n) => {
|
|
1361
|
+
n && (_.value = Ge().nextZIndex()), n ? D() : ke(), b("openChange", n), String(Y.value).startsWith("en") && Te(() => {
|
|
1362
|
+
const c = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
1363
|
+
for (let g of c)
|
|
1364
|
+
g && (g.innerText = "OK");
|
|
1290
1365
|
});
|
|
1291
|
-
},
|
|
1292
|
-
|
|
1293
|
-
},
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1366
|
+
}, z = (n) => {
|
|
1367
|
+
P(w.value) && (p.value = et(n));
|
|
1368
|
+
}, D = () => {
|
|
1369
|
+
p.value = "", M.value = Ce(
|
|
1370
|
+
z,
|
|
1371
|
+
P(w.value),
|
|
1372
|
+
M.value
|
|
1298
1373
|
);
|
|
1299
|
-
},
|
|
1300
|
-
|
|
1374
|
+
}, ke = () => {
|
|
1375
|
+
M.value = Ce(z, !1, M.value);
|
|
1301
1376
|
};
|
|
1302
|
-
|
|
1303
|
-
|
|
1377
|
+
qe(() => {
|
|
1378
|
+
ke(), p.value = "";
|
|
1304
1379
|
});
|
|
1305
|
-
const
|
|
1306
|
-
|
|
1307
|
-
},
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
}, 200),
|
|
1311
|
-
},
|
|
1312
|
-
n ?
|
|
1313
|
-
},
|
|
1314
|
-
if (
|
|
1315
|
-
|
|
1380
|
+
const xe = () => {
|
|
1381
|
+
C.value = se(), O.value = U(), (C.value[0] === O.value[0] || O.value[0] - C.value[0] < 1) && (C.value[1] === O.value[1] || O.value[1] - C.value[1] < 1) ? m.value = !1 : (m.value = !0, $.value && clearTimeout($.value)), ee.value = !0;
|
|
1382
|
+
}, be = () => {
|
|
1383
|
+
$.value = setTimeout(() => {
|
|
1384
|
+
m.value = !1;
|
|
1385
|
+
}, 200), ee.value = !1;
|
|
1386
|
+
}, ze = (n) => {
|
|
1387
|
+
n ? xe() : be();
|
|
1388
|
+
}, X = (n, c) => {
|
|
1389
|
+
if (q.value = !1, n === null) {
|
|
1390
|
+
b("update:model-value", [null, null]), b("change", [null, null], Array.isArray(c) ? c.join(" ~ ") : c);
|
|
1316
1391
|
return;
|
|
1317
1392
|
}
|
|
1318
|
-
const
|
|
1319
|
-
|
|
1320
|
-
const
|
|
1321
|
-
|
|
1393
|
+
const g = dt(n, w.value, p.value);
|
|
1394
|
+
p.value = "";
|
|
1395
|
+
const W = P(w.value) && Array.isArray(g) ? g.map((re) => re && _e(re, w.value)) : g, te = P(w.value) && Array.isArray(W) ? W.map((re) => re == null ? "" : String(re)).join(" ~ ") : Array.isArray(c) ? c.join(" ~ ") : c;
|
|
1396
|
+
b("update:error", q.value), b("update:model-value", W), b("change", W, te);
|
|
1322
1397
|
};
|
|
1323
|
-
return
|
|
1324
|
-
$timeRangePicker:
|
|
1398
|
+
return S({
|
|
1399
|
+
$timeRangePicker: f,
|
|
1325
1400
|
blur: () => {
|
|
1326
|
-
|
|
1401
|
+
f.value.blur();
|
|
1327
1402
|
},
|
|
1328
1403
|
focus: () => {
|
|
1329
|
-
|
|
1404
|
+
f.value.focus();
|
|
1330
1405
|
}
|
|
1331
|
-
}), (n,
|
|
1406
|
+
}), (n, c) => (k(), V(
|
|
1332
1407
|
"div",
|
|
1333
1408
|
{
|
|
1334
|
-
class:
|
|
1335
|
-
style:
|
|
1409
|
+
class: Ve(["das-ui-time-range-picker", [r.borderType, e.isView ? "readonly" : "", d(q) ? "is-error" : ""]]),
|
|
1410
|
+
style: he(ne.value)
|
|
1336
1411
|
},
|
|
1337
1412
|
[
|
|
1338
|
-
|
|
1339
|
-
default:
|
|
1340
|
-
|
|
1413
|
+
F(d(Ue), { locale: j.value }, {
|
|
1414
|
+
default: y(() => [
|
|
1415
|
+
F(d(Xe), {
|
|
1341
1416
|
ref_key: "inputTooltipRef",
|
|
1342
|
-
ref:
|
|
1417
|
+
ref: G,
|
|
1343
1418
|
placement: "top",
|
|
1344
1419
|
trigger: "hover",
|
|
1345
|
-
visible:
|
|
1346
|
-
disabled: !
|
|
1347
|
-
content:
|
|
1420
|
+
visible: m.value,
|
|
1421
|
+
disabled: !r.isTooltip,
|
|
1422
|
+
content: ve.value
|
|
1348
1423
|
}, {
|
|
1349
|
-
default:
|
|
1350
|
-
|
|
1351
|
-
key:
|
|
1424
|
+
default: y(() => [
|
|
1425
|
+
Ne((k(), fe(d(gt), Ie({
|
|
1426
|
+
key: A.value,
|
|
1352
1427
|
ref_key: "$timeRangePicker",
|
|
1353
|
-
ref:
|
|
1354
|
-
},
|
|
1355
|
-
value:
|
|
1356
|
-
size:
|
|
1357
|
-
popupClassName: "das-ui-time-range-picker-dropdown " +
|
|
1358
|
-
showNow:
|
|
1359
|
-
bordered:
|
|
1360
|
-
placeholder:
|
|
1428
|
+
ref: f
|
|
1429
|
+
}, N.value, {
|
|
1430
|
+
value: I.value,
|
|
1431
|
+
size: H.value,
|
|
1432
|
+
popupClassName: "das-ui-time-range-picker-dropdown " + r.dropdownClassName,
|
|
1433
|
+
showNow: r.showNow,
|
|
1434
|
+
bordered: r.borderType === "bordered",
|
|
1435
|
+
placeholder: ue.value,
|
|
1361
1436
|
disabled: e.disabled || e.isView,
|
|
1362
|
-
style:
|
|
1363
|
-
popupStyle:
|
|
1364
|
-
onChange:
|
|
1365
|
-
onOpenChange:
|
|
1437
|
+
style: ne.value,
|
|
1438
|
+
popupStyle: le.value,
|
|
1439
|
+
onChange: X,
|
|
1440
|
+
onOpenChange: de
|
|
1366
1441
|
}), {
|
|
1367
|
-
dateRender:
|
|
1368
|
-
L(n.$slots, "dateRender",
|
|
1369
|
-
|
|
1442
|
+
dateRender: y((g) => [
|
|
1443
|
+
L(n.$slots, "dateRender", Ke(He(g)), () => [
|
|
1444
|
+
Q(
|
|
1370
1445
|
"div",
|
|
1371
|
-
|
|
1372
|
-
|
|
1446
|
+
qt,
|
|
1447
|
+
oe(g.current.date()),
|
|
1373
1448
|
1
|
|
1374
1449
|
/* TEXT */
|
|
1375
1450
|
)
|
|
1376
1451
|
], !0)
|
|
1377
1452
|
]),
|
|
1378
|
-
suffixIcon:
|
|
1453
|
+
suffixIcon: y(() => [
|
|
1379
1454
|
L(n.$slots, "suffixIcon", {}, () => [
|
|
1380
|
-
|
|
1455
|
+
F(d(Se), {
|
|
1381
1456
|
class: "das-suffix-icon",
|
|
1382
1457
|
icon: "dengdai",
|
|
1383
|
-
size: "medium"
|
|
1458
|
+
size: "medium",
|
|
1459
|
+
"icon-color": "#666666"
|
|
1384
1460
|
})
|
|
1385
1461
|
], !0)
|
|
1386
1462
|
]),
|
|
1387
|
-
separator:
|
|
1463
|
+
separator: y(() => [
|
|
1388
1464
|
L(n.$slots, "separator", {}, () => [
|
|
1389
|
-
|
|
1465
|
+
c[0] || (c[0] = Q(
|
|
1390
1466
|
"div",
|
|
1391
1467
|
{ style: { padding: "0 8px" } },
|
|
1392
1468
|
"~",
|
|
@@ -1398,7 +1474,7 @@ const Ye = {
|
|
|
1398
1474
|
_: 3
|
|
1399
1475
|
/* FORWARDED */
|
|
1400
1476
|
}, 16, ["value", "size", "popupClassName", "showNow", "bordered", "placeholder", "disabled", "style", "popupStyle"])), [
|
|
1401
|
-
[
|
|
1477
|
+
[d(We), ze]
|
|
1402
1478
|
])
|
|
1403
1479
|
]),
|
|
1404
1480
|
_: 3
|
|
@@ -1408,40 +1484,40 @@ const Ye = {
|
|
|
1408
1484
|
_: 3
|
|
1409
1485
|
/* FORWARDED */
|
|
1410
1486
|
}, 8, ["locale"]),
|
|
1411
|
-
|
|
1412
|
-
|
|
1487
|
+
r.error && r.errorLabel ? (k(), V(
|
|
1488
|
+
De,
|
|
1413
1489
|
{ key: 0 },
|
|
1414
1490
|
[
|
|
1415
|
-
|
|
1416
|
-
|
|
1491
|
+
r.errorMode === "default" ? (k(), V("div", Kt, [
|
|
1492
|
+
Q(
|
|
1417
1493
|
"span",
|
|
1418
1494
|
{
|
|
1419
|
-
style:
|
|
1495
|
+
style: he(h.value)
|
|
1420
1496
|
},
|
|
1421
|
-
|
|
1497
|
+
oe(r.errorLabel),
|
|
1422
1498
|
5
|
|
1423
1499
|
/* TEXT, STYLE */
|
|
1424
1500
|
)
|
|
1425
|
-
])) :
|
|
1426
|
-
|
|
1501
|
+
])) : x("v-if", !0),
|
|
1502
|
+
r.errorMode === "overlay" && ee.value ? (k(), fe(d(Oe), {
|
|
1427
1503
|
key: 1,
|
|
1428
|
-
errorLabel:
|
|
1504
|
+
errorLabel: r.errorLabel,
|
|
1429
1505
|
getEl: () => {
|
|
1430
|
-
var
|
|
1431
|
-
return (
|
|
1506
|
+
var g;
|
|
1507
|
+
return (g = f.value) == null ? void 0 : g.$el;
|
|
1432
1508
|
},
|
|
1433
|
-
errorModelZIndex:
|
|
1434
|
-
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) :
|
|
1509
|
+
errorModelZIndex: r.errorModelZIndex
|
|
1510
|
+
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : x("v-if", !0)
|
|
1435
1511
|
],
|
|
1436
1512
|
64
|
|
1437
1513
|
/* STABLE_FRAGMENT */
|
|
1438
|
-
)) :
|
|
1514
|
+
)) : x("v-if", !0)
|
|
1439
1515
|
],
|
|
1440
1516
|
6
|
|
1441
1517
|
/* CLASS, STYLE */
|
|
1442
1518
|
));
|
|
1443
1519
|
}
|
|
1444
|
-
}),
|
|
1520
|
+
}), Xt = /* @__PURE__ */ Ye(Ut, [["__scopeId", "data-v-2181a99e"]]), Gt = {
|
|
1445
1521
|
开始日期: { "zh-CN": "开始日期", en: "Start Date", "zh-MO": "開始日期", _appCode: "framework" },
|
|
1446
1522
|
结束日期: { "zh-CN": "结束日期", en: "End Date", "zh-MO": "結束日期", _appCode: "framework" },
|
|
1447
1523
|
开始时间: { "zh-CN": "开始时间", en: "Start Time", "zh-MO": "開始時間", _appCode: "framework" },
|
|
@@ -1449,13 +1525,13 @@ const Ye = {
|
|
|
1449
1525
|
请选择日期: { "zh-CN": "请选择日期", en: "Please select a date", "zh-MO": "請選擇日期", _appCode: "framework" },
|
|
1450
1526
|
请选择时间: { "zh-CN": "请选择时间", en: "Please select the time", "zh-MO": "請選擇時間", _appCode: "framework" }
|
|
1451
1527
|
};
|
|
1452
|
-
|
|
1453
|
-
const
|
|
1528
|
+
Tt(Gt);
|
|
1529
|
+
const yr = Ae(xt), kr = Ae(It), br = Ae(Rt), gr = Ae(jt), Tr = Ae(Xt), wr = { name: "datePicker 日期时间选择器" };
|
|
1454
1530
|
export {
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1531
|
+
yr as DasDatePicker,
|
|
1532
|
+
kr as DasDateRangePicker,
|
|
1533
|
+
br as DasRangePicker,
|
|
1534
|
+
gr as DasTimePicker,
|
|
1535
|
+
Tr as DasTimeRangePicker,
|
|
1536
|
+
wr as default
|
|
1461
1537
|
};
|