@das-fed/upf-ui 6.4.0-dev.164 → 6.4.0-dev.165
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 +6 -6
- package/packages/components/date-picker/index.js +196 -192
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/src/RangePicker.vue.d.ts +0 -2
- package/packages/components/date-picker/style.css +1 -1
- package/packages/components/date-picker/style.css.gz +0 -0
- package/web-front-end/i18n/dasui_en-US.js +767 -0
- package/web-front-end/i18n/dasui_zh-CN.js +758 -0
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import '@das-fed/upf-ui/packages/components/date-picker/style.css';
|
|
2
2
|
import { withInstall as de } from "@das-fed/upf-utils/with-install/index";
|
|
3
|
-
import { defineComponent as pe, useCssVars as ce, computed as i, ref as u, watch as
|
|
4
|
-
import { ConfigProvider as we, DatePicker as
|
|
5
|
-
import { DasAutoRegisterIcon as
|
|
3
|
+
import { defineComponent as pe, useCssVars as ce, computed as i, ref as u, watch as J, createElementBlock as T, openBlock as f, normalizeStyle as j, normalizeClass as be, unref as a, createVNode as I, createCommentVNode as L, withCtx as v, withDirectives as ve, createBlock as _, mergeProps as ue, isRef as Ce, createSlots as xe, renderSlot as S, normalizeProps as ke, guardReactiveProps as ge, createElementVNode as E, toDisplayString as B, Fragment as ae, nextTick as Q, useAttrs as Be, renderList as Me, withModifiers as Re, createTextVNode as Le } from "vue";
|
|
4
|
+
import { ConfigProvider as we, DatePicker as Ne, RangePicker as We, Dropdown as Fe, Menu as Ze, MenuItem as Ae, TimePicker as qe, TimeRangePicker as Oe } from "ant-design-vue";
|
|
5
|
+
import { DasAutoRegisterIcon as ze, DasIcon as ee } from "@das-fed/upf-ui/packages/components/icon/index";
|
|
6
6
|
import { DasTooltip as Te } from "@das-fed/upf-ui/packages/components/tooltip/index";
|
|
7
7
|
import { DasErrorOverlayModel as fe } from "@das-fed/upf-ui/packages/components/error-overlay-model/index";
|
|
8
|
-
import { useModelValue as
|
|
8
|
+
import { useModelValue as K } from "@das-fed/upf-utils/vue";
|
|
9
9
|
import { vHoverInside as me } from "@das-fed/upf-utils/directive/hoverInside/index";
|
|
10
10
|
import { useZIndex as Ie } from "@das-fed/upf-utils/hooks/popup-manager/use-zindex";
|
|
11
11
|
import { getVarValue as he, getVar as He, setThemeRule as _e } from "@das-fed/upf-web/packages/theme/index";
|
|
12
|
-
import { currentLang as
|
|
13
|
-
import { calcTextWidth as
|
|
12
|
+
import { currentLang as Y, t as ne, loadLocale as Ue, setI18nRule as Ye } from "@das-fed/upf-web/packages/i18n/index";
|
|
13
|
+
import { calcTextWidth as Se } from "@das-fed/upf-utils/common-tools";
|
|
14
14
|
import "ant-design-vue/es/date-picker/style/css";
|
|
15
15
|
import "ant-design-vue/es/config-provider/style/css";
|
|
16
|
-
import
|
|
17
|
-
import
|
|
16
|
+
import $e from "ant-design-vue/es/locale/zh_CN";
|
|
17
|
+
import De from "ant-design-vue/es/locale/en_GB";
|
|
18
18
|
import "dayjs/locale/zh-cn";
|
|
19
19
|
import "dayjs/locale/en";
|
|
20
20
|
import { DasDatePicker as Ve } from "@das-fed/upf-ui/packages/components/date-picker/index";
|
|
21
21
|
import Ee from "dayjs";
|
|
22
22
|
import "ant-design-vue/es/dropdown/style/css";
|
|
23
23
|
import "ant-design-vue/es/menu/style/css";
|
|
24
|
-
import { DasIconDengdai as
|
|
24
|
+
import { DasIconDengdai as je } from "@das-fed/upf-ui/packages/icons/dengdai/index";
|
|
25
25
|
import "ant-design-vue/es/time-picker/style/css";
|
|
26
|
-
const
|
|
26
|
+
const Ke = { class: "ant-picker-cell-inner" }, Xe = {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: "das-date-picker-error-label-content"
|
|
29
|
-
},
|
|
29
|
+
}, Ge = {
|
|
30
30
|
name: "DasDatePicker"
|
|
31
|
-
},
|
|
32
|
-
...
|
|
31
|
+
}, Je = /* @__PURE__ */ pe({
|
|
32
|
+
...Ge,
|
|
33
33
|
props: {
|
|
34
34
|
modelValue: {},
|
|
35
35
|
borderType: { default: "bordered" },
|
|
@@ -51,20 +51,20 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
51
51
|
formSize: {}
|
|
52
52
|
},
|
|
53
53
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
54
|
-
setup(
|
|
54
|
+
setup(R, { expose: q, emit: n }) {
|
|
55
55
|
ce((r) => ({
|
|
56
56
|
ced42180: U.value,
|
|
57
57
|
"6058feed": W.value
|
|
58
58
|
}));
|
|
59
|
-
const t =
|
|
60
|
-
|
|
59
|
+
const t = R, m = n;
|
|
60
|
+
ze({
|
|
61
61
|
right: import("@das-fed/upf-ui/packages/icons/right"),
|
|
62
62
|
left: import("@das-fed/upf-ui/packages/icons/left"),
|
|
63
63
|
"double-arrow-left": import("@das-fed/upf-ui/packages/icons/double-arrow-left"),
|
|
64
64
|
"double-arrow-right": import("@das-fed/upf-ui/packages/icons/double-arrow-right"),
|
|
65
65
|
riqixuanze: import("@das-fed/upf-ui/packages/icons/riqixuanze")
|
|
66
66
|
});
|
|
67
|
-
const
|
|
67
|
+
const O = i(() => Y.value === "zh-CN" ? $e : De), o = u(null), M = u(null), p = K(t, "modelValue"), D = K(t, "error"), N = i(() => t.isView ? t.noSetDefaultVal ? "" : "-" : t.placeholder || ne("请选择日期")), x = i(() => ({
|
|
68
68
|
width: t.width
|
|
69
69
|
})), U = i(() => t.width ? t.width : "230px"), V = i(() => t.formSize), W = i(() => t.height ? t.height : V.value ? {
|
|
70
70
|
small: "24px",
|
|
@@ -72,29 +72,29 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
72
72
|
large: "40px"
|
|
73
73
|
}[V.value] : "auto"), P = u(3e3), F = i(() => ({
|
|
74
74
|
"z-index": P.value
|
|
75
|
-
})), z = u(!1),
|
|
75
|
+
})), z = u(!1), H = u({
|
|
76
76
|
display: "block",
|
|
77
77
|
color: he("--das-ui-date-picker-overlay-error-color").value,
|
|
78
78
|
"white-space": "break-spaces"
|
|
79
|
-
}), b = u(!1), $ = u(""), Z = i(() => p.value ? $.value :
|
|
79
|
+
}), b = u(!1), $ = u(""), Z = i(() => p.value ? $.value : N.value), X = () => {
|
|
80
80
|
const r = t.size === "table" ? 12 : 14;
|
|
81
|
-
return
|
|
81
|
+
return Se(N.value, r);
|
|
82
82
|
}, k = () => {
|
|
83
83
|
var l;
|
|
84
84
|
const r = (l = o.value) == null ? void 0 : l.$el.querySelector(".ant-picker-input>input");
|
|
85
|
-
return p.value ? r == null ? void 0 : r.scrollWidth :
|
|
85
|
+
return p.value ? r == null ? void 0 : r.scrollWidth : X();
|
|
86
86
|
}, h = () => {
|
|
87
87
|
var e;
|
|
88
88
|
const r = (e = o.value) == null ? void 0 : e.$el.querySelector(".ant-picker-input>input");
|
|
89
89
|
return r ? ($.value = r.getAttribute("value"), r.removeAttribute("title"), (r == null ? void 0 : r.offsetWidth) ?? 0) : 0;
|
|
90
90
|
}, s = u(0), c = u(0);
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
J(() => [N.value, p.value], () => {
|
|
92
|
+
Q(() => {
|
|
93
93
|
s.value = h(), c.value = k(), (s.value === c.value || c.value - s.value < 1) && (b.value = !1);
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
96
|
const A = u();
|
|
97
|
-
|
|
97
|
+
J(
|
|
98
98
|
() => {
|
|
99
99
|
var r;
|
|
100
100
|
return (r = M.value) == null ? void 0 : r.$tooltipRef.popperRef.contentRef;
|
|
@@ -110,7 +110,7 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
112
|
const w = (r) => {
|
|
113
|
-
r && (P.value = Ie().nextZIndex()), m("openChange", r),
|
|
113
|
+
r && (P.value = Ie().nextZIndex()), m("openChange", r), Y.value === "en" && Q(() => {
|
|
114
114
|
const l = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
115
115
|
for (let e of l)
|
|
116
116
|
e && (e.innerText = "OK");
|
|
@@ -136,9 +136,9 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
136
136
|
}
|
|
137
137
|
}), (r, l) => (f(), T("div", {
|
|
138
138
|
class: be(["das-ui-date-picker", [r.borderType, t.isView ? "readonly" : "", a(D) ? "is-error" : ""]]),
|
|
139
|
-
style:
|
|
139
|
+
style: j(x.value)
|
|
140
140
|
}, [
|
|
141
|
-
I(a(we), { locale:
|
|
141
|
+
I(a(we), { locale: O.value }, {
|
|
142
142
|
default: v(() => [
|
|
143
143
|
I(a(Te), {
|
|
144
144
|
ref_key: "inputTooltipRef",
|
|
@@ -150,15 +150,15 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
150
150
|
content: Z.value
|
|
151
151
|
}, {
|
|
152
152
|
default: v(() => [
|
|
153
|
-
ve((f(),
|
|
153
|
+
ve((f(), _(a(Ne), ue({
|
|
154
154
|
ref_key: "$datePicker",
|
|
155
155
|
ref: o
|
|
156
156
|
}, r.$attrs, {
|
|
157
157
|
value: a(p),
|
|
158
|
-
"onUpdate:value": l[0] || (l[0] = (e) =>
|
|
158
|
+
"onUpdate:value": l[0] || (l[0] = (e) => Ce(p) ? p.value = e : null),
|
|
159
159
|
size: t.size,
|
|
160
160
|
dropdownClassName: "das-ui-date-picker-dropdown " + r.dropdownClassName,
|
|
161
|
-
placeholder:
|
|
161
|
+
placeholder: N.value,
|
|
162
162
|
showToday: r.showToday,
|
|
163
163
|
bordered: r.borderType === "bordered",
|
|
164
164
|
disabled: t.disabled || t.isView,
|
|
@@ -168,45 +168,45 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
168
168
|
onOpenChange: w
|
|
169
169
|
}), xe({
|
|
170
170
|
dateRender: v((e) => [
|
|
171
|
-
|
|
172
|
-
E("div",
|
|
171
|
+
S(r.$slots, "dateRender", ke(ge(e)), () => [
|
|
172
|
+
E("div", Ke, B(e.current.date()), 1)
|
|
173
173
|
], !0)
|
|
174
174
|
]),
|
|
175
175
|
nextIcon: v(() => [
|
|
176
|
-
|
|
177
|
-
I(a(
|
|
176
|
+
S(r.$slots, "nextIcon", {}, () => [
|
|
177
|
+
I(a(ee), {
|
|
178
178
|
icon: "right",
|
|
179
179
|
size: "medium"
|
|
180
180
|
})
|
|
181
181
|
], !0)
|
|
182
182
|
]),
|
|
183
183
|
prevIcon: v(() => [
|
|
184
|
-
|
|
185
|
-
I(a(
|
|
184
|
+
S(r.$slots, "prevIcon", {}, () => [
|
|
185
|
+
I(a(ee), {
|
|
186
186
|
icon: "left",
|
|
187
187
|
size: "medium"
|
|
188
188
|
})
|
|
189
189
|
], !0)
|
|
190
190
|
]),
|
|
191
191
|
superNextIcon: v(() => [
|
|
192
|
-
|
|
193
|
-
I(a(
|
|
192
|
+
S(r.$slots, "superNextIcon", {}, () => [
|
|
193
|
+
I(a(ee), {
|
|
194
194
|
icon: "double-arrow-right",
|
|
195
195
|
size: "medium"
|
|
196
196
|
})
|
|
197
197
|
], !0)
|
|
198
198
|
]),
|
|
199
199
|
superPrevIcon: v(() => [
|
|
200
|
-
|
|
201
|
-
I(a(
|
|
200
|
+
S(r.$slots, "superPrevIcon", {}, () => [
|
|
201
|
+
I(a(ee), {
|
|
202
202
|
icon: "double-arrow-left",
|
|
203
203
|
size: "medium"
|
|
204
204
|
})
|
|
205
205
|
], !0)
|
|
206
206
|
]),
|
|
207
207
|
suffixIcon: v(() => [
|
|
208
|
-
|
|
209
|
-
I(a(
|
|
208
|
+
S(r.$slots, "suffixIcon", {}, () => [
|
|
209
|
+
I(a(ee), {
|
|
210
210
|
class: "das-suffix-icon",
|
|
211
211
|
icon: "riqixuanze",
|
|
212
212
|
size: "medium"
|
|
@@ -218,7 +218,7 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
218
218
|
r.$slots.renderExtraFooter ? {
|
|
219
219
|
name: "renderExtraFooter",
|
|
220
220
|
fn: v(() => [
|
|
221
|
-
|
|
221
|
+
S(r.$slots, "renderExtraFooter", {}, void 0, !0)
|
|
222
222
|
]),
|
|
223
223
|
key: "0"
|
|
224
224
|
} : void 0
|
|
@@ -232,12 +232,12 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
232
232
|
_: 3
|
|
233
233
|
}, 8, ["locale"]),
|
|
234
234
|
r.error && r.errorLabel ? (f(), T(ae, { key: 0 }, [
|
|
235
|
-
r.errorMode === "default" ? (f(), T("div",
|
|
235
|
+
r.errorMode === "default" ? (f(), T("div", Xe, [
|
|
236
236
|
E("span", {
|
|
237
|
-
style:
|
|
237
|
+
style: j(H.value)
|
|
238
238
|
}, B(r.errorLabel), 5)
|
|
239
239
|
])) : L("", !0),
|
|
240
|
-
r.errorMode === "overlay" && z.value ? (f(),
|
|
240
|
+
r.errorMode === "overlay" && z.value ? (f(), _(a(fe), {
|
|
241
241
|
key: 1,
|
|
242
242
|
errorLabel: r.errorLabel,
|
|
243
243
|
getEl: () => {
|
|
@@ -249,18 +249,18 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
249
249
|
], 64)) : L("", !0)
|
|
250
250
|
], 6));
|
|
251
251
|
}
|
|
252
|
-
}), ye = (
|
|
253
|
-
const n =
|
|
252
|
+
}), ye = (R, q) => {
|
|
253
|
+
const n = R.__vccOpts || R;
|
|
254
254
|
for (const [t, m] of q)
|
|
255
255
|
n[t] = m;
|
|
256
256
|
return n;
|
|
257
|
-
},
|
|
257
|
+
}, Qe = /* @__PURE__ */ ye(Je, [["__scopeId", "data-v-aae115ee"]]), er = { class: "date-range-separator" }, rr = {
|
|
258
258
|
key: 0,
|
|
259
259
|
class: "das-date-picker-error-label-content"
|
|
260
|
-
},
|
|
260
|
+
}, tr = {
|
|
261
261
|
name: "DasDateRangePicker"
|
|
262
|
-
},
|
|
263
|
-
...
|
|
262
|
+
}, lr = /* @__PURE__ */ pe({
|
|
263
|
+
...tr,
|
|
264
264
|
props: {
|
|
265
265
|
modelValue: {},
|
|
266
266
|
borderType: { default: "bordered" },
|
|
@@ -286,12 +286,12 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
286
286
|
formSize: {}
|
|
287
287
|
},
|
|
288
288
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
289
|
-
setup(
|
|
289
|
+
setup(R, { emit: q }) {
|
|
290
290
|
ce((s) => ({
|
|
291
291
|
"896c5630": D.value,
|
|
292
292
|
c8f62436: p.value
|
|
293
293
|
}));
|
|
294
|
-
const n =
|
|
294
|
+
const n = R, t = q, m = Be(), O = i(() => n.placeholder ?? [ne("开始日期"), ne("结束日期")]), o = K(n, "modelValue"), M = K(n, "error"), p = i(() => n.width ? n.width : "230px"), D = i(() => n.height ? n.height : "auto"), N = i(() => ({ ...m, ...n.prevAttrs })), x = i(() => ({ ...m, ...n.nextAttrs })), U = u(), V = u(!1), W = u({
|
|
295
295
|
display: "block",
|
|
296
296
|
color: he("--das-ui-date-picker-overlay-error-color").value,
|
|
297
297
|
"white-space": "break-spaces"
|
|
@@ -301,8 +301,8 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
301
301
|
V.value = !1;
|
|
302
302
|
}, z = (s, c) => {
|
|
303
303
|
s ? P() : F();
|
|
304
|
-
},
|
|
305
|
-
t("openChange", s, c),
|
|
304
|
+
}, H = (s, c) => {
|
|
305
|
+
t("openChange", s, c), Y.value === "en" && Q(() => {
|
|
306
306
|
const g = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
307
307
|
for (let A of g)
|
|
308
308
|
A && (A.innerText = "OK");
|
|
@@ -313,7 +313,7 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
313
313
|
o.value[0] ? Ee.isDayjs(o.value[0]) ? o.value[0].format(s) : o.value[0] : "",
|
|
314
314
|
o.value[1] ? Ee.isDayjs(o.value[1]) ? o.value[1].format(s) : o.value[1] : ""
|
|
315
315
|
];
|
|
316
|
-
}), $ = (s) => n.disabledDate && n.disabledDate(s) === !0 ? !0 : !!(o.value[1] && s.isAfter(o.value[1], n.disabledUnit || void 0)), Z = (s) => n.disabledDate && n.disabledDate(s) === !0 ? !0 : !!(o.value[0] && s.isBefore(o.value[0], n.disabledUnit || void 0)),
|
|
316
|
+
}), $ = (s) => n.disabledDate && n.disabledDate(s) === !0 ? !0 : !!(o.value[1] && s.isAfter(o.value[1], n.disabledUnit || void 0)), Z = (s) => n.disabledDate && n.disabledDate(s) === !0 ? !0 : !!(o.value[0] && s.isBefore(o.value[0], n.disabledUnit || void 0)), X = i(() => ({
|
|
317
317
|
width: n.width
|
|
318
318
|
})), k = (s, c) => {
|
|
319
319
|
M.value = !1, t("update:model-value", o.value), t("change", o.value, b.value);
|
|
@@ -322,11 +322,11 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
322
322
|
};
|
|
323
323
|
return (s, c) => ve((f(), T("div", {
|
|
324
324
|
class: "das-ui-date-range-picker",
|
|
325
|
-
style:
|
|
325
|
+
style: j(X.value),
|
|
326
326
|
ref_key: "$dateRange",
|
|
327
327
|
ref: U
|
|
328
328
|
}, [
|
|
329
|
-
I(a(Ve), ue(
|
|
329
|
+
I(a(Ve), ue(N.value, {
|
|
330
330
|
modelValue: a(o)[0],
|
|
331
331
|
"onUpdate:modelValue": c[0] || (c[0] = (g) => a(o)[0] = g),
|
|
332
332
|
format: n.format,
|
|
@@ -336,12 +336,12 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
336
336
|
error: a(M),
|
|
337
337
|
width: n.itemWidth,
|
|
338
338
|
"disabled-date": $,
|
|
339
|
-
placeholder:
|
|
339
|
+
placeholder: O.value[0],
|
|
340
340
|
onChange: k,
|
|
341
|
-
onOpenChange: c[1] || (c[1] = (g) =>
|
|
341
|
+
onOpenChange: c[1] || (c[1] = (g) => H(g, "before"))
|
|
342
342
|
}), null, 16, ["modelValue", "format", "size", "valueFormat", "borderType", "error", "width", "placeholder"]),
|
|
343
|
-
|
|
344
|
-
E("span",
|
|
343
|
+
S(s.$slots, "separator", {}, () => [
|
|
344
|
+
E("span", er, B(n.separator), 1)
|
|
345
345
|
], !0),
|
|
346
346
|
I(a(Ve), ue(x.value, {
|
|
347
347
|
modelValue: a(o)[1],
|
|
@@ -353,17 +353,17 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
353
353
|
error: a(M),
|
|
354
354
|
width: n.itemWidth,
|
|
355
355
|
"disabled-date": Z,
|
|
356
|
-
placeholder:
|
|
356
|
+
placeholder: O.value[1],
|
|
357
357
|
onChange: h,
|
|
358
|
-
onOpenChange: c[3] || (c[3] = (g) =>
|
|
358
|
+
onOpenChange: c[3] || (c[3] = (g) => H(g, "after"))
|
|
359
359
|
}), null, 16, ["modelValue", "format", "size", "valueFormat", "borderType", "error", "width", "placeholder"]),
|
|
360
360
|
s.error && s.errorLabel ? (f(), T(ae, { key: 0 }, [
|
|
361
|
-
s.errorMode === "default" ? (f(), T("div",
|
|
361
|
+
s.errorMode === "default" ? (f(), T("div", rr, [
|
|
362
362
|
E("span", {
|
|
363
|
-
style:
|
|
363
|
+
style: j(W.value)
|
|
364
364
|
}, B(s.errorLabel), 5)
|
|
365
365
|
])) : L("", !0),
|
|
366
|
-
s.errorMode === "overlay" && V.value ? (f(),
|
|
366
|
+
s.errorMode === "overlay" && V.value ? (f(), _(a(fe), {
|
|
367
367
|
key: 1,
|
|
368
368
|
errorLabel: s.errorLabel,
|
|
369
369
|
getEl: () => U.value,
|
|
@@ -374,16 +374,16 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
374
374
|
[a(me), z]
|
|
375
375
|
]);
|
|
376
376
|
}
|
|
377
|
-
}),
|
|
377
|
+
}), or = /* @__PURE__ */ ye(lr, [["__scopeId", "data-v-3cd551f4"]]), ar = { class: "ant-picker-cell-inner" }, ur = { class: "das-picker-footer-extra" }, nr = {
|
|
378
378
|
key: 0,
|
|
379
379
|
class: "das-picker-ranges"
|
|
380
|
-
},
|
|
380
|
+
}, sr = { class: "das-picker-preset-span" }, ir = ["onClick"], dr = {
|
|
381
381
|
key: 0,
|
|
382
382
|
class: "das-date-picker-error-label-content"
|
|
383
|
-
},
|
|
383
|
+
}, pr = {
|
|
384
384
|
name: "DasRangePicker"
|
|
385
|
-
},
|
|
386
|
-
...
|
|
385
|
+
}, cr = /* @__PURE__ */ pe({
|
|
386
|
+
...pr,
|
|
387
387
|
props: {
|
|
388
388
|
modelValue: {},
|
|
389
389
|
borderType: { default: "bordered" },
|
|
@@ -408,17 +408,21 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
408
408
|
formSize: {}
|
|
409
409
|
},
|
|
410
410
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
411
|
-
setup(
|
|
411
|
+
setup(R, { expose: q, emit: n }) {
|
|
412
412
|
ce((e) => ({
|
|
413
|
-
"
|
|
414
|
-
|
|
413
|
+
"6699a438": N.value,
|
|
414
|
+
a038d66e: U.value
|
|
415
415
|
}));
|
|
416
|
-
const t =
|
|
417
|
-
|
|
416
|
+
const t = R, m = n;
|
|
417
|
+
ze({
|
|
418
418
|
fold: import("@das-fed/upf-ui/packages/icons/fold"),
|
|
419
419
|
riqixuanze: import("@das-fed/upf-ui/packages/icons/riqixuanze")
|
|
420
420
|
});
|
|
421
|
-
const
|
|
421
|
+
const O = u(void 0);
|
|
422
|
+
J(Y, async () => {
|
|
423
|
+
O.value = await Ue(Y.value);
|
|
424
|
+
}, { immediate: !0 });
|
|
425
|
+
const o = u(null), M = u(null), p = K(t, "modelValue"), D = K(t, "error"), N = i(() => t.width ? t.width : "230px"), x = i(() => t.formSize), U = i(() => t.height ? t.height : x.value ? {
|
|
422
426
|
small: "24px",
|
|
423
427
|
default: "32px",
|
|
424
428
|
large: "40px"
|
|
@@ -431,41 +435,41 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
431
435
|
}), z = i(() => {
|
|
432
436
|
var e;
|
|
433
437
|
return t.isView ? t.noSetDefaultVal ? ["", ""] : ["-", "-"] : (e = t.placeholder) == null ? void 0 : e.map((d) => ne(d));
|
|
434
|
-
}),
|
|
438
|
+
}), H = i(() => ({
|
|
435
439
|
width: t.width
|
|
436
|
-
})), b = u(!1), $ = u(["", ""]), Z = u("~"),
|
|
440
|
+
})), b = u(!1), $ = u(["", ""]), Z = u("~"), X = i(() => {
|
|
437
441
|
var e;
|
|
438
442
|
return (e = p.value) != null && e.length && p.value[0] && p.value[1] ? $.value.join(" " + Z.value + " ") : z.value.join(" " + Z.value + " ");
|
|
439
443
|
}), k = u([0, 0]), h = u([0, 0]), s = () => {
|
|
440
|
-
var
|
|
444
|
+
var C;
|
|
441
445
|
let e = [];
|
|
442
|
-
const d = (
|
|
446
|
+
const d = (C = o.value) == null ? void 0 : C.$el.querySelectorAll(".ant-picker-input>input");
|
|
443
447
|
if (!d)
|
|
444
448
|
return e = [0, 0], e;
|
|
445
449
|
let y = [];
|
|
446
|
-
for (let
|
|
447
|
-
y.push(
|
|
448
|
-
let Pe = (
|
|
450
|
+
for (let G of d) {
|
|
451
|
+
y.push(G.getAttribute("value") || "");
|
|
452
|
+
let Pe = (G == null ? void 0 : G.offsetWidth) ?? 0;
|
|
449
453
|
e.push(Pe);
|
|
450
454
|
}
|
|
451
455
|
return $.value = y, e;
|
|
452
456
|
}, c = (e) => {
|
|
453
457
|
const d = t.size === "table" ? 12 : 14;
|
|
454
|
-
return
|
|
458
|
+
return Se(e, d);
|
|
455
459
|
}, g = () => {
|
|
456
460
|
var y;
|
|
457
461
|
let e = [];
|
|
458
|
-
return ((y = o.value) == null ? void 0 : y.$el.querySelectorAll(".ant-picker-input>input")).forEach((
|
|
459
|
-
p.value.length && p.value[0] && p.value[0] ? e.push(
|
|
462
|
+
return ((y = o.value) == null ? void 0 : y.$el.querySelectorAll(".ant-picker-input>input")).forEach((C, G) => {
|
|
463
|
+
p.value.length && p.value[0] && p.value[0] ? e.push(C == null ? void 0 : C.scrollWidth) : e.push(c(z.value[G]));
|
|
460
464
|
}), e;
|
|
461
465
|
};
|
|
462
|
-
|
|
463
|
-
|
|
466
|
+
J(() => [z.value, p.value], () => {
|
|
467
|
+
Q(() => {
|
|
464
468
|
k.value = s(), h.value = g(), (k.value[0] === h.value[0] || h.value[0] - k.value[0] < 1) && (k.value[1] === h.value[1] || h.value[1] - k.value[1] < 1) && (b.value = !1);
|
|
465
469
|
});
|
|
466
470
|
});
|
|
467
471
|
const w = u();
|
|
468
|
-
|
|
472
|
+
J(
|
|
469
473
|
() => {
|
|
470
474
|
var e;
|
|
471
475
|
return (e = M.value) == null ? void 0 : e.$tooltipRef.popperRef.contentRef;
|
|
@@ -481,7 +485,7 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
481
485
|
}
|
|
482
486
|
);
|
|
483
487
|
const re = (e) => {
|
|
484
|
-
e && (V.value = Ie().nextZIndex()), m("openChange", e),
|
|
488
|
+
e && (V.value = Ie().nextZIndex()), m("openChange", e), Y.value === "en" && Q(() => {
|
|
485
489
|
const d = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
486
490
|
for (let y of d)
|
|
487
491
|
y && (y.innerText = "OK");
|
|
@@ -513,9 +517,9 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
513
517
|
}
|
|
514
518
|
}), (e, d) => (f(), T("div", {
|
|
515
519
|
class: be(["das-ui-range-picker", [e.borderType, t.isView ? "readonly" : "", a(D) ? "is-error" : ""]]),
|
|
516
|
-
style:
|
|
520
|
+
style: j(H.value)
|
|
517
521
|
}, [
|
|
518
|
-
I(a(we), { locale:
|
|
522
|
+
I(a(we), { locale: O.value }, {
|
|
519
523
|
default: v(() => [
|
|
520
524
|
I(a(Te), {
|
|
521
525
|
ref_key: "inputTooltipRef",
|
|
@@ -524,10 +528,10 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
524
528
|
trigger: "hover",
|
|
525
529
|
visible: b.value,
|
|
526
530
|
disabled: !e.isTooltip,
|
|
527
|
-
content:
|
|
531
|
+
content: X.value
|
|
528
532
|
}, {
|
|
529
533
|
default: v(() => [
|
|
530
|
-
ve((f(),
|
|
534
|
+
ve((f(), _(a(We), ue({
|
|
531
535
|
ref_key: "$rangePicker",
|
|
532
536
|
ref: o
|
|
533
537
|
}, e.$attrs, {
|
|
@@ -540,31 +544,31 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
540
544
|
showTime: e.showTime,
|
|
541
545
|
bordered: e.borderType === "bordered",
|
|
542
546
|
disabled: t.disabled || t.isView,
|
|
543
|
-
style:
|
|
547
|
+
style: H.value,
|
|
544
548
|
popupStyle: W.value,
|
|
545
549
|
onChange: se,
|
|
546
550
|
onOpenChange: re
|
|
547
551
|
}), {
|
|
548
552
|
dateRender: v((y) => [
|
|
549
|
-
|
|
550
|
-
E("div",
|
|
553
|
+
S(e.$slots, "dateRender", ke(ge(y)), () => [
|
|
554
|
+
E("div", ar, B(y.current.date()), 1)
|
|
551
555
|
], !0)
|
|
552
556
|
]),
|
|
553
557
|
nextIcon: v(() => d[1] || (d[1] = [
|
|
554
558
|
Le(" XX ")
|
|
555
559
|
])),
|
|
556
560
|
prevIcon: v(() => [
|
|
557
|
-
|
|
561
|
+
S(e.$slots, "prevIcon", {}, void 0, !0)
|
|
558
562
|
]),
|
|
559
563
|
superNextIcon: v(() => [
|
|
560
|
-
|
|
564
|
+
S(e.$slots, "superNextIcon", {}, void 0, !0)
|
|
561
565
|
]),
|
|
562
566
|
superPrevIcon: v(() => [
|
|
563
|
-
|
|
567
|
+
S(e.$slots, "superPrevIcon", {}, void 0, !0)
|
|
564
568
|
]),
|
|
565
569
|
suffixIcon: v(() => [
|
|
566
|
-
|
|
567
|
-
I(a(
|
|
570
|
+
S(e.$slots, "suffixIcon", {}, () => [
|
|
571
|
+
I(a(ee), {
|
|
568
572
|
class: "das-suffix-icon",
|
|
569
573
|
icon: "riqixuanze",
|
|
570
574
|
size: "medium"
|
|
@@ -572,32 +576,32 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
572
576
|
], !0)
|
|
573
577
|
]),
|
|
574
578
|
separator: v(() => [
|
|
575
|
-
|
|
579
|
+
S(e.$slots, "separator", {}, () => [
|
|
576
580
|
d[2] || (d[2] = E("div", { style: { padding: "0 8px" } }, "~", -1))
|
|
577
581
|
], !0)
|
|
578
582
|
]),
|
|
579
583
|
renderExtraFooter: v(() => [
|
|
580
|
-
E("div",
|
|
581
|
-
|
|
584
|
+
E("div", ur, [
|
|
585
|
+
S(e.$slots, "renderExtraFooter", {}, void 0, !0)
|
|
582
586
|
]),
|
|
583
|
-
e.showTime || e.ranges && e.ranges.length ? (f(), T("div",
|
|
587
|
+
e.showTime || e.ranges && e.ranges.length ? (f(), T("div", nr, [
|
|
584
588
|
(f(!0), T(ae, null, Me(e.ranges, (y) => (f(), T("div", {
|
|
585
589
|
class: "das-picker-preset",
|
|
586
590
|
key: y.key
|
|
587
591
|
}, [
|
|
588
|
-
y.type === "dropdown" && y.children.length ? (f(),
|
|
592
|
+
y.type === "dropdown" && y.children.length ? (f(), _(a(Fe), {
|
|
589
593
|
key: 0,
|
|
590
594
|
trigger: ["click"]
|
|
591
595
|
}, {
|
|
592
596
|
overlay: v(() => [
|
|
593
597
|
I(a(Ze), null, {
|
|
594
598
|
default: v(() => [
|
|
595
|
-
(f(!0), T(ae, null, Me(y.children, (
|
|
596
|
-
key:
|
|
597
|
-
onClick: (
|
|
599
|
+
(f(!0), T(ae, null, Me(y.children, (C) => (f(), _(a(Ae), {
|
|
600
|
+
key: C.key,
|
|
601
|
+
onClick: (G) => ie(C)
|
|
598
602
|
}, {
|
|
599
603
|
default: v(() => [
|
|
600
|
-
(f(), T("span", { key:
|
|
604
|
+
(f(), T("span", { key: C }, B(C.key), 1))
|
|
601
605
|
]),
|
|
602
606
|
_: 2
|
|
603
607
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -608,12 +612,12 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
608
612
|
default: v(() => [
|
|
609
613
|
E("a", {
|
|
610
614
|
class: "ant-dropdown-link",
|
|
611
|
-
onClick: d[0] || (d[0] =
|
|
615
|
+
onClick: d[0] || (d[0] = Re(() => {
|
|
612
616
|
}, ["prevent"]))
|
|
613
617
|
}, [
|
|
614
|
-
E("span",
|
|
618
|
+
E("span", sr, [
|
|
615
619
|
Le(B(y.key) + " ", 1),
|
|
616
|
-
I(a(
|
|
620
|
+
I(a(ee), {
|
|
617
621
|
icon: "fold",
|
|
618
622
|
size: "mini",
|
|
619
623
|
style: { display: "inline-block" }
|
|
@@ -625,8 +629,8 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
625
629
|
}, 1024)) : (f(), T("span", {
|
|
626
630
|
key: 1,
|
|
627
631
|
class: "das-picker-preset-span",
|
|
628
|
-
onClick: (
|
|
629
|
-
}, B(y.key), 9,
|
|
632
|
+
onClick: (C) => ie(y)
|
|
633
|
+
}, B(y.key), 9, ir))
|
|
630
634
|
]))), 128))
|
|
631
635
|
])) : L("", !0)
|
|
632
636
|
]),
|
|
@@ -641,12 +645,12 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
641
645
|
_: 3
|
|
642
646
|
}, 8, ["locale"]),
|
|
643
647
|
e.error && e.errorLabel ? (f(), T(ae, { key: 0 }, [
|
|
644
|
-
e.errorMode === "default" ? (f(), T("div",
|
|
648
|
+
e.errorMode === "default" ? (f(), T("div", dr, [
|
|
645
649
|
E("span", {
|
|
646
|
-
style:
|
|
650
|
+
style: j(F.value)
|
|
647
651
|
}, B(e.errorLabel), 5)
|
|
648
652
|
])) : L("", !0),
|
|
649
|
-
e.errorMode === "overlay" && P.value ? (f(),
|
|
653
|
+
e.errorMode === "overlay" && P.value ? (f(), _(a(fe), {
|
|
650
654
|
key: 1,
|
|
651
655
|
errorLabel: e.errorLabel,
|
|
652
656
|
getEl: () => {
|
|
@@ -658,13 +662,13 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
658
662
|
], 64)) : L("", !0)
|
|
659
663
|
], 6));
|
|
660
664
|
}
|
|
661
|
-
}),
|
|
665
|
+
}), vr = /* @__PURE__ */ ye(cr, [["__scopeId", "data-v-15370576"]]), fr = { class: "ant-picker-cell-inner" }, mr = {
|
|
662
666
|
key: 0,
|
|
663
667
|
class: "das-date-picker-error-label-content"
|
|
664
|
-
},
|
|
668
|
+
}, hr = {
|
|
665
669
|
name: "DasDatePicker"
|
|
666
|
-
},
|
|
667
|
-
...
|
|
670
|
+
}, yr = /* @__PURE__ */ pe({
|
|
671
|
+
...hr,
|
|
668
672
|
props: {
|
|
669
673
|
modelValue: {},
|
|
670
674
|
borderType: { default: "bordered" },
|
|
@@ -686,12 +690,12 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
686
690
|
formSize: {}
|
|
687
691
|
},
|
|
688
692
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
689
|
-
setup(
|
|
693
|
+
setup(R, { expose: q, emit: n }) {
|
|
690
694
|
ce((r) => ({
|
|
691
|
-
"7ece8211":
|
|
695
|
+
"7ece8211": N.value,
|
|
692
696
|
"4132c63c": U.value
|
|
693
697
|
}));
|
|
694
|
-
const t =
|
|
698
|
+
const t = R, m = n, O = i(() => Y.value === "zh-CN" ? $e : De), o = u(null), M = u(null), p = K(t, "modelValue"), D = K(t, "error"), N = i(() => t.width ? t.width : "230px"), x = i(() => t.formSize), U = i(() => t.height ? t.height : x.value ? {
|
|
695
699
|
small: "24px",
|
|
696
700
|
default: "32px",
|
|
697
701
|
large: "40px"
|
|
@@ -699,19 +703,19 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
699
703
|
width: t.width
|
|
700
704
|
})), W = i(() => t.isView ? t.noSetDefaultVal ? "" : "-" : ne(t.placeholder)), P = u(3e3), F = i(() => ({
|
|
701
705
|
"z-index": P.value
|
|
702
|
-
})), z = u(!1),
|
|
706
|
+
})), z = u(!1), H = u({
|
|
703
707
|
display: "block",
|
|
704
708
|
color: he("--das-ui-date-picker-overlay-error-color").value,
|
|
705
709
|
"white-space": "break-spaces"
|
|
706
710
|
}), b = (r) => {
|
|
707
|
-
r && (P.value = Ie().nextZIndex()), m("openChange", r),
|
|
711
|
+
r && (P.value = Ie().nextZIndex()), m("openChange", r), Y.value === "en" && Q(() => {
|
|
708
712
|
const l = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
709
713
|
for (let e of l)
|
|
710
714
|
e && (e.innerText = "OK");
|
|
711
715
|
});
|
|
712
|
-
}, $ = u(!1), Z = u(""),
|
|
716
|
+
}, $ = u(!1), Z = u(""), X = i(() => p.value ? Z.value : W.value), k = () => {
|
|
713
717
|
const r = t.size === "table" ? 12 : 14;
|
|
714
|
-
return
|
|
718
|
+
return Se(W.value, r);
|
|
715
719
|
}, h = () => {
|
|
716
720
|
var l;
|
|
717
721
|
const r = (l = o.value) == null ? void 0 : l.$el.querySelector(".ant-picker-input>input");
|
|
@@ -721,13 +725,13 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
721
725
|
const r = (e = o.value) == null ? void 0 : e.$el.querySelector(".ant-picker-input>input");
|
|
722
726
|
return r ? (Z.value = r.getAttribute("value"), r.removeAttribute("title"), (r == null ? void 0 : r.offsetWidth) ?? 0) : 0;
|
|
723
727
|
}, c = u(0), g = u(0);
|
|
724
|
-
|
|
725
|
-
|
|
728
|
+
J(() => [W.value, p.value], () => {
|
|
729
|
+
Q(() => {
|
|
726
730
|
c.value = s(), g.value = h(), (c.value === g.value || g.value - c.value < 1) && ($.value = !1);
|
|
727
731
|
});
|
|
728
732
|
});
|
|
729
733
|
const w = u();
|
|
730
|
-
|
|
734
|
+
J(
|
|
731
735
|
() => {
|
|
732
736
|
var r;
|
|
733
737
|
return (r = M.value) == null ? void 0 : r.$tooltipRef.popperRef.contentRef;
|
|
@@ -763,9 +767,9 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
763
767
|
}
|
|
764
768
|
}), (r, l) => (f(), T("div", {
|
|
765
769
|
class: be(["das-ui-time-picker", [r.borderType, t.isView ? "readonly" : "", a(D) ? "is-error" : ""]]),
|
|
766
|
-
style:
|
|
770
|
+
style: j(V.value)
|
|
767
771
|
}, [
|
|
768
|
-
I(a(we), { locale:
|
|
772
|
+
I(a(we), { locale: O.value }, {
|
|
769
773
|
default: v(() => [
|
|
770
774
|
I(a(Te), {
|
|
771
775
|
ref_key: "inputTooltipRef",
|
|
@@ -774,15 +778,15 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
774
778
|
trigger: "hover",
|
|
775
779
|
visible: $.value,
|
|
776
780
|
disabled: !r.isTooltip,
|
|
777
|
-
content:
|
|
781
|
+
content: X.value
|
|
778
782
|
}, {
|
|
779
783
|
default: v(() => [
|
|
780
|
-
ve((f(),
|
|
784
|
+
ve((f(), _(a(qe), ue({
|
|
781
785
|
ref_key: "$timePicker",
|
|
782
786
|
ref: o
|
|
783
787
|
}, r.$attrs, {
|
|
784
788
|
value: a(p),
|
|
785
|
-
"onUpdate:value": l[0] || (l[0] = (e) =>
|
|
789
|
+
"onUpdate:value": l[0] || (l[0] = (e) => Ce(p) ? p.value = e : null),
|
|
786
790
|
size: t.size,
|
|
787
791
|
popupClassName: "das-ui-time-picker-dropdown " + r.dropdownClassName,
|
|
788
792
|
showNow: r.showNow,
|
|
@@ -795,13 +799,13 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
795
799
|
onOpenChange: b
|
|
796
800
|
}), {
|
|
797
801
|
dateRender: v((e) => [
|
|
798
|
-
|
|
799
|
-
E("div",
|
|
802
|
+
S(r.$slots, "dateRender", ke(ge(e)), () => [
|
|
803
|
+
E("div", fr, B(e.current.date()), 1)
|
|
800
804
|
], !0)
|
|
801
805
|
]),
|
|
802
806
|
suffixIcon: v(() => [
|
|
803
|
-
|
|
804
|
-
I(a(
|
|
807
|
+
S(r.$slots, "suffixIcon", {}, () => [
|
|
808
|
+
I(a(je), {
|
|
805
809
|
class: "das-suffix-icon",
|
|
806
810
|
size: "medium"
|
|
807
811
|
})
|
|
@@ -818,12 +822,12 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
818
822
|
_: 3
|
|
819
823
|
}, 8, ["locale"]),
|
|
820
824
|
r.error && r.errorLabel ? (f(), T(ae, { key: 0 }, [
|
|
821
|
-
r.errorMode === "default" ? (f(), T("div",
|
|
825
|
+
r.errorMode === "default" ? (f(), T("div", mr, [
|
|
822
826
|
E("span", {
|
|
823
|
-
style:
|
|
827
|
+
style: j(H.value)
|
|
824
828
|
}, B(r.errorLabel), 5)
|
|
825
829
|
])) : L("", !0),
|
|
826
|
-
r.errorMode === "overlay" && z.value ? (f(),
|
|
830
|
+
r.errorMode === "overlay" && z.value ? (f(), _(a(fe), {
|
|
827
831
|
key: 1,
|
|
828
832
|
errorLabel: r.errorLabel,
|
|
829
833
|
getEl: () => {
|
|
@@ -835,13 +839,13 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
835
839
|
], 64)) : L("", !0)
|
|
836
840
|
], 6));
|
|
837
841
|
}
|
|
838
|
-
}),
|
|
842
|
+
}), br = /* @__PURE__ */ ye(yr, [["__scopeId", "data-v-66774e5c"]]), kr = { class: "ant-picker-cell-inner" }, gr = {
|
|
839
843
|
key: 0,
|
|
840
844
|
class: "das-date-picker-error-label-content"
|
|
841
|
-
},
|
|
845
|
+
}, wr = {
|
|
842
846
|
name: "DasDatePicker"
|
|
843
|
-
},
|
|
844
|
-
...
|
|
847
|
+
}, Tr = /* @__PURE__ */ pe({
|
|
848
|
+
...wr,
|
|
845
849
|
props: {
|
|
846
850
|
modelValue: {},
|
|
847
851
|
borderType: { default: "bordered" },
|
|
@@ -863,14 +867,14 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
863
867
|
formSize: {}
|
|
864
868
|
},
|
|
865
869
|
emits: ["change", "openChange", "update:model-value", "update:error"],
|
|
866
|
-
setup(
|
|
870
|
+
setup(R, { expose: q, emit: n }) {
|
|
867
871
|
ce((l) => ({
|
|
868
|
-
"7409072d":
|
|
872
|
+
"7409072d": N.value,
|
|
869
873
|
"196e36c0": U.value
|
|
870
|
-
})),
|
|
874
|
+
})), ze({
|
|
871
875
|
dengdai: import("@das-fed/upf-ui/packages/icons/dengdai")
|
|
872
876
|
});
|
|
873
|
-
const t =
|
|
877
|
+
const t = R, m = n, O = i(() => Y.value === "zh-CN" ? $e : De), o = u(null), M = u(null), p = K(t, "modelValue"), D = K(t, "error"), N = i(() => t.width ? t.width : "230px"), x = i(() => t.formSize), U = i(() => t.height ? t.height : x.value ? {
|
|
874
878
|
small: "24px",
|
|
875
879
|
default: "32px",
|
|
876
880
|
large: "40px"
|
|
@@ -881,11 +885,11 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
881
885
|
})), F = i(() => {
|
|
882
886
|
var l;
|
|
883
887
|
return t.isView ? t.noSetDefaultVal ? ["", ""] : ["-", "-"] : (l = t.placeholder) == null ? void 0 : l.map((e) => ne(e));
|
|
884
|
-
}), z = u(!1),
|
|
888
|
+
}), z = u(!1), H = u({
|
|
885
889
|
display: "block",
|
|
886
890
|
color: he("--das-ui-date-picker-overlay-error-color").value,
|
|
887
891
|
"white-space": "break-spaces"
|
|
888
|
-
}), b = u(!1), $ = u(["", ""]), Z = u("~"),
|
|
892
|
+
}), b = u(!1), $ = u(["", ""]), Z = u("~"), X = i(() => {
|
|
889
893
|
var l;
|
|
890
894
|
return (l = p.value) != null && l.length && p.value[0] && p.value[1] ? $.value.join(" " + Z.value + " ") : F.value.join(" " + Z.value + " ");
|
|
891
895
|
}), k = u([0, 0]), h = u([0, 0]), s = () => {
|
|
@@ -895,29 +899,29 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
895
899
|
if (!e)
|
|
896
900
|
return l = [0, 0], l;
|
|
897
901
|
let d = [];
|
|
898
|
-
for (let
|
|
899
|
-
d.push(
|
|
900
|
-
let
|
|
901
|
-
l.push(
|
|
902
|
+
for (let C of e) {
|
|
903
|
+
d.push(C.getAttribute("value") || "");
|
|
904
|
+
let G = (C == null ? void 0 : C.offsetWidth) ?? 0;
|
|
905
|
+
l.push(G);
|
|
902
906
|
}
|
|
903
907
|
return $.value = d, l;
|
|
904
908
|
}, c = (l) => {
|
|
905
909
|
const e = t.size === "table" ? 12 : 14;
|
|
906
|
-
return
|
|
910
|
+
return Se(l, e);
|
|
907
911
|
}, g = () => {
|
|
908
912
|
var d;
|
|
909
913
|
let l = [];
|
|
910
|
-
return ((d = o.value) == null ? void 0 : d.$el.querySelectorAll(".ant-picker-input>input")).forEach((y,
|
|
911
|
-
p.value.length && p.value[0] && p.value[0] ? l.push(y == null ? void 0 : y.scrollWidth) : l.push(c(F.value[
|
|
914
|
+
return ((d = o.value) == null ? void 0 : d.$el.querySelectorAll(".ant-picker-input>input")).forEach((y, C) => {
|
|
915
|
+
p.value.length && p.value[0] && p.value[0] ? l.push(y == null ? void 0 : y.scrollWidth) : l.push(c(F.value[C]));
|
|
912
916
|
}), l;
|
|
913
917
|
};
|
|
914
|
-
|
|
915
|
-
|
|
918
|
+
J(() => [F.value, p.value], () => {
|
|
919
|
+
Q(() => {
|
|
916
920
|
k.value = s(), h.value = g(), (k.value[0] === h.value[0] || h.value[0] - k.value[0] < 1) && (k.value[1] === h.value[1] || h.value[1] - k.value[1] < 1) && (b.value = !1);
|
|
917
921
|
});
|
|
918
922
|
});
|
|
919
923
|
const w = u();
|
|
920
|
-
|
|
924
|
+
J(
|
|
921
925
|
() => {
|
|
922
926
|
var l;
|
|
923
927
|
return (l = M.value) == null ? void 0 : l.$tooltipRef.popperRef.contentRef;
|
|
@@ -933,7 +937,7 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
933
937
|
}
|
|
934
938
|
);
|
|
935
939
|
const re = (l) => {
|
|
936
|
-
l && (V.value = Ie().nextZIndex()), m("openChange", l),
|
|
940
|
+
l && (V.value = Ie().nextZIndex()), m("openChange", l), Y.value === "en" && Q(() => {
|
|
937
941
|
const e = document == null ? void 0 : document.querySelectorAll(".ant-picker-ok > .ant-btn > span");
|
|
938
942
|
for (let d of e)
|
|
939
943
|
d && (d.innerText = "OK");
|
|
@@ -963,9 +967,9 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
963
967
|
}
|
|
964
968
|
}), (l, e) => (f(), T("div", {
|
|
965
969
|
class: be(["das-ui-time-range-picker", [l.borderType, t.isView ? "readonly" : "", a(D) ? "is-error" : ""]]),
|
|
966
|
-
style:
|
|
970
|
+
style: j(P.value)
|
|
967
971
|
}, [
|
|
968
|
-
I(a(we), { locale:
|
|
972
|
+
I(a(we), { locale: O.value }, {
|
|
969
973
|
default: v(() => [
|
|
970
974
|
I(a(Te), {
|
|
971
975
|
ref_key: "inputTooltipRef",
|
|
@@ -974,15 +978,15 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
974
978
|
trigger: "hover",
|
|
975
979
|
visible: b.value,
|
|
976
980
|
disabled: !l.isTooltip,
|
|
977
|
-
content:
|
|
981
|
+
content: X.value
|
|
978
982
|
}, {
|
|
979
983
|
default: v(() => [
|
|
980
|
-
ve((f(),
|
|
984
|
+
ve((f(), _(a(Oe), ue({
|
|
981
985
|
ref_key: "$timeRangePicker",
|
|
982
986
|
ref: o
|
|
983
987
|
}, l.$attrs, {
|
|
984
988
|
value: a(p),
|
|
985
|
-
"onUpdate:value": e[0] || (e[0] = (d) =>
|
|
989
|
+
"onUpdate:value": e[0] || (e[0] = (d) => Ce(p) ? p.value = d : null),
|
|
986
990
|
size: t.size,
|
|
987
991
|
popupClassName: "das-ui-time-range-picker-dropdown " + l.dropdownClassName,
|
|
988
992
|
showNow: l.showNow,
|
|
@@ -995,13 +999,13 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
995
999
|
onOpenChange: re
|
|
996
1000
|
}), {
|
|
997
1001
|
dateRender: v((d) => [
|
|
998
|
-
|
|
999
|
-
E("div",
|
|
1002
|
+
S(l.$slots, "dateRender", ke(ge(d)), () => [
|
|
1003
|
+
E("div", kr, B(d.current.date()), 1)
|
|
1000
1004
|
], !0)
|
|
1001
1005
|
]),
|
|
1002
1006
|
suffixIcon: v(() => [
|
|
1003
|
-
|
|
1004
|
-
I(a(
|
|
1007
|
+
S(l.$slots, "suffixIcon", {}, () => [
|
|
1008
|
+
I(a(ee), {
|
|
1005
1009
|
class: "das-suffix-icon",
|
|
1006
1010
|
icon: "dengdai",
|
|
1007
1011
|
size: "medium"
|
|
@@ -1009,7 +1013,7 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
1009
1013
|
], !0)
|
|
1010
1014
|
]),
|
|
1011
1015
|
separator: v(() => [
|
|
1012
|
-
|
|
1016
|
+
S(l.$slots, "separator", {}, () => [
|
|
1013
1017
|
e[1] || (e[1] = E("div", { style: { padding: "0 8px" } }, "~", -1))
|
|
1014
1018
|
], !0)
|
|
1015
1019
|
]),
|
|
@@ -1024,12 +1028,12 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
1024
1028
|
_: 3
|
|
1025
1029
|
}, 8, ["locale"]),
|
|
1026
1030
|
l.error && l.errorLabel ? (f(), T(ae, { key: 0 }, [
|
|
1027
|
-
l.errorMode === "default" ? (f(), T("div",
|
|
1031
|
+
l.errorMode === "default" ? (f(), T("div", gr, [
|
|
1028
1032
|
E("span", {
|
|
1029
|
-
style:
|
|
1033
|
+
style: j(H.value)
|
|
1030
1034
|
}, B(l.errorLabel), 5)
|
|
1031
1035
|
])) : L("", !0),
|
|
1032
|
-
l.errorMode === "overlay" && z.value ? (f(),
|
|
1036
|
+
l.errorMode === "overlay" && z.value ? (f(), _(a(fe), {
|
|
1033
1037
|
key: 1,
|
|
1034
1038
|
errorLabel: l.errorLabel,
|
|
1035
1039
|
getEl: () => {
|
|
@@ -1041,7 +1045,7 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
1041
1045
|
], 64)) : L("", !0)
|
|
1042
1046
|
], 6));
|
|
1043
1047
|
}
|
|
1044
|
-
}),
|
|
1048
|
+
}), Ir = /* @__PURE__ */ ye(Tr, [["__scopeId", "data-v-b73a4631"]]), Sr = {
|
|
1045
1049
|
"--das-ui-date-picker-color-defalut-text": "#212121",
|
|
1046
1050
|
// 默认字体色
|
|
1047
1051
|
"--das-ui-date-picker-color-primary": "#5582F3",
|
|
@@ -1074,14 +1078,14 @@ const je = { class: "ant-picker-cell-inner" }, Ke = {
|
|
|
1074
1078
|
请选择日期: { "zh-CN": "请选择日期", en: "Please select a date", _appCode: "framework" },
|
|
1075
1079
|
请选择时间: { "zh-CN": "请选择时间", en: "Please select the time", _appCode: "framework" }
|
|
1076
1080
|
};
|
|
1077
|
-
|
|
1078
|
-
_e(
|
|
1079
|
-
const
|
|
1081
|
+
Ye(Cr);
|
|
1082
|
+
_e(Sr);
|
|
1083
|
+
const Xr = de(Qe), Gr = de(or), Jr = de(vr), Qr = de(br), et = de(Ir), rt = { name: "datePicker 日期时间选择器" };
|
|
1080
1084
|
export {
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1085
|
+
Xr as DasDatePicker,
|
|
1086
|
+
Gr as DasDateRangePicker,
|
|
1087
|
+
Jr as DasRangePicker,
|
|
1088
|
+
Qr as DasTimePicker,
|
|
1089
|
+
et as DasTimeRangePicker,
|
|
1090
|
+
rt as default
|
|
1087
1091
|
};
|