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