@das-fed/upf-ui 6.4.0-dev.282 → 6.4.0-dev.283
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.
|
@@ -1,31 +1,31 @@
|
|
|
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 D, loadLocale as
|
|
11
|
-
import { calcTextWidth as
|
|
1
|
+
import { withInstall as ve } from "@das-fed/upf-utils/with-install/index";
|
|
2
|
+
import { defineComponent as pe, useCssVars as fe, ref as n, watch as j, computed as i, openBlock as f, createElementBlock as z, normalizeClass as ke, unref as o, normalizeStyle as G, createVNode as $, withCtx as p, withDirectives as me, createBlock as Y, mergeProps as se, isRef as $e, createSlots as Ve, renderSlot as C, normalizeProps as ge, guardReactiveProps as we, createElementVNode as V, toDisplayString as q, Fragment as ue, createCommentVNode as g, nextTick as te, useAttrs as Be, createTextVNode as Le, renderList as De, withModifiers as Re } from "vue";
|
|
3
|
+
import { ConfigProvider as Te, DatePicker as Ne, RangePicker as We, Dropdown as Ze, Menu as Ae, MenuItem as Fe, TimePicker as Oe, TimeRangePicker as qe } from "ant-design-vue";
|
|
4
|
+
import { DasAutoRegisterIcon as Ce, DasIcon as re } 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 he } from "@das-fed/upf-ui/packages/components/error-overlay-model/index";
|
|
7
|
+
import { useModelValue as J } from "@das-fed/upf-utils/vue";
|
|
8
|
+
import { vHoverInside as ye } from "@das-fed/upf-utils/directive/hoverInside/index";
|
|
9
|
+
import { useZIndex as Ie } from "@das-fed/upf-utils/hooks/popup-manager/use-zindex";
|
|
10
|
+
import { currentLang as D, loadLocale as ze, t as ie, setI18nRule as Ue } from "@das-fed/upf-web/packages/i18n/index";
|
|
11
|
+
import { calcTextWidth as Se } from "@das-fed/upf-utils/common-tools";
|
|
12
12
|
import "ant-design-vue/es/date-picker/style/css";
|
|
13
13
|
import "ant-design-vue/es/config-provider/style/css";
|
|
14
|
-
import { DasDatePicker as
|
|
14
|
+
import { DasDatePicker as Pe } from "@das-fed/upf-ui/packages/components/date-picker/index";
|
|
15
15
|
import Ee from "dayjs";
|
|
16
16
|
import "ant-design-vue/es/dropdown/style/css";
|
|
17
17
|
import "ant-design-vue/es/menu/style/css";
|
|
18
|
-
import { DasIconDengdai as
|
|
18
|
+
import { DasIconDengdai as He } from "@das-fed/upf-ui/packages/icons/dengdai/index";
|
|
19
19
|
import "ant-design-vue/es/time-picker/style/css"
|
|
20
20
|
import '@das-fed/upf-ui/packages/components/date-picker/style.css';
|
|
21
21
|
;
|
|
22
|
-
const
|
|
22
|
+
const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "das-date-picker-error-label-content"
|
|
25
|
-
},
|
|
25
|
+
}, Ye = {
|
|
26
26
|
name: "DasDatePicker"
|
|
27
|
-
},
|
|
28
|
-
...
|
|
27
|
+
}, Xe = /* @__PURE__ */ pe({
|
|
28
|
+
...Ye,
|
|
29
29
|
props: {
|
|
30
30
|
modelValue: {},
|
|
31
31
|
borderType: { default: "bordered" },
|
|
@@ -47,179 +47,179 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
47
47
|
formSize: {}
|
|
48
48
|
},
|
|
49
49
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
50
|
-
setup(
|
|
51
|
-
|
|
52
|
-
v2171409d:
|
|
53
|
-
v1a304da0:
|
|
50
|
+
setup(l, { expose: K, emit: c }) {
|
|
51
|
+
fe((r) => ({
|
|
52
|
+
v2171409d: Q.value,
|
|
53
|
+
v1a304da0: U.value
|
|
54
54
|
}));
|
|
55
|
-
const
|
|
56
|
-
|
|
55
|
+
const t = l, m = c;
|
|
56
|
+
Ce({
|
|
57
57
|
right: import("@das-fed/upf-ui/packages/icons/right"),
|
|
58
58
|
left: import("@das-fed/upf-ui/packages/icons/left"),
|
|
59
59
|
"double-arrow-left": import("@das-fed/upf-ui/packages/icons/double-arrow-left"),
|
|
60
60
|
"double-arrow-right": import("@das-fed/upf-ui/packages/icons/double-arrow-right"),
|
|
61
61
|
riqixuanze: import("@das-fed/upf-ui/packages/icons/riqixuanze")
|
|
62
62
|
});
|
|
63
|
-
const P =
|
|
64
|
-
|
|
65
|
-
P.value = await
|
|
63
|
+
const P = n(void 0);
|
|
64
|
+
j(D, async () => {
|
|
65
|
+
P.value = await ze(D.value);
|
|
66
66
|
}, { immediate: !0 });
|
|
67
|
-
const
|
|
68
|
-
width:
|
|
69
|
-
})),
|
|
67
|
+
const h = i(() => `date-picker-${D.value}`), v = n(null), N = n(null), T = i(() => t.size === "table" || t.size === "middle" || t.size === "default" ? "middle" : t.size), b = J(t, "modelValue"), W = J(t, "error"), E = i(() => t.isView ? t.noSetDefaultVal ? "" : "-" : t.placeholder || ie("请选择日期")), Z = i(() => ({
|
|
68
|
+
width: t.width
|
|
69
|
+
})), Q = i(() => t.width ? t.width : "230px"), A = i(() => t.formSize), U = i(() => t.height ? t.height : A.value ? {
|
|
70
70
|
small: "24px",
|
|
71
71
|
default: "32px",
|
|
72
72
|
large: "40px"
|
|
73
|
-
}[
|
|
74
|
-
"z-index":
|
|
75
|
-
})),
|
|
73
|
+
}[A.value] : "auto"), B = n(3e3), F = i(() => ({
|
|
74
|
+
"z-index": B.value
|
|
75
|
+
})), M = n(!1), X = n({
|
|
76
76
|
display: "block",
|
|
77
77
|
color: "var(--upf-color-error)",
|
|
78
78
|
"white-space": "break-spaces"
|
|
79
|
-
}),
|
|
80
|
-
const
|
|
81
|
-
return
|
|
82
|
-
},
|
|
79
|
+
}), y = n(!1), L = n(""), H = i(() => b.value ? L.value : E.value), _ = () => {
|
|
80
|
+
const r = t.size === "table" ? 12 : 14;
|
|
81
|
+
return Se(E.value, r);
|
|
82
|
+
}, u = () => {
|
|
83
83
|
var a;
|
|
84
|
-
const
|
|
85
|
-
return
|
|
86
|
-
},
|
|
87
|
-
var
|
|
88
|
-
const
|
|
89
|
-
return
|
|
90
|
-
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
const r = (a = v.value) == null ? void 0 : a.$el.querySelector(".ant-picker-input>input");
|
|
85
|
+
return b.value ? r == null ? void 0 : r.scrollWidth : _();
|
|
86
|
+
}, s = () => {
|
|
87
|
+
var e;
|
|
88
|
+
const r = (e = v.value) == null ? void 0 : e.$el.querySelector(".ant-picker-input>input");
|
|
89
|
+
return r ? (L.value = r.getAttribute("value"), r.removeAttribute("title"), (r == null ? void 0 : r.offsetWidth) ?? 0) : 0;
|
|
90
|
+
}, k = n(0), S = n(0);
|
|
91
|
+
j(() => [E.value, b.value], () => {
|
|
92
|
+
te(() => {
|
|
93
|
+
k.value = s(), S.value = u(), (k.value === S.value || S.value - k.value < 1) && (y.value = !1);
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
|
-
const
|
|
97
|
-
|
|
96
|
+
const ee = n();
|
|
97
|
+
j(
|
|
98
98
|
() => {
|
|
99
|
-
var
|
|
100
|
-
return (
|
|
99
|
+
var r;
|
|
100
|
+
return (r = N.value) == null ? void 0 : r.$tooltipRef.popperRef.contentRef;
|
|
101
101
|
},
|
|
102
|
-
(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}),
|
|
106
|
-
|
|
107
|
-
|
|
102
|
+
(r) => {
|
|
103
|
+
r && (r.addEventListener("mouseenter", function() {
|
|
104
|
+
y.value = !0, ee.value && clearTimeout(ee.value);
|
|
105
|
+
}), r.addEventListener("mouseleave", function() {
|
|
106
|
+
ee.value = setTimeout(() => {
|
|
107
|
+
y.value = !1;
|
|
108
108
|
}, 200);
|
|
109
109
|
}));
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
|
-
const
|
|
113
|
-
|
|
112
|
+
const x = (r) => {
|
|
113
|
+
r && (B.value = Ie().nextZIndex()), m("openChange", r), D.value === "en-US" && te(() => {
|
|
114
114
|
const a = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
115
|
-
for (let
|
|
116
|
-
|
|
115
|
+
for (let e of a)
|
|
116
|
+
e && (e.innerText = "OK");
|
|
117
117
|
});
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}, 200),
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
W.value = !1,
|
|
118
|
+
}, le = () => {
|
|
119
|
+
k.value = s(), S.value = u(), k.value === S.value || S.value - k.value < 1 ? y.value = !1 : (y.value = !0, ee.value && clearTimeout(ee.value)), M.value = !0;
|
|
120
|
+
}, ae = () => {
|
|
121
|
+
ee.value = setTimeout(() => {
|
|
122
|
+
y.value = !1;
|
|
123
|
+
}, 200), M.value = !1;
|
|
124
|
+
}, oe = (r, a) => {
|
|
125
|
+
r ? le() : ae();
|
|
126
|
+
}, ne = (r, a) => {
|
|
127
|
+
W.value = !1, m("update:error", W.value), m("update:model-value", r), m("change", r, a);
|
|
128
128
|
};
|
|
129
|
-
return
|
|
130
|
-
$datePicker:
|
|
129
|
+
return K({
|
|
130
|
+
$datePicker: v,
|
|
131
131
|
blur: () => {
|
|
132
|
-
|
|
132
|
+
v.value.blur();
|
|
133
133
|
},
|
|
134
134
|
focus: () => {
|
|
135
|
-
|
|
135
|
+
v.value.focus();
|
|
136
136
|
}
|
|
137
|
-
}), (
|
|
137
|
+
}), (r, a) => (f(), z(
|
|
138
138
|
"div",
|
|
139
139
|
{
|
|
140
|
-
class:
|
|
141
|
-
style:
|
|
140
|
+
class: ke(["das-ui-date-picker", [l.borderType, t.isView ? "readonly" : "", o(W) ? "is-error" : ""]]),
|
|
141
|
+
style: G(Z.value)
|
|
142
142
|
},
|
|
143
143
|
[
|
|
144
|
-
|
|
145
|
-
default:
|
|
146
|
-
|
|
144
|
+
$(o(Te), { locale: P.value }, {
|
|
145
|
+
default: p(() => [
|
|
146
|
+
$(o(xe), {
|
|
147
147
|
ref_key: "inputTooltipRef",
|
|
148
148
|
ref: N,
|
|
149
149
|
placement: "top",
|
|
150
150
|
trigger: "hover",
|
|
151
|
-
visible:
|
|
152
|
-
disabled: !
|
|
151
|
+
visible: y.value,
|
|
152
|
+
disabled: !l.isTooltip,
|
|
153
153
|
content: H.value
|
|
154
154
|
}, {
|
|
155
|
-
default:
|
|
156
|
-
var
|
|
155
|
+
default: p(() => {
|
|
156
|
+
var e;
|
|
157
157
|
return [
|
|
158
|
-
|
|
159
|
-
key:
|
|
158
|
+
me((f(), Y(o(Ne), se({
|
|
159
|
+
key: h.value,
|
|
160
160
|
ref_key: "$datePicker",
|
|
161
|
-
ref:
|
|
162
|
-
},
|
|
163
|
-
value:
|
|
164
|
-
"onUpdate:value": a[0] || (a[0] = (
|
|
165
|
-
size:
|
|
166
|
-
locale: (
|
|
167
|
-
dropdownClassName: "das-ui-date-picker-dropdown " +
|
|
168
|
-
placeholder:
|
|
169
|
-
showToday:
|
|
170
|
-
bordered:
|
|
171
|
-
disabled:
|
|
172
|
-
style:
|
|
173
|
-
popupStyle:
|
|
174
|
-
onChange:
|
|
175
|
-
onOpenChange:
|
|
176
|
-
}),
|
|
177
|
-
dateRender:
|
|
178
|
-
|
|
179
|
-
|
|
161
|
+
ref: v
|
|
162
|
+
}, r.$attrs, {
|
|
163
|
+
value: o(b),
|
|
164
|
+
"onUpdate:value": a[0] || (a[0] = (d) => $e(b) ? b.value = d : null),
|
|
165
|
+
size: T.value,
|
|
166
|
+
locale: (e = P.value) == null ? void 0 : e.DatePicker,
|
|
167
|
+
dropdownClassName: "das-ui-date-picker-dropdown " + l.dropdownClassName,
|
|
168
|
+
placeholder: E.value,
|
|
169
|
+
showToday: l.showToday,
|
|
170
|
+
bordered: l.borderType === "bordered",
|
|
171
|
+
disabled: t.disabled || t.isView,
|
|
172
|
+
style: Z.value,
|
|
173
|
+
popupStyle: F.value,
|
|
174
|
+
onChange: ne,
|
|
175
|
+
onOpenChange: x
|
|
176
|
+
}), Ve({
|
|
177
|
+
dateRender: p((d) => [
|
|
178
|
+
C(r.$slots, "dateRender", ge(we(d)), () => [
|
|
179
|
+
V(
|
|
180
180
|
"div",
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
je,
|
|
182
|
+
q(d.current.date()),
|
|
183
183
|
1
|
|
184
184
|
/* TEXT */
|
|
185
185
|
)
|
|
186
186
|
], !0)
|
|
187
187
|
]),
|
|
188
|
-
nextIcon:
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
nextIcon: p(() => [
|
|
189
|
+
C(r.$slots, "nextIcon", {}, () => [
|
|
190
|
+
$(o(re), {
|
|
191
191
|
icon: "right",
|
|
192
192
|
size: "medium"
|
|
193
193
|
})
|
|
194
194
|
], !0)
|
|
195
195
|
]),
|
|
196
|
-
prevIcon:
|
|
197
|
-
|
|
198
|
-
|
|
196
|
+
prevIcon: p(() => [
|
|
197
|
+
C(r.$slots, "prevIcon", {}, () => [
|
|
198
|
+
$(o(re), {
|
|
199
199
|
icon: "left",
|
|
200
200
|
size: "medium"
|
|
201
201
|
})
|
|
202
202
|
], !0)
|
|
203
203
|
]),
|
|
204
|
-
superNextIcon:
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
superNextIcon: p(() => [
|
|
205
|
+
C(r.$slots, "superNextIcon", {}, () => [
|
|
206
|
+
$(o(re), {
|
|
207
207
|
icon: "double-arrow-right",
|
|
208
208
|
size: "medium"
|
|
209
209
|
})
|
|
210
210
|
], !0)
|
|
211
211
|
]),
|
|
212
|
-
superPrevIcon:
|
|
213
|
-
|
|
214
|
-
|
|
212
|
+
superPrevIcon: p(() => [
|
|
213
|
+
C(r.$slots, "superPrevIcon", {}, () => [
|
|
214
|
+
$(o(re), {
|
|
215
215
|
icon: "double-arrow-left",
|
|
216
216
|
size: "medium"
|
|
217
217
|
})
|
|
218
218
|
], !0)
|
|
219
219
|
]),
|
|
220
|
-
suffixIcon:
|
|
221
|
-
|
|
222
|
-
|
|
220
|
+
suffixIcon: p(() => [
|
|
221
|
+
C(r.$slots, "suffixIcon", {}, () => [
|
|
222
|
+
$(o(re), {
|
|
223
223
|
class: "das-suffix-icon",
|
|
224
224
|
icon: "riqixuanze",
|
|
225
225
|
size: "medium"
|
|
@@ -229,15 +229,15 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
229
229
|
_: 2
|
|
230
230
|
/* DYNAMIC */
|
|
231
231
|
}, [
|
|
232
|
-
|
|
232
|
+
r.$slots.renderExtraFooter ? {
|
|
233
233
|
name: "renderExtraFooter",
|
|
234
|
-
fn:
|
|
235
|
-
|
|
234
|
+
fn: p(() => [
|
|
235
|
+
C(r.$slots, "renderExtraFooter", {}, void 0, !0)
|
|
236
236
|
]),
|
|
237
237
|
key: "0"
|
|
238
238
|
} : void 0
|
|
239
239
|
]), 1040, ["value", "size", "locale", "dropdownClassName", "placeholder", "showToday", "bordered", "disabled", "style", "popupStyle"])), [
|
|
240
|
-
[
|
|
240
|
+
[o(ye), oe]
|
|
241
241
|
])
|
|
242
242
|
];
|
|
243
243
|
}),
|
|
@@ -248,51 +248,51 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
248
248
|
_: 3
|
|
249
249
|
/* FORWARDED */
|
|
250
250
|
}, 8, ["locale"]),
|
|
251
|
-
|
|
252
|
-
|
|
251
|
+
l.error && l.errorLabel ? (f(), z(
|
|
252
|
+
ue,
|
|
253
253
|
{ key: 0 },
|
|
254
254
|
[
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
l.errorMode === "default" ? (f(), z("div", Ke, [
|
|
256
|
+
V(
|
|
257
257
|
"span",
|
|
258
258
|
{
|
|
259
|
-
style:
|
|
259
|
+
style: G(X.value)
|
|
260
260
|
},
|
|
261
|
-
|
|
261
|
+
q(l.errorLabel),
|
|
262
262
|
5
|
|
263
263
|
/* TEXT, STYLE */
|
|
264
264
|
)
|
|
265
|
-
])) :
|
|
266
|
-
|
|
265
|
+
])) : g("v-if", !0),
|
|
266
|
+
l.errorMode === "overlay" && M.value ? (f(), Y(o(he), {
|
|
267
267
|
key: 1,
|
|
268
|
-
errorLabel:
|
|
268
|
+
errorLabel: l.errorLabel,
|
|
269
269
|
getEl: () => {
|
|
270
|
-
var
|
|
271
|
-
return (
|
|
270
|
+
var e;
|
|
271
|
+
return (e = v.value) == null ? void 0 : e.$el;
|
|
272
272
|
},
|
|
273
|
-
errorModelZIndex:
|
|
274
|
-
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) :
|
|
273
|
+
errorModelZIndex: l.errorModelZIndex
|
|
274
|
+
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : g("v-if", !0)
|
|
275
275
|
],
|
|
276
276
|
64
|
|
277
277
|
/* STABLE_FRAGMENT */
|
|
278
|
-
)) :
|
|
278
|
+
)) : g("v-if", !0)
|
|
279
279
|
],
|
|
280
280
|
6
|
|
281
281
|
/* CLASS, STYLE */
|
|
282
282
|
));
|
|
283
283
|
}
|
|
284
|
-
}),
|
|
285
|
-
const
|
|
286
|
-
for (const [
|
|
287
|
-
|
|
288
|
-
return
|
|
289
|
-
},
|
|
284
|
+
}), be = (l, K) => {
|
|
285
|
+
const c = l.__vccOpts || l;
|
|
286
|
+
for (const [t, m] of K)
|
|
287
|
+
c[t] = m;
|
|
288
|
+
return c;
|
|
289
|
+
}, Ge = /* @__PURE__ */ be(Xe, [["__scopeId", "data-v-f95c11f8"]]), Je = { class: "date-range-separator" }, Qe = {
|
|
290
290
|
key: 0,
|
|
291
291
|
class: "das-date-picker-error-label-content"
|
|
292
|
-
},
|
|
292
|
+
}, _e = {
|
|
293
293
|
name: "DasDateRangePicker"
|
|
294
|
-
},
|
|
295
|
-
...
|
|
294
|
+
}, et = /* @__PURE__ */ pe({
|
|
295
|
+
..._e,
|
|
296
296
|
props: {
|
|
297
297
|
modelValue: {},
|
|
298
298
|
borderType: { default: "bordered" },
|
|
@@ -318,126 +318,126 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
318
318
|
formSize: {}
|
|
319
319
|
},
|
|
320
320
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
321
|
-
setup(
|
|
322
|
-
|
|
323
|
-
v11f9697a:
|
|
321
|
+
setup(l, { emit: K }) {
|
|
322
|
+
fe((u) => ({
|
|
323
|
+
v11f9697a: T.value,
|
|
324
324
|
v0db101da: N.value
|
|
325
325
|
}));
|
|
326
|
-
const
|
|
326
|
+
const c = l, t = K, m = Be(), P = i(() => c.placeholder ?? [ie("开始日期"), ie("结束日期")]), h = J(c, "modelValue"), v = J(c, "error"), N = i(() => c.width ? c.width : "230px"), T = i(() => c.height ? c.height : "auto"), b = i(() => ({ ...m, ...c.prevAttrs })), W = i(() => ({ ...m, ...c.nextAttrs })), E = n(), Z = n(!1), Q = n({
|
|
327
327
|
display: "block",
|
|
328
328
|
color: "var(--upf-color-error)",
|
|
329
329
|
"white-space": "break-spaces"
|
|
330
|
-
}),
|
|
331
|
-
|
|
332
|
-
},
|
|
333
|
-
|
|
334
|
-
},
|
|
335
|
-
|
|
336
|
-
},
|
|
337
|
-
|
|
338
|
-
const
|
|
339
|
-
for (let
|
|
340
|
-
|
|
330
|
+
}), A = () => {
|
|
331
|
+
Z.value = !0;
|
|
332
|
+
}, U = () => {
|
|
333
|
+
Z.value = !1;
|
|
334
|
+
}, B = (u, s) => {
|
|
335
|
+
u ? A() : U();
|
|
336
|
+
}, F = (u, s) => {
|
|
337
|
+
t("openChange", u, s), D.value === "en-US" && te(() => {
|
|
338
|
+
const k = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
339
|
+
for (let S of k)
|
|
340
|
+
S && (S.innerText = "OK");
|
|
341
341
|
});
|
|
342
|
-
},
|
|
343
|
-
let
|
|
342
|
+
}, M = i(() => {
|
|
343
|
+
let u = c.valueFormat ? c.valueFormat : c.format;
|
|
344
344
|
return [
|
|
345
|
-
|
|
346
|
-
|
|
345
|
+
h.value[0] ? Ee.isDayjs(h.value[0]) ? h.value[0].format(u) : h.value[0] : "",
|
|
346
|
+
h.value[1] ? Ee.isDayjs(h.value[1]) ? h.value[1].format(u) : h.value[1] : ""
|
|
347
347
|
];
|
|
348
|
-
}),
|
|
349
|
-
width:
|
|
350
|
-
})), H = (
|
|
351
|
-
|
|
352
|
-
},
|
|
353
|
-
|
|
348
|
+
}), X = (u) => c.disabledDate && c.disabledDate(u) === !0 ? !0 : !!(h.value[1] && u.isAfter(h.value[1], c.disabledUnit || void 0)), y = (u) => c.disabledDate && c.disabledDate(u) === !0 ? !0 : !!(h.value[0] && u.isBefore(h.value[0], c.disabledUnit || void 0)), L = i(() => ({
|
|
349
|
+
width: c.width
|
|
350
|
+
})), H = (u, s) => {
|
|
351
|
+
v.value = !1, t("update:model-value", h.value), t("change", h.value, M.value);
|
|
352
|
+
}, _ = (u, s) => {
|
|
353
|
+
v.value = !1, t("update:model-value", h.value), t("change", h.value, M.value);
|
|
354
354
|
};
|
|
355
|
-
return (
|
|
355
|
+
return (u, s) => me((f(), z(
|
|
356
356
|
"div",
|
|
357
357
|
{
|
|
358
358
|
class: "das-ui-date-range-picker",
|
|
359
|
-
style:
|
|
359
|
+
style: G(L.value),
|
|
360
360
|
ref_key: "$dateRange",
|
|
361
|
-
ref:
|
|
361
|
+
ref: E
|
|
362
362
|
},
|
|
363
363
|
[
|
|
364
|
-
|
|
365
|
-
modelValue:
|
|
366
|
-
"onUpdate:modelValue":
|
|
367
|
-
size:
|
|
368
|
-
valueFormat:
|
|
369
|
-
borderType:
|
|
370
|
-
error:
|
|
371
|
-
width:
|
|
372
|
-
"disabled-date":
|
|
364
|
+
$(o(Pe), se(b.value, {
|
|
365
|
+
modelValue: o(h)[0],
|
|
366
|
+
"onUpdate:modelValue": s[0] || (s[0] = (k) => o(h)[0] = k),
|
|
367
|
+
size: c.size,
|
|
368
|
+
valueFormat: c.valueFormat,
|
|
369
|
+
borderType: c.borderType,
|
|
370
|
+
error: o(v),
|
|
371
|
+
width: c.itemWidth,
|
|
372
|
+
"disabled-date": X,
|
|
373
373
|
placeholder: P.value[0],
|
|
374
374
|
onChange: H,
|
|
375
|
-
onOpenChange:
|
|
375
|
+
onOpenChange: s[1] || (s[1] = (k) => F(k, "before"))
|
|
376
376
|
}), null, 16, ["modelValue", "size", "valueFormat", "borderType", "error", "width", "placeholder"]),
|
|
377
|
-
|
|
378
|
-
|
|
377
|
+
C(u.$slots, "separator", {}, () => [
|
|
378
|
+
V(
|
|
379
379
|
"span",
|
|
380
|
-
|
|
381
|
-
|
|
380
|
+
Je,
|
|
381
|
+
q(c.separator),
|
|
382
382
|
1
|
|
383
383
|
/* TEXT */
|
|
384
384
|
)
|
|
385
385
|
], !0),
|
|
386
|
-
|
|
387
|
-
modelValue:
|
|
388
|
-
"onUpdate:modelValue":
|
|
389
|
-
size:
|
|
390
|
-
valueFormat:
|
|
391
|
-
borderType:
|
|
392
|
-
error:
|
|
393
|
-
width:
|
|
394
|
-
"disabled-date":
|
|
386
|
+
$(o(Pe), se(W.value, {
|
|
387
|
+
modelValue: o(h)[1],
|
|
388
|
+
"onUpdate:modelValue": s[2] || (s[2] = (k) => o(h)[1] = k),
|
|
389
|
+
size: c.size,
|
|
390
|
+
valueFormat: c.valueFormat,
|
|
391
|
+
borderType: c.borderType,
|
|
392
|
+
error: o(v),
|
|
393
|
+
width: c.itemWidth,
|
|
394
|
+
"disabled-date": y,
|
|
395
395
|
placeholder: P.value[1],
|
|
396
|
-
onChange:
|
|
397
|
-
onOpenChange:
|
|
396
|
+
onChange: _,
|
|
397
|
+
onOpenChange: s[3] || (s[3] = (k) => F(k, "after"))
|
|
398
398
|
}), null, 16, ["modelValue", "size", "valueFormat", "borderType", "error", "width", "placeholder"]),
|
|
399
|
-
|
|
400
|
-
|
|
399
|
+
l.error && l.errorLabel ? (f(), z(
|
|
400
|
+
ue,
|
|
401
401
|
{ key: 0 },
|
|
402
402
|
[
|
|
403
|
-
|
|
404
|
-
|
|
403
|
+
l.errorMode === "default" ? (f(), z("div", Qe, [
|
|
404
|
+
V(
|
|
405
405
|
"span",
|
|
406
406
|
{
|
|
407
|
-
style:
|
|
407
|
+
style: G(Q.value)
|
|
408
408
|
},
|
|
409
|
-
|
|
409
|
+
q(l.errorLabel),
|
|
410
410
|
5
|
|
411
411
|
/* TEXT, STYLE */
|
|
412
412
|
)
|
|
413
|
-
])) :
|
|
414
|
-
|
|
413
|
+
])) : g("v-if", !0),
|
|
414
|
+
l.errorMode === "overlay" && Z.value ? (f(), Y(o(he), {
|
|
415
415
|
key: 1,
|
|
416
|
-
errorLabel:
|
|
417
|
-
getEl: () =>
|
|
418
|
-
errorModelZIndex:
|
|
419
|
-
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) :
|
|
416
|
+
errorLabel: l.errorLabel,
|
|
417
|
+
getEl: () => E.value,
|
|
418
|
+
errorModelZIndex: l.errorModelZIndex
|
|
419
|
+
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : g("v-if", !0)
|
|
420
420
|
],
|
|
421
421
|
64
|
|
422
422
|
/* STABLE_FRAGMENT */
|
|
423
|
-
)) :
|
|
423
|
+
)) : g("v-if", !0)
|
|
424
424
|
],
|
|
425
425
|
4
|
|
426
426
|
/* STYLE */
|
|
427
427
|
)), [
|
|
428
|
-
[
|
|
428
|
+
[o(ye), B]
|
|
429
429
|
]);
|
|
430
430
|
}
|
|
431
|
-
}),
|
|
431
|
+
}), tt = /* @__PURE__ */ be(et, [["__scopeId", "data-v-9599ec25"]]), rt = { class: "ant-picker-cell-inner" }, lt = { class: "das-picker-footer-extra" }, at = {
|
|
432
432
|
key: 0,
|
|
433
433
|
class: "das-picker-ranges"
|
|
434
|
-
},
|
|
434
|
+
}, ot = { class: "das-picker-preset-span" }, nt = ["onClick"], ut = {
|
|
435
435
|
key: 0,
|
|
436
436
|
class: "das-date-picker-error-label-content"
|
|
437
|
-
},
|
|
437
|
+
}, st = {
|
|
438
438
|
name: "DasRangePicker"
|
|
439
|
-
},
|
|
440
|
-
...
|
|
439
|
+
}, it = /* @__PURE__ */ pe({
|
|
440
|
+
...st,
|
|
441
441
|
props: {
|
|
442
442
|
modelValue: {},
|
|
443
443
|
borderType: { default: "bordered" },
|
|
@@ -463,202 +463,201 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
463
463
|
formSize: {}
|
|
464
464
|
},
|
|
465
465
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
466
|
-
setup(
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
466
|
+
setup(l, { expose: K, emit: c }) {
|
|
467
|
+
fe((e) => ({
|
|
468
|
+
v0c181892: E.value,
|
|
469
|
+
v2abb8956: Q.value
|
|
470
470
|
}));
|
|
471
|
-
const
|
|
472
|
-
|
|
471
|
+
const t = l, m = c;
|
|
472
|
+
Ce({
|
|
473
473
|
fold: import("@das-fed/upf-ui/packages/icons/fold"),
|
|
474
474
|
riqixuanze: import("@das-fed/upf-ui/packages/icons/riqixuanze")
|
|
475
475
|
});
|
|
476
|
-
const P =
|
|
477
|
-
|
|
478
|
-
P.value = await
|
|
476
|
+
const P = n(void 0);
|
|
477
|
+
j(D, async () => {
|
|
478
|
+
P.value = await ze(D.value);
|
|
479
479
|
}, { immediate: !0 });
|
|
480
|
-
const
|
|
480
|
+
const h = i(() => `range-picker-${D.value}`), v = n(null), N = n(null), T = i(() => t.size === "table" || t.size === "middle" || t.size === "default" ? "middle" : t.size), b = J(t, "modelValue"), W = J(t, "error"), E = i(() => t.width ? t.width : "230px"), Z = i(() => t.formSize), Q = i(() => t.height ? t.height : Z.value ? {
|
|
481
481
|
small: "24px",
|
|
482
482
|
default: "32px",
|
|
483
483
|
large: "40px"
|
|
484
|
-
}[
|
|
484
|
+
}[Z.value] : "auto"), A = n(3e3), U = i(() => ({
|
|
485
485
|
"z-index": A.value
|
|
486
|
-
})), B =
|
|
486
|
+
})), B = n(!1), F = n({
|
|
487
487
|
display: "block",
|
|
488
488
|
color: "var(--upf-color-error)",
|
|
489
489
|
"white-space": "break-spaces"
|
|
490
|
-
}),
|
|
491
|
-
var
|
|
492
|
-
return
|
|
493
|
-
}),
|
|
494
|
-
width:
|
|
495
|
-
})),
|
|
496
|
-
var
|
|
497
|
-
return (
|
|
498
|
-
}),
|
|
499
|
-
var
|
|
500
|
-
let
|
|
501
|
-
const
|
|
502
|
-
if (!
|
|
503
|
-
return
|
|
504
|
-
let
|
|
505
|
-
for (let
|
|
506
|
-
|
|
507
|
-
let
|
|
508
|
-
|
|
490
|
+
}), M = i(() => {
|
|
491
|
+
var e;
|
|
492
|
+
return t.isView ? t.noSetDefaultVal ? ["", ""] : ["-", "-"] : (e = t.placeholder) == null ? void 0 : e.map((d) => ie(d));
|
|
493
|
+
}), X = i(() => ({
|
|
494
|
+
width: t.width
|
|
495
|
+
})), y = n(!1), L = n(["", ""]), H = n("~"), _ = i(() => {
|
|
496
|
+
var e;
|
|
497
|
+
return (e = b.value) != null && e.length && b.value[0] && b.value[1] ? L.value.join(" " + H.value + " ") : M.value.join(" " + H.value + " ");
|
|
498
|
+
}), u = n([0, 0]), s = n([0, 0]), k = () => {
|
|
499
|
+
var w;
|
|
500
|
+
let e = [];
|
|
501
|
+
const d = (w = v.value) == null ? void 0 : w.$el.querySelectorAll(".ant-picker-input>input");
|
|
502
|
+
if (!d)
|
|
503
|
+
return e = [0, 0], e;
|
|
504
|
+
let I = [];
|
|
505
|
+
for (let R of d) {
|
|
506
|
+
I.push(R.getAttribute("value") || "");
|
|
507
|
+
let Me = (R == null ? void 0 : R.offsetWidth) ?? 0;
|
|
508
|
+
e.push(Me);
|
|
509
509
|
}
|
|
510
|
-
return
|
|
511
|
-
},
|
|
512
|
-
const
|
|
513
|
-
return
|
|
514
|
-
},
|
|
515
|
-
var
|
|
516
|
-
let
|
|
517
|
-
return ((
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
}), l;
|
|
510
|
+
return L.value = I, e;
|
|
511
|
+
}, S = (e) => {
|
|
512
|
+
const d = t.size === "table" ? 12 : 14;
|
|
513
|
+
return Se(e, d);
|
|
514
|
+
}, O = () => {
|
|
515
|
+
var I;
|
|
516
|
+
let e = [];
|
|
517
|
+
return ((I = v.value) == null ? void 0 : I.$el.querySelectorAll(".ant-picker-input>input")).forEach((w, R) => {
|
|
518
|
+
b.value.length && b.value[0] && b.value[0] ? e.push(w == null ? void 0 : w.scrollWidth) : e.push(S(M.value[R]));
|
|
519
|
+
}), e;
|
|
521
520
|
};
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
521
|
+
j(() => [M.value, b.value], () => {
|
|
522
|
+
te(() => {
|
|
523
|
+
u.value = k(), s.value = O(), (u.value[0] === s.value[0] || s.value[0] - u.value[0] < 1) && (u.value[1] === s.value[1] || s.value[1] - u.value[1] < 1) && (y.value = !1);
|
|
525
524
|
});
|
|
526
525
|
});
|
|
527
|
-
const
|
|
528
|
-
|
|
526
|
+
const x = n();
|
|
527
|
+
j(
|
|
529
528
|
() => {
|
|
530
|
-
var
|
|
531
|
-
return (
|
|
529
|
+
var e;
|
|
530
|
+
return (e = N.value) == null ? void 0 : e.$tooltipRef.popperRef.contentRef;
|
|
532
531
|
},
|
|
533
|
-
(
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
}),
|
|
537
|
-
|
|
538
|
-
|
|
532
|
+
(e) => {
|
|
533
|
+
e && (e.addEventListener("mouseenter", function() {
|
|
534
|
+
y.value = !0, x.value && clearTimeout(x.value);
|
|
535
|
+
}), e.addEventListener("mouseleave", function() {
|
|
536
|
+
x.value = setTimeout(() => {
|
|
537
|
+
y.value = !1;
|
|
539
538
|
}, 200);
|
|
540
539
|
}));
|
|
541
540
|
}
|
|
542
541
|
);
|
|
543
|
-
const
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
for (let
|
|
547
|
-
|
|
542
|
+
const le = (e) => {
|
|
543
|
+
e && (A.value = Ie().nextZIndex()), m("openChange", e), D.value === "en-US" && te(() => {
|
|
544
|
+
const d = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
545
|
+
for (let I of d)
|
|
546
|
+
I && (I.innerText = "OK");
|
|
548
547
|
});
|
|
549
|
-
},
|
|
550
|
-
|
|
551
|
-
},
|
|
552
|
-
|
|
553
|
-
|
|
548
|
+
}, ae = () => {
|
|
549
|
+
u.value = k(), s.value = O(), (u.value[0] === s.value[0] || s.value[0] - u.value[0] < 1) && (u.value[1] === s.value[1] || s.value[1] - u.value[1] < 1) ? y.value = !1 : (y.value = !0, x.value && clearTimeout(x.value)), B.value = !0;
|
|
550
|
+
}, oe = () => {
|
|
551
|
+
x.value = setTimeout(() => {
|
|
552
|
+
y.value = !1;
|
|
554
553
|
}, 200), B.value = !1;
|
|
555
|
-
},
|
|
556
|
-
|
|
557
|
-
},
|
|
558
|
-
if (W.value = !1,
|
|
559
|
-
|
|
554
|
+
}, ne = (e, d) => {
|
|
555
|
+
e ? ae() : oe();
|
|
556
|
+
}, de = (e, d) => {
|
|
557
|
+
if (W.value = !1, e === null) {
|
|
558
|
+
m("update:model-value", [null, null]), m("change", [null, null], d);
|
|
560
559
|
return;
|
|
561
560
|
}
|
|
562
|
-
|
|
563
|
-
},
|
|
564
|
-
|
|
561
|
+
m("update:error", W.value), m("update:model-value", e), m("change", e, d);
|
|
562
|
+
}, ce = (e) => {
|
|
563
|
+
m("update:model-value", e.value), m("change", e.value, [e.value[0].format(t.format), e.value[1].format(t.format)]), v.value.blur();
|
|
565
564
|
};
|
|
566
|
-
return
|
|
567
|
-
$rangePicker:
|
|
565
|
+
return K({
|
|
566
|
+
$rangePicker: v,
|
|
568
567
|
blur: () => {
|
|
569
|
-
|
|
568
|
+
v.value.blur();
|
|
570
569
|
},
|
|
571
570
|
focus: () => {
|
|
572
|
-
|
|
571
|
+
v.value.focus();
|
|
573
572
|
}
|
|
574
|
-
}), (
|
|
573
|
+
}), (e, d) => (f(), z(
|
|
575
574
|
"div",
|
|
576
575
|
{
|
|
577
|
-
class:
|
|
578
|
-
style:
|
|
576
|
+
class: ke(["das-ui-range-picker", [l.borderType, t.isView ? "readonly" : "", o(W) ? "is-error" : ""]]),
|
|
577
|
+
style: G(X.value)
|
|
579
578
|
},
|
|
580
579
|
[
|
|
581
|
-
|
|
582
|
-
default:
|
|
583
|
-
|
|
580
|
+
$(o(Te), { locale: P.value }, {
|
|
581
|
+
default: p(() => [
|
|
582
|
+
$(o(xe), {
|
|
584
583
|
ref_key: "inputTooltipRef",
|
|
585
584
|
ref: N,
|
|
586
585
|
placement: "top",
|
|
587
586
|
trigger: "hover",
|
|
588
|
-
visible:
|
|
589
|
-
disabled: !
|
|
590
|
-
content:
|
|
587
|
+
visible: y.value,
|
|
588
|
+
disabled: !l.isTooltip,
|
|
589
|
+
content: _.value
|
|
591
590
|
}, {
|
|
592
|
-
default:
|
|
593
|
-
var
|
|
591
|
+
default: p(() => {
|
|
592
|
+
var I;
|
|
594
593
|
return [
|
|
595
|
-
|
|
596
|
-
key:
|
|
594
|
+
me((f(), Y(o(We), se({
|
|
595
|
+
key: h.value,
|
|
597
596
|
ref_key: "$rangePicker",
|
|
598
|
-
ref:
|
|
599
|
-
},
|
|
600
|
-
value:
|
|
601
|
-
size:
|
|
602
|
-
locale: (
|
|
603
|
-
valueFormat:
|
|
604
|
-
dropdownClassName: "das-ui-range-picker-dropdown " +
|
|
605
|
-
placeholder:
|
|
606
|
-
showToday:
|
|
607
|
-
showTime:
|
|
608
|
-
bordered:
|
|
609
|
-
disabled:
|
|
610
|
-
style:
|
|
611
|
-
popupStyle:
|
|
612
|
-
onChange:
|
|
613
|
-
onOpenChange:
|
|
597
|
+
ref: v
|
|
598
|
+
}, e.$attrs, {
|
|
599
|
+
value: o(b),
|
|
600
|
+
size: T.value,
|
|
601
|
+
locale: (I = P.value) == null ? void 0 : I.DatePicker,
|
|
602
|
+
valueFormat: t.valueFormat,
|
|
603
|
+
dropdownClassName: "das-ui-range-picker-dropdown " + l.dropdownClassName,
|
|
604
|
+
placeholder: M.value,
|
|
605
|
+
showToday: l.showToday,
|
|
606
|
+
showTime: l.showTime,
|
|
607
|
+
bordered: l.borderType === "bordered",
|
|
608
|
+
disabled: t.disabled || t.isView,
|
|
609
|
+
style: X.value,
|
|
610
|
+
popupStyle: U.value,
|
|
611
|
+
onChange: de,
|
|
612
|
+
onOpenChange: le
|
|
614
613
|
}), {
|
|
615
|
-
dateRender:
|
|
616
|
-
|
|
617
|
-
|
|
614
|
+
dateRender: p((w) => [
|
|
615
|
+
C(e.$slots, "dateRender", ge(we(w)), () => [
|
|
616
|
+
V(
|
|
618
617
|
"div",
|
|
619
|
-
|
|
620
|
-
|
|
618
|
+
rt,
|
|
619
|
+
q(w.current.date()),
|
|
621
620
|
1
|
|
622
621
|
/* TEXT */
|
|
623
622
|
)
|
|
624
623
|
], !0)
|
|
625
624
|
]),
|
|
626
|
-
nextIcon:
|
|
627
|
-
|
|
628
|
-
|
|
625
|
+
nextIcon: p(() => [
|
|
626
|
+
g(' <slot name="nextIcon"> '),
|
|
627
|
+
d[1] || (d[1] = Le(
|
|
629
628
|
" XX ",
|
|
630
629
|
-1
|
|
631
630
|
/* CACHED */
|
|
632
631
|
)),
|
|
633
|
-
|
|
632
|
+
g(" </slot> ")
|
|
634
633
|
]),
|
|
635
|
-
prevIcon:
|
|
636
|
-
|
|
637
|
-
|
|
634
|
+
prevIcon: p(() => [
|
|
635
|
+
C(e.$slots, "prevIcon", {}, () => [
|
|
636
|
+
g(' <das-icon icon="left"></das-icon> ')
|
|
638
637
|
], !0)
|
|
639
638
|
]),
|
|
640
|
-
superNextIcon:
|
|
641
|
-
|
|
642
|
-
|
|
639
|
+
superNextIcon: p(() => [
|
|
640
|
+
C(e.$slots, "superNextIcon", {}, () => [
|
|
641
|
+
g(' <das-icon icon="double-arrow-right"></das-icon> ')
|
|
643
642
|
], !0)
|
|
644
643
|
]),
|
|
645
|
-
superPrevIcon:
|
|
646
|
-
|
|
647
|
-
|
|
644
|
+
superPrevIcon: p(() => [
|
|
645
|
+
C(e.$slots, "superPrevIcon", {}, () => [
|
|
646
|
+
g(' <das-icon icon="double-arrow-left"></das-icon> ')
|
|
648
647
|
], !0)
|
|
649
648
|
]),
|
|
650
|
-
suffixIcon:
|
|
651
|
-
|
|
652
|
-
|
|
649
|
+
suffixIcon: p(() => [
|
|
650
|
+
C(e.$slots, "suffixIcon", {}, () => [
|
|
651
|
+
$(o(re), {
|
|
653
652
|
class: "das-suffix-icon",
|
|
654
653
|
icon: "riqixuanze",
|
|
655
654
|
size: "medium"
|
|
656
655
|
})
|
|
657
656
|
], !0)
|
|
658
657
|
]),
|
|
659
|
-
separator:
|
|
660
|
-
|
|
661
|
-
|
|
658
|
+
separator: p(() => [
|
|
659
|
+
C(e.$slots, "separator", {}, () => [
|
|
660
|
+
d[2] || (d[2] = V(
|
|
662
661
|
"div",
|
|
663
662
|
{ style: { padding: "0 8px" } },
|
|
664
663
|
"~",
|
|
@@ -667,19 +666,19 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
667
666
|
))
|
|
668
667
|
], !0)
|
|
669
668
|
]),
|
|
670
|
-
renderExtraFooter:
|
|
671
|
-
|
|
672
|
-
|
|
669
|
+
renderExtraFooter: p(() => [
|
|
670
|
+
V("div", lt, [
|
|
671
|
+
C(e.$slots, "renderExtraFooter", {}, void 0, !0)
|
|
673
672
|
]),
|
|
674
|
-
|
|
675
|
-
(
|
|
676
|
-
|
|
673
|
+
l.showTime || l.ranges && l.ranges.length ? (f(), z("div", at, [
|
|
674
|
+
(f(!0), z(
|
|
675
|
+
ue,
|
|
677
676
|
null,
|
|
678
|
-
|
|
677
|
+
De(l.ranges, (w) => (f(), z("div", {
|
|
679
678
|
class: "das-picker-preset",
|
|
680
|
-
key:
|
|
679
|
+
key: w.key
|
|
681
680
|
}, [
|
|
682
|
-
|
|
681
|
+
g(` <el-dropdown v-if="item.type==='dropdown' && item.children.length" trigger="click" :teleported="false" placement='bottom-end'>\r
|
|
683
682
|
\r
|
|
684
683
|
<span class="das-picker-preset-span" >\r
|
|
685
684
|
{{ item.key }}<das-icon icon="fold" size='mini'></das-icon>\r
|
|
@@ -696,31 +695,31 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
696
695
|
</el-dropdown-menu>\r
|
|
697
696
|
</template>\r
|
|
698
697
|
</el-dropdown> `),
|
|
699
|
-
|
|
700
|
-
|
|
698
|
+
w.type === "dropdown" && w.children.length ? (f(), Y(
|
|
699
|
+
o(Ze),
|
|
701
700
|
{
|
|
702
701
|
key: 0,
|
|
703
702
|
trigger: ["click"]
|
|
704
703
|
},
|
|
705
704
|
{
|
|
706
|
-
overlay:
|
|
707
|
-
|
|
708
|
-
|
|
705
|
+
overlay: p(() => [
|
|
706
|
+
$(
|
|
707
|
+
o(Ae),
|
|
709
708
|
null,
|
|
710
709
|
{
|
|
711
|
-
default:
|
|
712
|
-
(
|
|
713
|
-
|
|
710
|
+
default: p(() => [
|
|
711
|
+
(f(!0), z(
|
|
712
|
+
ue,
|
|
714
713
|
null,
|
|
715
|
-
|
|
716
|
-
key:
|
|
717
|
-
onClick: (
|
|
714
|
+
De(w.children, (R) => (f(), Y(o(Fe), {
|
|
715
|
+
key: R.key,
|
|
716
|
+
onClick: (Me) => ce(R)
|
|
718
717
|
}, {
|
|
719
|
-
default:
|
|
720
|
-
(
|
|
718
|
+
default: p(() => [
|
|
719
|
+
(f(), z(
|
|
721
720
|
"span",
|
|
722
|
-
{ key:
|
|
723
|
-
|
|
721
|
+
{ key: R },
|
|
722
|
+
q(R.key),
|
|
724
723
|
1
|
|
725
724
|
/* TEXT */
|
|
726
725
|
))
|
|
@@ -739,19 +738,19 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
739
738
|
/* DYNAMIC_SLOTS */
|
|
740
739
|
)
|
|
741
740
|
]),
|
|
742
|
-
default:
|
|
743
|
-
|
|
741
|
+
default: p(() => [
|
|
742
|
+
V("a", {
|
|
744
743
|
class: "ant-dropdown-link",
|
|
745
|
-
onClick:
|
|
744
|
+
onClick: d[0] || (d[0] = Re(() => {
|
|
746
745
|
}, ["prevent"]))
|
|
747
746
|
}, [
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
747
|
+
V("span", ot, [
|
|
748
|
+
Le(
|
|
749
|
+
q(w.key) + " ",
|
|
751
750
|
1
|
|
752
751
|
/* TEXT */
|
|
753
752
|
),
|
|
754
|
-
|
|
753
|
+
$(o(re), {
|
|
755
754
|
icon: "fold",
|
|
756
755
|
size: "mini",
|
|
757
756
|
style: { display: "inline-block" }
|
|
@@ -764,24 +763,24 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
764
763
|
},
|
|
765
764
|
1024
|
|
766
765
|
/* DYNAMIC_SLOTS */
|
|
767
|
-
)) : (
|
|
766
|
+
)) : (f(), z("span", {
|
|
768
767
|
key: 1,
|
|
769
768
|
class: "das-picker-preset-span",
|
|
770
|
-
onClick: (
|
|
771
|
-
},
|
|
769
|
+
onClick: (R) => ce(w)
|
|
770
|
+
}, q(w.key), 9, nt))
|
|
772
771
|
]))),
|
|
773
772
|
128
|
|
774
773
|
/* KEYED_FRAGMENT */
|
|
775
774
|
)),
|
|
776
|
-
|
|
775
|
+
g(` <div class="das-picker-ok">\r
|
|
777
776
|
<das-button btnType="primary" size="middle">Ok</das-button>\r
|
|
778
777
|
</div> `)
|
|
779
|
-
])) :
|
|
778
|
+
])) : g("v-if", !0)
|
|
780
779
|
]),
|
|
781
780
|
_: 3
|
|
782
781
|
/* FORWARDED */
|
|
783
782
|
}, 16, ["value", "size", "locale", "valueFormat", "dropdownClassName", "placeholder", "showToday", "showTime", "bordered", "disabled", "style", "popupStyle"])), [
|
|
784
|
-
[
|
|
783
|
+
[o(ye), ne]
|
|
785
784
|
])
|
|
786
785
|
];
|
|
787
786
|
}),
|
|
@@ -792,52 +791,52 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
792
791
|
_: 3
|
|
793
792
|
/* FORWARDED */
|
|
794
793
|
}, 8, ["locale"]),
|
|
795
|
-
|
|
794
|
+
g(` <div\r
|
|
796
795
|
:class="[errorMode === 'default' ? 'das-date-picker-error-label-content' : 'das-date-picker-overlay-error-label-content', 'das-picker-label-content']"\r
|
|
797
796
|
v-if="(errorMode === 'default' || (errorMode === 'overlay' && isHoverInInput)) && currError && !!errorLabel"\r
|
|
798
797
|
>\r
|
|
799
798
|
<span v-if="currError" class="das-picker-error-label label" :title="errorLabel">{{ errorLabel }}</span>\r
|
|
800
799
|
</div> `),
|
|
801
|
-
|
|
802
|
-
|
|
800
|
+
l.error && l.errorLabel ? (f(), z(
|
|
801
|
+
ue,
|
|
803
802
|
{ key: 0 },
|
|
804
803
|
[
|
|
805
|
-
|
|
806
|
-
|
|
804
|
+
l.errorMode === "default" ? (f(), z("div", ut, [
|
|
805
|
+
V(
|
|
807
806
|
"span",
|
|
808
807
|
{
|
|
809
|
-
style:
|
|
808
|
+
style: G(F.value)
|
|
810
809
|
},
|
|
811
|
-
|
|
810
|
+
q(l.errorLabel),
|
|
812
811
|
5
|
|
813
812
|
/* TEXT, STYLE */
|
|
814
813
|
)
|
|
815
|
-
])) :
|
|
816
|
-
|
|
814
|
+
])) : g("v-if", !0),
|
|
815
|
+
l.errorMode === "overlay" && B.value ? (f(), Y(o(he), {
|
|
817
816
|
key: 1,
|
|
818
|
-
errorLabel:
|
|
817
|
+
errorLabel: l.errorLabel,
|
|
819
818
|
getEl: () => {
|
|
820
|
-
var
|
|
821
|
-
return (
|
|
819
|
+
var I;
|
|
820
|
+
return (I = v.value) == null ? void 0 : I.$el;
|
|
822
821
|
},
|
|
823
|
-
errorModelZIndex:
|
|
824
|
-
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) :
|
|
822
|
+
errorModelZIndex: l.errorModelZIndex
|
|
823
|
+
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : g("v-if", !0)
|
|
825
824
|
],
|
|
826
825
|
64
|
|
827
826
|
/* STABLE_FRAGMENT */
|
|
828
|
-
)) :
|
|
827
|
+
)) : g("v-if", !0)
|
|
829
828
|
],
|
|
830
829
|
6
|
|
831
830
|
/* CLASS, STYLE */
|
|
832
831
|
));
|
|
833
832
|
}
|
|
834
|
-
}),
|
|
833
|
+
}), dt = /* @__PURE__ */ be(it, [["__scopeId", "data-v-93c0b3cd"]]), ct = { class: "ant-picker-cell-inner" }, vt = {
|
|
835
834
|
key: 0,
|
|
836
835
|
class: "das-date-picker-error-label-content"
|
|
837
|
-
},
|
|
836
|
+
}, pt = {
|
|
838
837
|
name: "DasDatePicker"
|
|
839
|
-
},
|
|
840
|
-
...
|
|
838
|
+
}, ft = /* @__PURE__ */ pe({
|
|
839
|
+
...pt,
|
|
841
840
|
props: {
|
|
842
841
|
modelValue: {},
|
|
843
842
|
borderType: { default: "bordered" },
|
|
@@ -859,136 +858,136 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
859
858
|
formSize: {}
|
|
860
859
|
},
|
|
861
860
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
862
|
-
setup(
|
|
863
|
-
|
|
861
|
+
setup(l, { expose: K, emit: c }) {
|
|
862
|
+
fe((r) => ({
|
|
864
863
|
v58409e28: W.value,
|
|
865
|
-
d3f7a5f6:
|
|
864
|
+
d3f7a5f6: Q.value
|
|
866
865
|
}));
|
|
867
|
-
const
|
|
868
|
-
|
|
869
|
-
P.value = await
|
|
866
|
+
const t = l, m = c, P = n(void 0);
|
|
867
|
+
j(D, async () => {
|
|
868
|
+
P.value = await ze(D.value);
|
|
870
869
|
}, { immediate: !0 });
|
|
871
|
-
const
|
|
870
|
+
const h = i(() => `time-picker-${D.value}`), v = n(null), N = n(null), T = J(t, "modelValue"), b = J(t, "error"), W = i(() => t.width ? t.width : "230px"), E = i(() => t.formSize), Z = i(() => t.size === "large" ? "large" : t.size === "small" || t.size === "table" ? "small" : "middle"), Q = i(() => t.height ? t.height : E.value ? {
|
|
872
871
|
small: "24px",
|
|
873
872
|
default: "32px",
|
|
874
873
|
large: "40px"
|
|
875
|
-
}[
|
|
876
|
-
width:
|
|
877
|
-
})),
|
|
878
|
-
"z-index":
|
|
879
|
-
})),
|
|
874
|
+
}[E.value] : "auto"), A = i(() => ({
|
|
875
|
+
width: t.width
|
|
876
|
+
})), U = i(() => t.isView ? t.noSetDefaultVal ? "" : "-" : ie(t.placeholder)), B = n(3e3), F = i(() => ({
|
|
877
|
+
"z-index": B.value
|
|
878
|
+
})), M = n(!1), X = n({
|
|
880
879
|
display: "block",
|
|
881
880
|
color: "var(--upf-color-error)",
|
|
882
881
|
"white-space": "break-spaces"
|
|
883
|
-
}),
|
|
884
|
-
|
|
882
|
+
}), y = (r) => {
|
|
883
|
+
r && (B.value = Ie().nextZIndex()), m("openChange", r), String(D.value).startsWith("en") && te(() => {
|
|
885
884
|
const a = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
886
|
-
for (let
|
|
887
|
-
|
|
885
|
+
for (let e of a)
|
|
886
|
+
e && (e.innerText = "OK");
|
|
888
887
|
});
|
|
889
|
-
},
|
|
890
|
-
const
|
|
891
|
-
return
|
|
892
|
-
},
|
|
888
|
+
}, L = n(!1), H = n(""), _ = i(() => T.value ? H.value : U.value), u = () => {
|
|
889
|
+
const r = t.size === "table" ? 12 : 14;
|
|
890
|
+
return Se(U.value, r);
|
|
891
|
+
}, s = () => {
|
|
893
892
|
var a;
|
|
894
|
-
const
|
|
895
|
-
return
|
|
896
|
-
},
|
|
897
|
-
var
|
|
898
|
-
const
|
|
899
|
-
return
|
|
900
|
-
},
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
893
|
+
const r = (a = v.value) == null ? void 0 : a.$el.querySelector(".ant-picker-input>input");
|
|
894
|
+
return T.value ? r == null ? void 0 : r.scrollWidth : u();
|
|
895
|
+
}, k = () => {
|
|
896
|
+
var e;
|
|
897
|
+
const r = (e = v.value) == null ? void 0 : e.$el.querySelector(".ant-picker-input>input");
|
|
898
|
+
return r ? (H.value = r.getAttribute("value"), r.removeAttribute("title"), (r == null ? void 0 : r.offsetWidth) ?? 0) : 0;
|
|
899
|
+
}, S = n(0), O = n(0);
|
|
900
|
+
j(() => [U.value, T.value], () => {
|
|
901
|
+
te(() => {
|
|
902
|
+
S.value = k(), O.value = s(), (S.value === O.value || O.value - S.value < 1) && (L.value = !1);
|
|
904
903
|
});
|
|
905
904
|
});
|
|
906
|
-
const
|
|
907
|
-
|
|
905
|
+
const x = n();
|
|
906
|
+
j(
|
|
908
907
|
() => {
|
|
909
|
-
var
|
|
910
|
-
return (
|
|
908
|
+
var r;
|
|
909
|
+
return (r = N.value) == null ? void 0 : r.$tooltipRef.popperRef.contentRef;
|
|
911
910
|
},
|
|
912
|
-
(
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
}),
|
|
916
|
-
|
|
917
|
-
|
|
911
|
+
(r) => {
|
|
912
|
+
r && (r.addEventListener("mouseenter", function() {
|
|
913
|
+
L.value = !0, x.value && clearTimeout(x.value);
|
|
914
|
+
}), r.addEventListener("mouseleave", function() {
|
|
915
|
+
x.value = setTimeout(() => {
|
|
916
|
+
L.value = !1;
|
|
918
917
|
}, 200);
|
|
919
918
|
}));
|
|
920
919
|
}
|
|
921
920
|
);
|
|
922
|
-
const
|
|
923
|
-
|
|
924
|
-
},
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
}, 200),
|
|
928
|
-
},
|
|
929
|
-
|
|
930
|
-
},
|
|
931
|
-
|
|
921
|
+
const le = () => {
|
|
922
|
+
S.value = k(), O.value = s(), S.value === O.value || O.value - S.value < 1 ? L.value = !1 : (L.value = !0, x.value && clearTimeout(x.value)), M.value = !0;
|
|
923
|
+
}, ae = () => {
|
|
924
|
+
x.value = setTimeout(() => {
|
|
925
|
+
L.value = !1;
|
|
926
|
+
}, 200), M.value = !1;
|
|
927
|
+
}, oe = (r) => {
|
|
928
|
+
r ? le() : ae();
|
|
929
|
+
}, ne = (r, a) => {
|
|
930
|
+
b.value = !1, m("update:error", b.value), m("update:model-value", r), m("change", r, a);
|
|
932
931
|
};
|
|
933
|
-
return
|
|
934
|
-
$timePicker:
|
|
932
|
+
return K({
|
|
933
|
+
$timePicker: v,
|
|
935
934
|
blur: () => {
|
|
936
|
-
|
|
935
|
+
v.value.blur();
|
|
937
936
|
},
|
|
938
937
|
focus: () => {
|
|
939
|
-
|
|
938
|
+
v.value.focus();
|
|
940
939
|
}
|
|
941
|
-
}), (
|
|
940
|
+
}), (r, a) => (f(), z(
|
|
942
941
|
"div",
|
|
943
942
|
{
|
|
944
|
-
class:
|
|
945
|
-
style:
|
|
943
|
+
class: ke(["das-ui-time-picker", [l.borderType, t.isView ? "readonly" : "", o(b) ? "is-error" : ""]]),
|
|
944
|
+
style: G(A.value)
|
|
946
945
|
},
|
|
947
946
|
[
|
|
948
|
-
|
|
949
|
-
default:
|
|
950
|
-
|
|
947
|
+
$(o(Te), { locale: P.value }, {
|
|
948
|
+
default: p(() => [
|
|
949
|
+
$(o(xe), {
|
|
951
950
|
ref_key: "inputTooltipRef",
|
|
952
951
|
ref: N,
|
|
953
952
|
placement: "top",
|
|
954
953
|
trigger: "hover",
|
|
955
|
-
visible:
|
|
956
|
-
disabled: !
|
|
957
|
-
content:
|
|
954
|
+
visible: L.value,
|
|
955
|
+
disabled: !l.isTooltip,
|
|
956
|
+
content: _.value
|
|
958
957
|
}, {
|
|
959
|
-
default:
|
|
960
|
-
|
|
961
|
-
key:
|
|
958
|
+
default: p(() => [
|
|
959
|
+
me((f(), Y(o(Oe), se({
|
|
960
|
+
key: h.value,
|
|
962
961
|
ref_key: "$timePicker",
|
|
963
|
-
ref:
|
|
964
|
-
},
|
|
965
|
-
value:
|
|
966
|
-
"onUpdate:value": a[0] || (a[0] = (
|
|
967
|
-
size:
|
|
968
|
-
popupClassName: "das-ui-time-picker-dropdown " +
|
|
969
|
-
showNow:
|
|
970
|
-
bordered:
|
|
971
|
-
placeholder:
|
|
972
|
-
disabled:
|
|
973
|
-
style:
|
|
974
|
-
popupStyle:
|
|
975
|
-
onChange:
|
|
976
|
-
onOpenChange:
|
|
962
|
+
ref: v
|
|
963
|
+
}, r.$attrs, {
|
|
964
|
+
value: o(T),
|
|
965
|
+
"onUpdate:value": a[0] || (a[0] = (e) => $e(T) ? T.value = e : null),
|
|
966
|
+
size: Z.value,
|
|
967
|
+
popupClassName: "das-ui-time-picker-dropdown " + l.dropdownClassName,
|
|
968
|
+
showNow: l.showNow,
|
|
969
|
+
bordered: l.borderType === "bordered",
|
|
970
|
+
placeholder: U.value,
|
|
971
|
+
disabled: t.disabled || t.isView,
|
|
972
|
+
style: A.value,
|
|
973
|
+
popupStyle: F.value,
|
|
974
|
+
onChange: ne,
|
|
975
|
+
onOpenChange: y
|
|
977
976
|
}), {
|
|
978
|
-
dateRender:
|
|
979
|
-
|
|
980
|
-
|
|
977
|
+
dateRender: p((e) => [
|
|
978
|
+
C(r.$slots, "dateRender", ge(we(e)), () => [
|
|
979
|
+
V(
|
|
981
980
|
"div",
|
|
982
|
-
|
|
983
|
-
|
|
981
|
+
ct,
|
|
982
|
+
q(e.current.date()),
|
|
984
983
|
1
|
|
985
984
|
/* TEXT */
|
|
986
985
|
)
|
|
987
986
|
], !0)
|
|
988
987
|
]),
|
|
989
|
-
suffixIcon:
|
|
990
|
-
|
|
991
|
-
|
|
988
|
+
suffixIcon: p(() => [
|
|
989
|
+
C(r.$slots, "suffixIcon", {}, () => [
|
|
990
|
+
$(o(He), {
|
|
992
991
|
class: "das-suffix-icon",
|
|
993
992
|
size: "medium"
|
|
994
993
|
})
|
|
@@ -997,7 +996,7 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
997
996
|
_: 3
|
|
998
997
|
/* FORWARDED */
|
|
999
998
|
}, 16, ["value", "size", "popupClassName", "showNow", "bordered", "placeholder", "disabled", "style", "popupStyle"])), [
|
|
1000
|
-
[
|
|
999
|
+
[o(ye), oe]
|
|
1001
1000
|
])
|
|
1002
1001
|
]),
|
|
1003
1002
|
_: 3
|
|
@@ -1007,31 +1006,31 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
1007
1006
|
_: 3
|
|
1008
1007
|
/* FORWARDED */
|
|
1009
1008
|
}, 8, ["locale"]),
|
|
1010
|
-
|
|
1011
|
-
|
|
1009
|
+
l.error && l.errorLabel ? (f(), z(
|
|
1010
|
+
ue,
|
|
1012
1011
|
{ key: 0 },
|
|
1013
1012
|
[
|
|
1014
|
-
|
|
1015
|
-
|
|
1013
|
+
l.errorMode === "default" ? (f(), z("div", vt, [
|
|
1014
|
+
V(
|
|
1016
1015
|
"span",
|
|
1017
1016
|
{
|
|
1018
|
-
style:
|
|
1017
|
+
style: G(X.value)
|
|
1019
1018
|
},
|
|
1020
|
-
|
|
1019
|
+
q(l.errorLabel),
|
|
1021
1020
|
5
|
|
1022
1021
|
/* TEXT, STYLE */
|
|
1023
1022
|
)
|
|
1024
|
-
])) :
|
|
1025
|
-
|
|
1023
|
+
])) : g("v-if", !0),
|
|
1024
|
+
l.errorMode === "overlay" && M.value ? (f(), Y(o(he), {
|
|
1026
1025
|
key: 1,
|
|
1027
|
-
errorLabel:
|
|
1026
|
+
errorLabel: l.errorLabel,
|
|
1028
1027
|
getEl: () => {
|
|
1029
|
-
var
|
|
1030
|
-
return (
|
|
1028
|
+
var e;
|
|
1029
|
+
return (e = v.value) == null ? void 0 : e.$el;
|
|
1031
1030
|
},
|
|
1032
|
-
errorModelZIndex:
|
|
1033
|
-
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) :
|
|
1034
|
-
|
|
1031
|
+
errorModelZIndex: l.errorModelZIndex
|
|
1032
|
+
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : g("v-if", !0),
|
|
1033
|
+
g(` <template v-else-if="errorMode === 'overlay' && isHoverInInput">\r
|
|
1035
1034
|
<teleport to="body" v-if="teleported">\r
|
|
1036
1035
|
<div ref="$errorModel" :style="errorModelStyle">\r
|
|
1037
1036
|
<span :style="errorLabelStyle">{{ errorLabel }}</span>\r
|
|
@@ -1045,19 +1044,19 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
1045
1044
|
],
|
|
1046
1045
|
64
|
|
1047
1046
|
/* STABLE_FRAGMENT */
|
|
1048
|
-
)) :
|
|
1047
|
+
)) : g("v-if", !0)
|
|
1049
1048
|
],
|
|
1050
1049
|
6
|
|
1051
1050
|
/* CLASS, STYLE */
|
|
1052
1051
|
));
|
|
1053
1052
|
}
|
|
1054
|
-
}),
|
|
1053
|
+
}), mt = /* @__PURE__ */ be(ft, [["__scopeId", "data-v-30836c58"]]), ht = { class: "ant-picker-cell-inner" }, yt = {
|
|
1055
1054
|
key: 0,
|
|
1056
1055
|
class: "das-date-picker-error-label-content"
|
|
1057
|
-
},
|
|
1056
|
+
}, bt = {
|
|
1058
1057
|
name: "DasDatePicker"
|
|
1059
|
-
},
|
|
1060
|
-
...
|
|
1058
|
+
}, kt = /* @__PURE__ */ pe({
|
|
1059
|
+
...bt,
|
|
1061
1060
|
props: {
|
|
1062
1061
|
modelValue: {},
|
|
1063
1062
|
borderType: { default: "bordered" },
|
|
@@ -1079,168 +1078,168 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
1079
1078
|
formSize: {}
|
|
1080
1079
|
},
|
|
1081
1080
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
1082
|
-
setup(
|
|
1083
|
-
|
|
1081
|
+
setup(l, { expose: K, emit: c }) {
|
|
1082
|
+
fe((a) => ({
|
|
1084
1083
|
v070a06a4: W.value,
|
|
1085
|
-
v79159f3f:
|
|
1086
|
-
})),
|
|
1084
|
+
v79159f3f: Q.value
|
|
1085
|
+
})), Ce({
|
|
1087
1086
|
dengdai: import("@das-fed/upf-ui/packages/icons/dengdai")
|
|
1088
1087
|
});
|
|
1089
|
-
const
|
|
1090
|
-
|
|
1091
|
-
P.value = await
|
|
1088
|
+
const t = l, m = c, P = n(void 0);
|
|
1089
|
+
j(D, async () => {
|
|
1090
|
+
P.value = await ze(D.value);
|
|
1092
1091
|
}, { immediate: !0 });
|
|
1093
|
-
const
|
|
1092
|
+
const h = i(() => `time-range-picker-${D.value}`), v = n(null), N = n(null), T = J(t, "modelValue"), b = J(t, "error"), W = i(() => t.width ? t.width : "230px"), E = i(() => t.formSize), Z = i(() => t.size === "large" ? "large" : t.size === "small" || t.size === "table" ? "small" : "middle"), Q = i(() => t.height ? t.height : E.value ? {
|
|
1094
1093
|
small: "24px",
|
|
1095
1094
|
default: "32px",
|
|
1096
1095
|
large: "40px"
|
|
1097
|
-
}[
|
|
1098
|
-
"z-index":
|
|
1099
|
-
})),
|
|
1100
|
-
width:
|
|
1101
|
-
})),
|
|
1096
|
+
}[E.value] : "auto"), A = n(3e3), U = i(() => ({
|
|
1097
|
+
"z-index": A.value
|
|
1098
|
+
})), B = i(() => ({
|
|
1099
|
+
width: t.width
|
|
1100
|
+
})), F = i(() => {
|
|
1102
1101
|
var a;
|
|
1103
|
-
return
|
|
1104
|
-
}),
|
|
1102
|
+
return t.isView ? t.noSetDefaultVal ? ["", ""] : ["-", "-"] : (a = t.placeholder) == null ? void 0 : a.map((e) => ie(e));
|
|
1103
|
+
}), M = n(!1), X = n({
|
|
1105
1104
|
display: "block",
|
|
1106
1105
|
color: "var(--upf-color-error)",
|
|
1107
1106
|
"white-space": "break-spaces"
|
|
1108
|
-
}),
|
|
1107
|
+
}), y = n(!1), L = n(["", ""]), H = n("~"), _ = i(() => {
|
|
1109
1108
|
var a;
|
|
1110
|
-
return (a =
|
|
1111
|
-
}),
|
|
1112
|
-
var
|
|
1109
|
+
return (a = T.value) != null && a.length && T.value[0] && T.value[1] ? L.value.join(" " + H.value + " ") : F.value.join(" " + H.value + " ");
|
|
1110
|
+
}), u = n([0, 0]), s = n([0, 0]), k = () => {
|
|
1111
|
+
var I;
|
|
1113
1112
|
let a = [];
|
|
1114
|
-
const
|
|
1115
|
-
if (!
|
|
1113
|
+
const e = (I = v.value) == null ? void 0 : I.$el.querySelectorAll(".ant-picker-input>input");
|
|
1114
|
+
if (!e)
|
|
1116
1115
|
return a = [0, 0], a;
|
|
1117
|
-
let
|
|
1118
|
-
for (let
|
|
1119
|
-
|
|
1120
|
-
let
|
|
1121
|
-
a.push(
|
|
1116
|
+
let d = [];
|
|
1117
|
+
for (let w of e) {
|
|
1118
|
+
d.push(w.getAttribute("value") || "");
|
|
1119
|
+
let R = (w == null ? void 0 : w.offsetWidth) ?? 0;
|
|
1120
|
+
a.push(R);
|
|
1122
1121
|
}
|
|
1123
|
-
return
|
|
1124
|
-
},
|
|
1125
|
-
const
|
|
1126
|
-
return
|
|
1127
|
-
},
|
|
1128
|
-
var
|
|
1122
|
+
return L.value = d, a;
|
|
1123
|
+
}, S = (a) => {
|
|
1124
|
+
const e = t.size === "table" ? 12 : 14;
|
|
1125
|
+
return Se(a, e);
|
|
1126
|
+
}, O = () => {
|
|
1127
|
+
var d;
|
|
1129
1128
|
let a = [];
|
|
1130
|
-
return ((
|
|
1131
|
-
|
|
1129
|
+
return ((d = v.value) == null ? void 0 : d.$el.querySelectorAll(".ant-picker-input>input")).forEach((I, w) => {
|
|
1130
|
+
T.value.length && T.value[0] && T.value[0] ? a.push(I == null ? void 0 : I.scrollWidth) : a.push(S(F.value[w]));
|
|
1132
1131
|
}), a;
|
|
1133
1132
|
};
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1133
|
+
j(() => [F.value, T.value], () => {
|
|
1134
|
+
te(() => {
|
|
1135
|
+
u.value = k(), s.value = O(), (u.value[0] === s.value[0] || s.value[0] - u.value[0] < 1) && (u.value[1] === s.value[1] || s.value[1] - u.value[1] < 1) && (y.value = !1);
|
|
1137
1136
|
});
|
|
1138
1137
|
});
|
|
1139
|
-
const
|
|
1140
|
-
|
|
1138
|
+
const x = n();
|
|
1139
|
+
j(
|
|
1141
1140
|
() => {
|
|
1142
1141
|
var a;
|
|
1143
1142
|
return (a = N.value) == null ? void 0 : a.$tooltipRef.popperRef.contentRef;
|
|
1144
1143
|
},
|
|
1145
1144
|
(a) => {
|
|
1146
1145
|
a && (a.addEventListener("mouseenter", function() {
|
|
1147
|
-
|
|
1146
|
+
y.value = !0, x.value && clearTimeout(x.value);
|
|
1148
1147
|
}), a.addEventListener("mouseleave", function() {
|
|
1149
|
-
|
|
1150
|
-
|
|
1148
|
+
x.value = setTimeout(() => {
|
|
1149
|
+
y.value = !1;
|
|
1151
1150
|
}, 200);
|
|
1152
1151
|
}));
|
|
1153
1152
|
}
|
|
1154
1153
|
);
|
|
1155
|
-
const
|
|
1156
|
-
a && (
|
|
1157
|
-
const
|
|
1158
|
-
for (let
|
|
1159
|
-
|
|
1154
|
+
const le = (a) => {
|
|
1155
|
+
a && (A.value = Ie().nextZIndex()), m("openChange", a), String(D.value).startsWith("en") && te(() => {
|
|
1156
|
+
const e = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
1157
|
+
for (let d of e)
|
|
1158
|
+
d && (d.innerText = "OK");
|
|
1160
1159
|
});
|
|
1160
|
+
}, ae = () => {
|
|
1161
|
+
u.value = k(), s.value = O(), (u.value[0] === s.value[0] || s.value[0] - u.value[0] < 1) && (u.value[1] === s.value[1] || s.value[1] - u.value[1] < 1) ? y.value = !1 : (y.value = !0, x.value && clearTimeout(x.value)), M.value = !0;
|
|
1161
1162
|
}, oe = () => {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
},
|
|
1168
|
-
a
|
|
1169
|
-
|
|
1170
|
-
if ($.value = !1, a === null) {
|
|
1171
|
-
h("update:model-value", [null, null]), h("change", [null, null], Array.isArray(u) ? u.join(" ~ ") : u);
|
|
1163
|
+
x.value = setTimeout(() => {
|
|
1164
|
+
y.value = !1;
|
|
1165
|
+
}, 200), M.value = !1;
|
|
1166
|
+
}, ne = (a) => {
|
|
1167
|
+
a ? ae() : oe();
|
|
1168
|
+
}, de = (a, e) => {
|
|
1169
|
+
if (b.value = !1, a === null) {
|
|
1170
|
+
m("update:model-value", [null, null]), m("change", [null, null], Array.isArray(e) ? e.join(" ~ ") : e);
|
|
1172
1171
|
return;
|
|
1173
1172
|
}
|
|
1174
|
-
|
|
1173
|
+
m("update:error", b.value), m("update:model-value", a), m("change", a, Array.isArray(e) ? e.join(" ~ ") : e);
|
|
1175
1174
|
};
|
|
1176
|
-
return
|
|
1177
|
-
$timeRangePicker:
|
|
1175
|
+
return K({
|
|
1176
|
+
$timeRangePicker: v,
|
|
1178
1177
|
blur: () => {
|
|
1179
|
-
|
|
1178
|
+
v.value.blur();
|
|
1180
1179
|
},
|
|
1181
1180
|
focus: () => {
|
|
1182
|
-
|
|
1181
|
+
v.value.focus();
|
|
1183
1182
|
}
|
|
1184
|
-
}), (a,
|
|
1183
|
+
}), (a, e) => (f(), z(
|
|
1185
1184
|
"div",
|
|
1186
1185
|
{
|
|
1187
|
-
class:
|
|
1188
|
-
style:
|
|
1186
|
+
class: ke(["das-ui-time-range-picker", [l.borderType, t.isView ? "readonly" : "", o(b) ? "is-error" : ""]]),
|
|
1187
|
+
style: G(B.value)
|
|
1189
1188
|
},
|
|
1190
1189
|
[
|
|
1191
|
-
|
|
1192
|
-
default:
|
|
1193
|
-
|
|
1190
|
+
$(o(Te), { locale: P.value }, {
|
|
1191
|
+
default: p(() => [
|
|
1192
|
+
$(o(xe), {
|
|
1194
1193
|
ref_key: "inputTooltipRef",
|
|
1195
1194
|
ref: N,
|
|
1196
1195
|
placement: "top",
|
|
1197
1196
|
trigger: "hover",
|
|
1198
|
-
visible:
|
|
1199
|
-
disabled: !
|
|
1200
|
-
content:
|
|
1197
|
+
visible: y.value,
|
|
1198
|
+
disabled: !l.isTooltip,
|
|
1199
|
+
content: _.value
|
|
1201
1200
|
}, {
|
|
1202
|
-
default:
|
|
1203
|
-
|
|
1204
|
-
key:
|
|
1201
|
+
default: p(() => [
|
|
1202
|
+
me((f(), Y(o(qe), se({
|
|
1203
|
+
key: h.value,
|
|
1205
1204
|
ref_key: "$timeRangePicker",
|
|
1206
|
-
ref:
|
|
1205
|
+
ref: v
|
|
1207
1206
|
}, a.$attrs, {
|
|
1208
|
-
value:
|
|
1209
|
-
"onUpdate:value":
|
|
1210
|
-
size:
|
|
1211
|
-
popupClassName: "das-ui-time-range-picker-dropdown " +
|
|
1212
|
-
showNow:
|
|
1213
|
-
bordered:
|
|
1214
|
-
placeholder:
|
|
1215
|
-
disabled:
|
|
1216
|
-
style:
|
|
1217
|
-
popupStyle:
|
|
1218
|
-
onChange:
|
|
1219
|
-
onOpenChange:
|
|
1207
|
+
value: o(T),
|
|
1208
|
+
"onUpdate:value": e[0] || (e[0] = (d) => $e(T) ? T.value = d : null),
|
|
1209
|
+
size: Z.value,
|
|
1210
|
+
popupClassName: "das-ui-time-range-picker-dropdown " + l.dropdownClassName,
|
|
1211
|
+
showNow: l.showNow,
|
|
1212
|
+
bordered: l.borderType === "bordered",
|
|
1213
|
+
placeholder: F.value,
|
|
1214
|
+
disabled: t.disabled || t.isView,
|
|
1215
|
+
style: B.value,
|
|
1216
|
+
popupStyle: U.value,
|
|
1217
|
+
onChange: de,
|
|
1218
|
+
onOpenChange: le
|
|
1220
1219
|
}), {
|
|
1221
|
-
dateRender:
|
|
1222
|
-
|
|
1223
|
-
|
|
1220
|
+
dateRender: p((d) => [
|
|
1221
|
+
C(a.$slots, "dateRender", ge(we(d)), () => [
|
|
1222
|
+
V(
|
|
1224
1223
|
"div",
|
|
1225
|
-
|
|
1226
|
-
|
|
1224
|
+
ht,
|
|
1225
|
+
q(d.current.date()),
|
|
1227
1226
|
1
|
|
1228
1227
|
/* TEXT */
|
|
1229
1228
|
)
|
|
1230
1229
|
], !0)
|
|
1231
1230
|
]),
|
|
1232
|
-
suffixIcon:
|
|
1233
|
-
|
|
1234
|
-
|
|
1231
|
+
suffixIcon: p(() => [
|
|
1232
|
+
C(a.$slots, "suffixIcon", {}, () => [
|
|
1233
|
+
$(o(re), {
|
|
1235
1234
|
class: "das-suffix-icon",
|
|
1236
1235
|
icon: "dengdai",
|
|
1237
1236
|
size: "medium"
|
|
1238
1237
|
})
|
|
1239
1238
|
], !0)
|
|
1240
1239
|
]),
|
|
1241
|
-
separator:
|
|
1242
|
-
|
|
1243
|
-
|
|
1240
|
+
separator: p(() => [
|
|
1241
|
+
C(a.$slots, "separator", {}, () => [
|
|
1242
|
+
e[1] || (e[1] = V(
|
|
1244
1243
|
"div",
|
|
1245
1244
|
{ style: { padding: "0 8px" } },
|
|
1246
1245
|
"~",
|
|
@@ -1252,7 +1251,7 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
1252
1251
|
_: 3
|
|
1253
1252
|
/* FORWARDED */
|
|
1254
1253
|
}, 16, ["value", "size", "popupClassName", "showNow", "bordered", "placeholder", "disabled", "style", "popupStyle"])), [
|
|
1255
|
-
[
|
|
1254
|
+
[o(ye), ne]
|
|
1256
1255
|
])
|
|
1257
1256
|
]),
|
|
1258
1257
|
_: 3
|
|
@@ -1262,40 +1261,40 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
1262
1261
|
_: 3
|
|
1263
1262
|
/* FORWARDED */
|
|
1264
1263
|
}, 8, ["locale"]),
|
|
1265
|
-
|
|
1266
|
-
|
|
1264
|
+
l.error && l.errorLabel ? (f(), z(
|
|
1265
|
+
ue,
|
|
1267
1266
|
{ key: 0 },
|
|
1268
1267
|
[
|
|
1269
|
-
|
|
1270
|
-
|
|
1268
|
+
l.errorMode === "default" ? (f(), z("div", yt, [
|
|
1269
|
+
V(
|
|
1271
1270
|
"span",
|
|
1272
1271
|
{
|
|
1273
|
-
style:
|
|
1272
|
+
style: G(X.value)
|
|
1274
1273
|
},
|
|
1275
|
-
|
|
1274
|
+
q(l.errorLabel),
|
|
1276
1275
|
5
|
|
1277
1276
|
/* TEXT, STYLE */
|
|
1278
1277
|
)
|
|
1279
|
-
])) :
|
|
1280
|
-
|
|
1278
|
+
])) : g("v-if", !0),
|
|
1279
|
+
l.errorMode === "overlay" && M.value ? (f(), Y(o(he), {
|
|
1281
1280
|
key: 1,
|
|
1282
|
-
errorLabel:
|
|
1281
|
+
errorLabel: l.errorLabel,
|
|
1283
1282
|
getEl: () => {
|
|
1284
|
-
var
|
|
1285
|
-
return (
|
|
1283
|
+
var d;
|
|
1284
|
+
return (d = v.value) == null ? void 0 : d.$el;
|
|
1286
1285
|
},
|
|
1287
|
-
errorModelZIndex:
|
|
1288
|
-
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) :
|
|
1286
|
+
errorModelZIndex: l.errorModelZIndex
|
|
1287
|
+
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : g("v-if", !0)
|
|
1289
1288
|
],
|
|
1290
1289
|
64
|
|
1291
1290
|
/* STABLE_FRAGMENT */
|
|
1292
|
-
)) :
|
|
1291
|
+
)) : g("v-if", !0)
|
|
1293
1292
|
],
|
|
1294
1293
|
6
|
|
1295
1294
|
/* CLASS, STYLE */
|
|
1296
1295
|
));
|
|
1297
1296
|
}
|
|
1298
|
-
}),
|
|
1297
|
+
}), gt = /* @__PURE__ */ be(kt, [["__scopeId", "data-v-bdeed30a"]]), wt = {
|
|
1299
1298
|
开始日期: { "zh-CN": "开始日期", en: "Start Date", "zh-MO": "開始日期", _appCode: "framework" },
|
|
1300
1299
|
结束日期: { "zh-CN": "结束日期", en: "End Date", "zh-MO": "結束日期", _appCode: "framework" },
|
|
1301
1300
|
开始时间: { "zh-CN": "开始时间", en: "Start Time", "zh-MO": "開始時間", _appCode: "framework" },
|
|
@@ -1303,13 +1302,13 @@ const Ke = { class: "ant-picker-cell-inner" }, Ye = {
|
|
|
1303
1302
|
请选择日期: { "zh-CN": "请选择日期", en: "Please select a date", "zh-MO": "請選擇日期", _appCode: "framework" },
|
|
1304
1303
|
请选择时间: { "zh-CN": "请选择时间", en: "Please select the time", "zh-MO": "請選擇時間", _appCode: "framework" }
|
|
1305
1304
|
};
|
|
1306
|
-
|
|
1307
|
-
const
|
|
1305
|
+
Ue(wt);
|
|
1306
|
+
const Ft = ve(Ge), Ot = ve(tt), qt = ve(dt), Ut = ve(mt), Ht = ve(gt), jt = { name: "datePicker 日期时间选择器" };
|
|
1308
1307
|
export {
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1308
|
+
Ft as DasDatePicker,
|
|
1309
|
+
Ot as DasDateRangePicker,
|
|
1310
|
+
qt as DasRangePicker,
|
|
1311
|
+
Ut as DasTimePicker,
|
|
1312
|
+
Ht as DasTimeRangePicker,
|
|
1313
|
+
jt as default
|
|
1315
1314
|
};
|