@das-fed/upf-ui 6.4.0-dev.281 → 6.4.0-dev.283
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/front-end/i18n/front-end-page/dasui_en-US.js +3 -3
- package/front-end/i18n/front-end-page/dasui_zh-CN.js +3 -3
- package/front-end/i18n/front-end-page/dasui_zh-MO.js +3 -3
- package/package.json +3 -3
- package/packages/components/date-picker/index.js +636 -637
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/style.css +1 -1
- package/packages/components/date-picker/style.css.gz +0 -0
- package/packages/components/select/index.js +138 -139
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/src/type.d.ts +6 -8
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +0 -2
- package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +0 -2
|
@@ -1,41 +1,40 @@
|
|
|
1
1
|
import { withInstall as el } from "@das-fed/upf-utils/with-install/index";
|
|
2
|
-
import { defineComponent as ll, useCssVars as
|
|
3
|
-
import { Select as
|
|
2
|
+
import { defineComponent as ll, useCssVars as Ul, useAttrs as jl, computed as s, ref as i, watch as G, useSlots as Gl, onMounted as Ae, onUnmounted as Xe, watchEffect as Je, nextTick as k, resolveComponent as Xl, openBlock as f, createElementBlock as y, normalizeClass as Jl, normalizeStyle as X, withModifiers as ue, createBlock as K, unref as c, createCommentVNode as L, withDirectives as Te, mergeProps as Le, createSlots as Ql, withCtx as m, renderSlot as S, normalizeProps as ie, guardReactiveProps as ce, Fragment as ke, createTextVNode as Ve, toDisplayString as Z, createElementVNode as b, createVNode as V, withKeys as Yl } from "vue";
|
|
3
|
+
import { Select as et, Tag as Ie } from "ant-design-vue";
|
|
4
4
|
import { DasCheckbox as Qe } from "@das-fed/upf-ui/packages/components/checkbox/index";
|
|
5
|
-
import { vScrollbar as
|
|
6
|
-
import { DasTooltip as
|
|
5
|
+
import { vScrollbar as lt } from "@das-fed/upf-ui/packages/components/scrollbar/index";
|
|
6
|
+
import { DasTooltip as tt } from "@das-fed/upf-ui/packages/components/tooltip/index";
|
|
7
7
|
import { vDasTooltip as Ye } from "@das-fed/upf-ui/packages/components/text-tooltip/index";
|
|
8
|
-
import { DasInput as
|
|
9
|
-
import { DasIconXiala as
|
|
10
|
-
import { DasIconEmpty as
|
|
11
|
-
import { DasErrorOverlayModel as
|
|
12
|
-
import { vHoverInside as
|
|
13
|
-
import { t as M, currentLang as
|
|
14
|
-
import { useZIndex as
|
|
15
|
-
import { useModelValue as
|
|
16
|
-
import { calcTextWidth as
|
|
8
|
+
import { DasInput as ot } from "@das-fed/upf-ui/packages/components/input/index";
|
|
9
|
+
import { DasIconXiala as nt } from "@das-fed/upf-ui/packages/icons/xiala/index";
|
|
10
|
+
import { DasIconEmpty as at } from "@das-fed/upf-ui/packages/icons/empty/index";
|
|
11
|
+
import { DasErrorOverlayModel as rt } from "@das-fed/upf-ui/packages/components/error-overlay-model/index";
|
|
12
|
+
import { vHoverInside as st } from "@das-fed/upf-utils/directive";
|
|
13
|
+
import { t as M, currentLang as ut, setI18nRule as it } from "@das-fed/upf-web/packages/i18n/index";
|
|
14
|
+
import { useZIndex as ct } from "@das-fed/upf-utils/hooks/popup-manager/use-zindex";
|
|
15
|
+
import { useModelValue as dt } from "@das-fed/upf-utils/vue";
|
|
16
|
+
import { calcTextWidth as ft } from "@das-fed/upf-utils/common-tools";
|
|
17
17
|
import "ant-design-vue/es/select/style/css";
|
|
18
18
|
import "ant-design-vue/es/tag/style/css";
|
|
19
|
-
import { SelectOption as
|
|
19
|
+
import { SelectOption as vt } from "ant-design-vue/es"
|
|
20
20
|
import '@das-fed/upf-ui/packages/components/select/style.css';
|
|
21
21
|
;
|
|
22
|
-
const
|
|
22
|
+
const pt = { key: 0 }, ht = ["onClick"], mt = { style: { display: "inline-block" } }, gt = ["innerHTML"], yt = { key: 0 }, bt = { key: 2 }, Ct = { style: { display: "inline-block" } }, wt = ["innerHTML"], St = ["innerHTML"], xt = {
|
|
23
23
|
key: 0,
|
|
24
24
|
class: "das-select-error-label-content das-select-label-content"
|
|
25
|
-
},
|
|
25
|
+
}, At = { class: "ant-select ant-select-multiple ant-select-selection-overflow-item ant-select-selection-overflow-item-rest" }, Tt = { class: "ant-select-selection-item" }, kt = { class: "ant-select-selection-item-content" }, Vt = ["innerHTML"], It = ll({
|
|
26
26
|
inheritAttrs: !1,
|
|
27
27
|
components: {
|
|
28
28
|
VNodes: (p, { attrs: D }) => D.vnodes
|
|
29
29
|
}
|
|
30
|
-
}),
|
|
31
|
-
...
|
|
30
|
+
}), Lt = /* @__PURE__ */ ll({
|
|
31
|
+
...It,
|
|
32
32
|
__name: "Select",
|
|
33
33
|
props: {
|
|
34
34
|
modelValue: { default: void 0 },
|
|
35
35
|
options: {},
|
|
36
36
|
preserveLabelWhenMissing: { type: Boolean, default: !1 },
|
|
37
37
|
mode: { default: "combobox" },
|
|
38
|
-
showSearch: { type: Boolean },
|
|
39
38
|
fieldNames: { default: {} },
|
|
40
39
|
borderType: { default: "bordered" },
|
|
41
40
|
placeholder: { default: "" },
|
|
@@ -72,28 +71,28 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
72
71
|
largeSelectionCollapseThreshold: { default: 200 }
|
|
73
72
|
},
|
|
74
73
|
emits: ["update:model-value", "change", "focus", "blur", "dropdownVisibleChange", "addCustomItem"],
|
|
75
|
-
setup(p, { expose: D, emit:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
setup(p, { expose: D, emit: $ }) {
|
|
75
|
+
Ul((e) => ({
|
|
76
|
+
a6ce2bee: Sl.value,
|
|
77
|
+
v66954578: xl.value
|
|
79
78
|
}));
|
|
80
|
-
const t = p, x =
|
|
79
|
+
const t = p, x = $, J = jl(), ol = s(() => {
|
|
81
80
|
const e = {};
|
|
82
81
|
for (const l in J)
|
|
83
82
|
l === "onClick" || l.startsWith("onClick") || l === "filterOption" || l === "onSearch" || l === "onPopupScroll" || (e[l] = J[l]);
|
|
84
83
|
return e;
|
|
85
|
-
}), a =
|
|
84
|
+
}), a = dt(t, "modelValue"), Q = s(() => {
|
|
86
85
|
var e;
|
|
87
86
|
return `<span class='key'>${((e = a.value) == null ? void 0 : e.length) ?? 0}</span>`;
|
|
88
87
|
}), nl = s(() => {
|
|
89
88
|
const e = Array.isArray(a.value) ? a.value.length : a.value ? 1 : 0;
|
|
90
89
|
return M("das-ui-select-selectedItemsCountWithPlaceholder", e);
|
|
91
|
-
}),
|
|
90
|
+
}), E = i(null), Me = i(null), C = i(!1), Y = s(() => t.isView ? t.noSetDefaultVal ? "" : "-" : t.placeholder || M("请选择")), de = s(() => E.value ? E.value.querySelector(".ant-select-selector") : null), B = i(0), W = i(0), al = s(() => de.value ? t.isTooltip && O.value ? !1 : !t.isTooltip || N.value || !Ue.value || !be.value : !0), rl = s(() => (Array.isArray(a.value) ? a.value.length : a.value) ? Ue.value : Y.value), Oe = () => {
|
|
92
91
|
const e = t.size === "table" ? 12 : 14;
|
|
93
|
-
return
|
|
92
|
+
return ft(Y.value, e);
|
|
94
93
|
}, ze = () => {
|
|
95
94
|
var T, j, h;
|
|
96
|
-
const e = (T =
|
|
95
|
+
const e = (T = E.value) == null ? void 0 : T.querySelector(".ant-select-selection-placeholder"), l = (h = (j = A.value) == null ? void 0 : j.$el) == null ? void 0 : h.querySelectorAll(".ant-select-selection-item");
|
|
97
96
|
l && l.length && l.forEach((xe) => xe.removeAttribute("title"));
|
|
98
97
|
let n = (e == null ? void 0 : e.offsetWidth) ?? 0;
|
|
99
98
|
if (n === 0) return n;
|
|
@@ -102,7 +101,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
102
101
|
}, O = i(!1);
|
|
103
102
|
G(() => [Y.value, a.value], () => {
|
|
104
103
|
k(() => {
|
|
105
|
-
W.value = ze(),
|
|
104
|
+
W.value = ze(), B.value = Oe(), ((Array.isArray(a.value) ? a.value.length : a.value) || W.value === B.value || B.value - W.value < 1) && (O.value = !1);
|
|
106
105
|
});
|
|
107
106
|
}), G(
|
|
108
107
|
() => {
|
|
@@ -127,7 +126,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
127
126
|
R.value && (x("addCustomItem", R.value), k(() => {
|
|
128
127
|
A.value.focus(), R.value = "";
|
|
129
128
|
}));
|
|
130
|
-
}, De =
|
|
129
|
+
}, De = Gl(), fe = () => {
|
|
131
130
|
t.dropdownMode === "custom" && !De.dropdownRender && (F.value = !1, k(() => {
|
|
132
131
|
F.value = null;
|
|
133
132
|
}));
|
|
@@ -137,31 +136,31 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
137
136
|
}), Xe(() => {
|
|
138
137
|
document.removeEventListener("click", fe);
|
|
139
138
|
});
|
|
140
|
-
const A = i(), H = i(""), ee = i(0),
|
|
139
|
+
const A = i(), H = i(""), ee = i(0), $e = `__DAS_SELECT_COLLAPSED_${Math.random().toString(36).slice(2)}__`, I = s(() => {
|
|
141
140
|
var e;
|
|
142
141
|
return t.fieldNames && t.fieldNames.label ? (e = t.fieldNames) == null ? void 0 : e.label : "label";
|
|
143
|
-
}),
|
|
142
|
+
}), g = s(() => {
|
|
144
143
|
var e;
|
|
145
144
|
return t.fieldNames && t.fieldNames.value ? (e = t.fieldNames) == null ? void 0 : e.value : "value";
|
|
146
|
-
}), ve = i(/* @__PURE__ */ new Map()), cl = s(() => t.mode
|
|
145
|
+
}), ve = i(/* @__PURE__ */ new Map()), cl = s(() => t.mode), dl = s(() => t.size == "middle" ? "defalut" : t.size == "mini" ? "small" : t.size), Ee = s(() => {
|
|
147
146
|
const e = Number(t.optionPageSize);
|
|
148
147
|
return Number.isFinite(e) && e > 0 ? Math.floor(e) : 80;
|
|
149
|
-
}),
|
|
148
|
+
}), Be = (e, l) => {
|
|
150
149
|
Array.isArray(e) && e.forEach((n) => {
|
|
151
|
-
l(n), Array.isArray(n == null ? void 0 : n.children) &&
|
|
150
|
+
l(n), Array.isArray(n == null ? void 0 : n.children) && Be(n.children, l);
|
|
152
151
|
});
|
|
153
152
|
}, le = (e, l) => {
|
|
154
153
|
if (Array.isArray(e))
|
|
155
154
|
for (const n of e) {
|
|
156
|
-
if ((n == null ? void 0 : n[
|
|
155
|
+
if ((n == null ? void 0 : n[g.value]) == l) return n;
|
|
157
156
|
if (Array.isArray(n == null ? void 0 : n.children)) {
|
|
158
157
|
const o = le(n.children, l);
|
|
159
158
|
if (o) return o;
|
|
160
159
|
}
|
|
161
160
|
}
|
|
162
161
|
}, fl = (e) => {
|
|
163
|
-
|
|
164
|
-
l && l[
|
|
162
|
+
Be(e, (l) => {
|
|
163
|
+
l && l[g.value] != null && l[I.value] != null && ve.value.set(l[g.value], l[I.value]);
|
|
165
164
|
});
|
|
166
165
|
}, pe = (e) => {
|
|
167
166
|
if (e == null || e === "") return;
|
|
@@ -175,7 +174,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
175
174
|
if (le(l, o)) return;
|
|
176
175
|
const r = ve.value.get(o);
|
|
177
176
|
r != null && l.unshift({
|
|
178
|
-
[
|
|
177
|
+
[g.value]: o,
|
|
179
178
|
[I.value]: r,
|
|
180
179
|
disabled: !0,
|
|
181
180
|
title: "",
|
|
@@ -194,7 +193,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
194
193
|
return !1;
|
|
195
194
|
}
|
|
196
195
|
if (o === !1) return !0;
|
|
197
|
-
const u = je.value, r = (l == null ? void 0 : l[u]) ?? (l == null ? void 0 : l[I.value]) ?? (l == null ? void 0 : l[
|
|
196
|
+
const u = je.value, r = (l == null ? void 0 : l[u]) ?? (l == null ? void 0 : l[I.value]) ?? (l == null ? void 0 : l[g.value]);
|
|
198
197
|
return String(r ?? "").toLowerCase().indexOf(n.toLowerCase()) >= 0;
|
|
199
198
|
}, he = s(() => {
|
|
200
199
|
if (!Array.isArray(t.options)) return;
|
|
@@ -209,32 +208,32 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
209
208
|
}, oe = s(() => t.mode !== "combobox" && Array.isArray(a.value) ? a.value : a.value !== null && a.value !== void 0 && a.value !== "" ? [a.value] : []), He = s(() => new Set(oe.value)), hl = s(() => {
|
|
210
209
|
const e = Number(t.largeSelectionCollapseThreshold);
|
|
211
210
|
return Number.isFinite(e) && e >= 0 ? Math.floor(e) : 200;
|
|
212
|
-
}), w = s(() => t.mode !== "combobox" && oe.value.length > hl.value), ml = s(() => w.value ? [
|
|
211
|
+
}), w = s(() => t.mode !== "combobox" && oe.value.length > hl.value), ml = s(() => w.value ? [$e] : a.value), qe = s(() => Array.isArray(t.options) ? t.options.filter((e) => !(e != null && e.disabled)) : []), ne = s(() => qe.value.map((e) => e == null ? void 0 : e[g.value])), me = s(() => ne.value.reduce((e, l) => He.value.has(l) ? e + 1 : e, 0)), gl = (e, l) => {
|
|
213
212
|
if (H.value || w.value || !oe.value.length) return e;
|
|
214
|
-
const n = new Set(e.map((u) => u == null ? void 0 : u[
|
|
213
|
+
const n = new Set(e.map((u) => u == null ? void 0 : u[g.value])), o = [];
|
|
215
214
|
return oe.value.forEach((u) => {
|
|
216
215
|
if (n.has(u)) return;
|
|
217
216
|
const r = le(l, u);
|
|
218
217
|
r && (o.push(r), n.add(u));
|
|
219
218
|
}), o.length ? o.concat(e) : e;
|
|
220
|
-
},
|
|
219
|
+
}, yl = s(() => {
|
|
221
220
|
if (!te.value) return he.value;
|
|
222
221
|
const e = Re.value.slice(0, ee.value);
|
|
223
|
-
return
|
|
222
|
+
return gl(e, he.value ?? []);
|
|
224
223
|
}), Ze = () => {
|
|
225
|
-
ee.value =
|
|
224
|
+
ee.value = Ee.value, z();
|
|
226
225
|
}, bl = () => {
|
|
227
226
|
te.value && (ee.value = Math.min(
|
|
228
|
-
ee.value +
|
|
227
|
+
ee.value + Ee.value,
|
|
229
228
|
Re.value.length
|
|
230
229
|
), z());
|
|
231
230
|
};
|
|
232
231
|
G(
|
|
233
|
-
() => [t.options, t.optionPaging, t.optionPageSize, H.value, I.value,
|
|
232
|
+
() => [t.options, t.optionPaging, t.optionPageSize, H.value, I.value, g.value],
|
|
234
233
|
Ze,
|
|
235
234
|
{ immediate: !0 }
|
|
236
235
|
);
|
|
237
|
-
const
|
|
236
|
+
const ge = i(!1), ye = s(() => {
|
|
238
237
|
if (F.value !== null) return F.value;
|
|
239
238
|
if (t.open !== void 0) return t.open;
|
|
240
239
|
}), P = 1e6, d = i(100), v = i(100), Cl = s(() => w.value ? 0 : d.value), N = i(!1), be = i(!0), Ce = i(!1);
|
|
@@ -274,7 +273,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
274
273
|
const l = pe(a.value);
|
|
275
274
|
l != null ? e.push(l) : a.value !== null && a.value !== void 0 && a.value !== "" && e.push(String(a.value));
|
|
276
275
|
}
|
|
277
|
-
return
|
|
276
|
+
return ut.value === "zh-CN" ? e.join("、") : e.join(", ");
|
|
278
277
|
}), Tl = s(() => t.mode === "combobox" ? !1 : ne.value.length > 0 && me.value === ne.value.length), kl = s(() => t.mode === "combobox" ? !1 : me.value > 0 && me.value < ne.value.length), je = s(() => {
|
|
279
278
|
var e, l;
|
|
280
279
|
return t.optionFilterProp ? t.optionFilterProp : (e = t.fieldNames) != null && e.label ? (l = t.fieldNames) == null ? void 0 : l.label : "label";
|
|
@@ -286,9 +285,9 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
286
285
|
"white-space": "break-spaces"
|
|
287
286
|
}), q = i(), Ll = () => {
|
|
288
287
|
var n;
|
|
289
|
-
W.value = ze(),
|
|
288
|
+
W.value = ze(), B.value = Oe();
|
|
290
289
|
let e = (n = A.value) == null ? void 0 : n.$el.querySelectorAll(".ant-select-selection-item");
|
|
291
|
-
!!(Array.isArray(a.value) ? a.value.length : e != null && e.length) || W.value ===
|
|
290
|
+
!!(Array.isArray(a.value) ? a.value.length : e != null && e.length) || W.value === B.value || B.value - W.value < 1 ? O.value = !1 : (O.value = !0, q.value && clearTimeout(q.value)), we.value = !0;
|
|
292
291
|
}, Ml = () => {
|
|
293
292
|
q.value = setTimeout(() => {
|
|
294
293
|
O.value = !1;
|
|
@@ -296,53 +295,53 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
296
295
|
}, Ol = (e, l) => {
|
|
297
296
|
e ? Ll() : Ml();
|
|
298
297
|
}, zl = (e) => {
|
|
299
|
-
e ? (Ke.value =
|
|
298
|
+
e ? (Ke.value = ct().nextZIndex(), R.value = "", Ze(), z()) : (H.value = "", z()), ae.value = e, t.mode == "combobox" && (e || setTimeout(() => {
|
|
300
299
|
var l, n;
|
|
301
300
|
(n = (l = A.value) == null ? void 0 : l.blur) == null || n.call(l);
|
|
302
301
|
})), x("dropdownVisibleChange", e);
|
|
303
302
|
}, Pl = (e) => {
|
|
304
303
|
H.value = e ?? "", z(), We("onSearch", e);
|
|
305
|
-
}, Nl =
|
|
304
|
+
}, Nl = (e) => {
|
|
306
305
|
if (We("onPopupScroll", e), !te.value) return;
|
|
307
306
|
const l = e.target;
|
|
308
307
|
if (!l) return;
|
|
309
308
|
l.scrollHeight - l.scrollTop - l.clientHeight <= 24 && bl();
|
|
310
|
-
},
|
|
309
|
+
}, _l = (e) => {
|
|
311
310
|
let l = e.toString();
|
|
312
311
|
return l.length > t.maxTagTextLength && (l = l.substr(0, t.maxTagTextLength) + "..."), l;
|
|
313
|
-
},
|
|
312
|
+
}, Dl = (e) => t.isRenderNode ? E.value : t.getPopupContainer === void 0 ? document.body : t.getPopupContainer(e), $l = (e) => {
|
|
314
313
|
if (e) {
|
|
315
314
|
const l = new Set(Array.isArray(a.value) ? a.value : []), n = Array.isArray(a.value) ? a.value.slice() : [], o = [];
|
|
316
315
|
qe.value.forEach((u) => {
|
|
317
|
-
const r = u[
|
|
316
|
+
const r = u[g.value];
|
|
318
317
|
l.has(r) || (l.add(r), n.push(r), o.push(u));
|
|
319
318
|
}), a.value = n, se(n, o, "inner");
|
|
320
319
|
} else {
|
|
321
|
-
const l = Array.isArray(t.options) ? t.options : [], n = new Set(l.map((r) => r == null ? void 0 : r[
|
|
320
|
+
const l = Array.isArray(t.options) ? t.options : [], n = new Set(l.map((r) => r == null ? void 0 : r[g.value])), o = new Set(l.filter((r) => r == null ? void 0 : r.disabled).map((r) => r == null ? void 0 : r[g.value])), u = (Array.isArray(a.value) ? a.value : []).filter((r) => n.has(r) && o.has(r));
|
|
322
321
|
a.value = u, se(u, [], "inner");
|
|
323
322
|
}
|
|
324
|
-
},
|
|
323
|
+
}, El = (e) => {
|
|
325
324
|
const l = Array.isArray(a.value) ? a.value.slice() : [], n = l.findIndex((o) => o === e);
|
|
326
325
|
return n > -1 ? l.splice(n, 1) : l.push(e), l;
|
|
327
|
-
},
|
|
326
|
+
}, Bl = (e) => {
|
|
328
327
|
w.value && (e.preventDefault(), e.stopPropagation());
|
|
329
|
-
},
|
|
328
|
+
}, Wl = (e, l) => {
|
|
330
329
|
if (!w.value || e != null && e.disabled) return;
|
|
331
330
|
l.preventDefault(), l.stopPropagation();
|
|
332
|
-
const n = e == null ? void 0 : e[
|
|
331
|
+
const n = e == null ? void 0 : e[g.value];
|
|
333
332
|
if (n === void 0) return;
|
|
334
|
-
const o =
|
|
333
|
+
const o = El(n);
|
|
335
334
|
a.value = o, se(o, e, "inner");
|
|
336
|
-
},
|
|
335
|
+
}, Fl = (e) => {
|
|
337
336
|
if (e.className.indexOf("ant-select-multiple") > -1 && e.children[0])
|
|
338
337
|
return e.children[0];
|
|
339
|
-
},
|
|
338
|
+
}, Rl = (e) => {
|
|
340
339
|
if (t.mode == "combobox") {
|
|
341
340
|
x("focus", e);
|
|
342
341
|
return;
|
|
343
342
|
}
|
|
344
|
-
|
|
345
|
-
}, ae = i(!1),
|
|
343
|
+
ge.value = !0, t.focusOpen && !t.isExterControlCount && (d.value = P, C.value = !1), x("focus", e);
|
|
344
|
+
}, ae = i(!1), Hl = () => {
|
|
346
345
|
ae.value || setTimeout(() => {
|
|
347
346
|
var e, l;
|
|
348
347
|
(l = (e = A.value) == null ? void 0 : e.blur) == null || l.call(e);
|
|
@@ -354,24 +353,24 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
354
353
|
x("blur", e);
|
|
355
354
|
return;
|
|
356
355
|
}
|
|
357
|
-
|
|
358
|
-
},
|
|
356
|
+
ge.value = !1, t.focusOpen && !t.isExterControlCount && (_(), d.value = v.value, C.value = !0), x("blur", e);
|
|
357
|
+
}, ql = (e) => {
|
|
359
358
|
e.onClose(), d.value = 100, k(() => {
|
|
360
|
-
t.mode !== "combobox" &&
|
|
359
|
+
t.mode !== "combobox" && ye.value || t.focusOpen && (_(), d.value = v.value, C.value = !0);
|
|
361
360
|
});
|
|
362
361
|
};
|
|
363
362
|
G(
|
|
364
363
|
() => t.disabled || t.isView,
|
|
365
364
|
(e) => {
|
|
366
365
|
if (e && t.mode !== "combobox") {
|
|
367
|
-
|
|
366
|
+
ge.value = !1;
|
|
368
367
|
let l = new Event("blur");
|
|
369
368
|
Ge(l);
|
|
370
369
|
}
|
|
371
370
|
}
|
|
372
371
|
);
|
|
373
372
|
let U = i(!1);
|
|
374
|
-
const
|
|
373
|
+
const Zl = (e) => {
|
|
375
374
|
U.value = e, N.value = !0, k(() => {
|
|
376
375
|
N.value = !1, t.focusOpen && (_(), d.value = e ? P : v.value, C.value = !e);
|
|
377
376
|
});
|
|
@@ -382,7 +381,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
382
381
|
e && e[0] && e[0].intersectionRatio > 0 && t.focusOpen && d.value === 0 && (d.value = 100, k(() => {
|
|
383
382
|
_(), d.value = v.value, C.value = !0;
|
|
384
383
|
}));
|
|
385
|
-
}), re.observe(
|
|
384
|
+
}), re.observe(E.value);
|
|
386
385
|
}), Xe(() => {
|
|
387
386
|
re && re.disconnect();
|
|
388
387
|
});
|
|
@@ -422,14 +421,14 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
422
421
|
Se.value = !1;
|
|
423
422
|
return;
|
|
424
423
|
}
|
|
425
|
-
t.mode !== "combobox" &&
|
|
424
|
+
t.mode !== "combobox" && ye.value || (N.value = !0, d.value = P, await k(), await _(), N.value = !1, t.isExterControlCount && t.focusOpen ? (d.value = U.value ? P : v.value, C.value = !U.value) : (d.value = v.value, C.value = !0));
|
|
426
425
|
}
|
|
427
426
|
);
|
|
428
|
-
const
|
|
427
|
+
const Kl = (e) => {
|
|
429
428
|
if (!w.value || t.mode === "combobox") return e;
|
|
430
429
|
const l = Array.isArray(e) ? e : e == null ? [] : [e];
|
|
431
430
|
if (!l.length) return [];
|
|
432
|
-
const n = Array.from(new Set(l.filter((u) => u !==
|
|
431
|
+
const n = Array.from(new Set(l.filter((u) => u !== $e)));
|
|
433
432
|
if (!n.length) return;
|
|
434
433
|
let o = Array.isArray(a.value) ? a.value.slice() : [];
|
|
435
434
|
return n.forEach((u) => {
|
|
@@ -438,7 +437,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
438
437
|
}), o;
|
|
439
438
|
}, se = async (e, l, n = "antdv") => {
|
|
440
439
|
ae.value = !1, t.mode === "combobox" && fe();
|
|
441
|
-
let o = n === "antdv" ?
|
|
440
|
+
let o = n === "antdv" ? Kl(e) : e;
|
|
442
441
|
if (o === void 0) {
|
|
443
442
|
z();
|
|
444
443
|
return;
|
|
@@ -447,25 +446,25 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
447
446
|
};
|
|
448
447
|
return D({
|
|
449
448
|
$select: A,
|
|
450
|
-
toChangeMaxCount:
|
|
449
|
+
toChangeMaxCount: Zl
|
|
451
450
|
}), (e, l) => {
|
|
452
|
-
const n =
|
|
453
|
-
return f(),
|
|
451
|
+
const n = Xl("v-nodes");
|
|
452
|
+
return f(), y(
|
|
454
453
|
"div",
|
|
455
454
|
{
|
|
456
|
-
class:
|
|
455
|
+
class: Jl(["das-ui-select", [
|
|
457
456
|
t.borderType,
|
|
458
457
|
t.isView ? "readonly" : "",
|
|
459
458
|
t.error ? "is-error" : "",
|
|
460
459
|
C.value ? "show-ellipsis" : ""
|
|
461
460
|
]]),
|
|
462
461
|
ref_key: "$selectBox",
|
|
463
|
-
ref:
|
|
462
|
+
ref: E,
|
|
464
463
|
style: X(Vl.value),
|
|
465
|
-
onClick: ue(
|
|
464
|
+
onClick: ue(Hl, ["stop"])
|
|
466
465
|
},
|
|
467
466
|
[
|
|
468
|
-
de.value ? (f(), K(c(
|
|
467
|
+
de.value ? (f(), K(c(tt), {
|
|
469
468
|
key: 0,
|
|
470
469
|
ref_key: "inputTooltipRef",
|
|
471
470
|
ref: Me,
|
|
@@ -475,43 +474,43 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
475
474
|
disabled: al.value,
|
|
476
475
|
content: rl.value
|
|
477
476
|
}, null, 8, ["virtual-ref", "disabled", "content"])) : L("v-if", !0),
|
|
478
|
-
Te((f(), K(c(
|
|
477
|
+
Te((f(), K(c(et), Le({ mode: cl.value }, ol.value, {
|
|
479
478
|
value: ml.value,
|
|
480
479
|
ref_key: "$select",
|
|
481
480
|
ref: A,
|
|
482
|
-
options:
|
|
481
|
+
options: yl.value,
|
|
483
482
|
fieldNames: p.fieldNames,
|
|
484
483
|
bordered: t.borderType === "bordered",
|
|
485
484
|
disabled: t.disabled || t.isView,
|
|
486
485
|
showArrow: !0,
|
|
487
|
-
open: t.noDropdown ? !1 :
|
|
486
|
+
open: t.noDropdown ? !1 : ye.value,
|
|
488
487
|
placeholder: Y.value,
|
|
489
|
-
showSearch: t.showSearch,
|
|
490
488
|
optionFilterProp: je.value,
|
|
491
489
|
filterOption: Fe,
|
|
492
490
|
size: dl.value,
|
|
493
491
|
style: t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {},
|
|
494
492
|
dropdownClassName: "das-ui-select-dorpdown " + p.dropdownClassName,
|
|
495
493
|
maxTagCount: Cl.value,
|
|
496
|
-
getPopupContainer:
|
|
494
|
+
getPopupContainer: Dl,
|
|
497
495
|
dropdownStyle: Al.value,
|
|
498
496
|
onDropdownVisibleChange: zl,
|
|
499
497
|
onChange: l[4] || (l[4] = (o, u) => se(o, u, "antdv")),
|
|
500
|
-
onFocus:
|
|
498
|
+
onFocus: Rl,
|
|
501
499
|
onBlur: Ge,
|
|
502
|
-
|
|
503
|
-
|
|
500
|
+
onSearch: Pl,
|
|
501
|
+
onPopupScroll: Nl
|
|
502
|
+
}), Ql({
|
|
504
503
|
option: m((o) => [
|
|
505
504
|
S(e.$slots, "option", ie(ce(o)), () => [
|
|
506
505
|
o.children && typeof o.children == "function" ? (f(), K(n, {
|
|
507
506
|
key: 0,
|
|
508
507
|
vnodes: o.children()
|
|
509
|
-
}, null, 8, ["vnodes"])) : (f(),
|
|
508
|
+
}, null, 8, ["vnodes"])) : (f(), y(
|
|
510
509
|
ke,
|
|
511
510
|
{ key: 1 },
|
|
512
511
|
[
|
|
513
512
|
L(' :option="{value, label, [disabled, key, title]}" '),
|
|
514
|
-
p.mode === "combobox" ? Te((f(),
|
|
513
|
+
p.mode === "combobox" ? Te((f(), y("div", pt, [
|
|
515
514
|
Ve(
|
|
516
515
|
Z(o[I.value]),
|
|
517
516
|
1
|
|
@@ -519,23 +518,23 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
519
518
|
)
|
|
520
519
|
])), [
|
|
521
520
|
[c(Ye)]
|
|
522
|
-
]) : (f(),
|
|
521
|
+
]) : (f(), y(
|
|
523
522
|
ke,
|
|
524
523
|
{ key: 1 },
|
|
525
524
|
[
|
|
526
525
|
L(` <das-tooltip v-if="mode === 'combobox'" placement="right-start" :text="option[labelKeyName]"></das-tooltip> `),
|
|
527
526
|
b("div", {
|
|
528
527
|
class: "das-multiple-option-item",
|
|
529
|
-
onMousedown:
|
|
530
|
-
onClick: (u) =>
|
|
528
|
+
onMousedown: Bl,
|
|
529
|
+
onClick: (u) => Wl(o, u)
|
|
531
530
|
}, [
|
|
532
531
|
(f(), K(c(Qe), {
|
|
533
532
|
class: "das-select-checkbox",
|
|
534
|
-
modelValue: He.value.has(o[
|
|
535
|
-
key: o[
|
|
533
|
+
modelValue: He.value.has(o[g.value]),
|
|
534
|
+
key: o[g.value],
|
|
536
535
|
disabled: o.disabled
|
|
537
536
|
}, null, 8, ["modelValue", "disabled"])),
|
|
538
|
-
Te((f(),
|
|
537
|
+
Te((f(), y("div", mt, [
|
|
539
538
|
Ve(
|
|
540
539
|
Z(o[I.value]),
|
|
541
540
|
1
|
|
@@ -544,7 +543,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
544
543
|
])), [
|
|
545
544
|
[c(Ye)]
|
|
546
545
|
])
|
|
547
|
-
], 40,
|
|
546
|
+
], 40, ht)
|
|
548
547
|
],
|
|
549
548
|
2112
|
|
550
549
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
@@ -560,20 +559,20 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
560
559
|
V(c(Ie), {
|
|
561
560
|
closable: !w.value && o.closable,
|
|
562
561
|
style: { "margin-right": "3px", "background-color": "transparent" },
|
|
563
|
-
onClose: (u) =>
|
|
562
|
+
onClose: (u) => ql(o)
|
|
564
563
|
}, {
|
|
565
564
|
default: m(() => [
|
|
566
|
-
w.value ? (f(),
|
|
565
|
+
w.value ? (f(), y("span", {
|
|
567
566
|
key: 0,
|
|
568
567
|
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
569
|
-
}, null, 8,
|
|
568
|
+
}, null, 8, gt)) : (f(), y(
|
|
570
569
|
"span",
|
|
571
570
|
{
|
|
572
571
|
key: 1,
|
|
573
572
|
class: "tag-span",
|
|
574
573
|
style: X(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
|
|
575
574
|
},
|
|
576
|
-
Z(
|
|
575
|
+
Z(_l(pe(o.value) ?? o.label ?? String(o.value))),
|
|
577
576
|
5
|
|
578
577
|
/* TEXT, STYLE */
|
|
579
578
|
))
|
|
@@ -587,9 +586,9 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
587
586
|
S(e.$slots, "dropdownRender", ie(ce({ menuNode: o })), () => {
|
|
588
587
|
var u;
|
|
589
588
|
return [
|
|
590
|
-
Ne.value === "combobox" ? (f(),
|
|
589
|
+
Ne.value === "combobox" ? (f(), y("div", yt, [
|
|
591
590
|
V(n, { vnodes: o }, null, 8, ["vnodes"])
|
|
592
|
-
])) : Ne.value === "custom" ? (f(),
|
|
591
|
+
])) : Ne.value === "custom" ? (f(), y("div", {
|
|
593
592
|
key: 1,
|
|
594
593
|
onClick: l[2] || (l[2] = ue(() => {
|
|
595
594
|
}, ["stop"]))
|
|
@@ -602,12 +601,12 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
602
601
|
onMousedown: l[1] || (l[1] = (r) => r.preventDefault())
|
|
603
602
|
},
|
|
604
603
|
[
|
|
605
|
-
V(c(
|
|
604
|
+
V(c(ot), Le({
|
|
606
605
|
ref_key: "testInput",
|
|
607
606
|
ref: sl,
|
|
608
607
|
modelValue: R.value,
|
|
609
608
|
"onUpdate:modelValue": l[0] || (l[0] = (r) => R.value = r),
|
|
610
|
-
onKeyup:
|
|
609
|
+
onKeyup: Yl(_e, ["enter"]),
|
|
611
610
|
onFocus: ue(ul, ["stop"]),
|
|
612
611
|
onBlur: ue(il, ["stop"]),
|
|
613
612
|
width: "100%",
|
|
@@ -627,9 +626,9 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
627
626
|
32
|
|
628
627
|
/* NEED_HYDRATION */
|
|
629
628
|
)
|
|
630
|
-
])) : (f(),
|
|
629
|
+
])) : (f(), y("div", bt, [
|
|
631
630
|
V(n, { vnodes: o }, null, 8, ["vnodes"]),
|
|
632
|
-
(u = t.options) != null && u.length && t.showSelectAll ? (f(),
|
|
631
|
+
(u = t.options) != null && u.length && t.showSelectAll ? (f(), y(
|
|
633
632
|
"div",
|
|
634
633
|
{
|
|
635
634
|
key: 0,
|
|
@@ -637,11 +636,11 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
637
636
|
onMousedown: l[3] || (l[3] = (r) => r.preventDefault())
|
|
638
637
|
},
|
|
639
638
|
[
|
|
640
|
-
b("div",
|
|
639
|
+
b("div", Ct, [
|
|
641
640
|
V(c(Qe), {
|
|
642
641
|
modelValue: Tl.value,
|
|
643
642
|
indeterminate: kl.value,
|
|
644
|
-
onChange:
|
|
643
|
+
onChange: $l,
|
|
645
644
|
style: { display: "flex" }
|
|
646
645
|
}, {
|
|
647
646
|
default: m(() => [
|
|
@@ -658,7 +657,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
658
657
|
b("span", {
|
|
659
658
|
class: "das-ui-dropdown-has-checked",
|
|
660
659
|
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
661
|
-
}, null, 8,
|
|
660
|
+
}, null, 8, wt)
|
|
662
661
|
],
|
|
663
662
|
32
|
|
664
663
|
/* NEED_HYDRATION */
|
|
@@ -669,7 +668,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
669
668
|
]),
|
|
670
669
|
clearIcon: m(() => [
|
|
671
670
|
S(e.$slots, "clearIcon", {}, () => [
|
|
672
|
-
V(c(
|
|
671
|
+
V(c(at), { size: "medium" })
|
|
673
672
|
], !0)
|
|
674
673
|
]),
|
|
675
674
|
maxTagPlaceholder: m((o) => [
|
|
@@ -681,7 +680,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
681
680
|
default: m(() => [
|
|
682
681
|
b("span", {
|
|
683
682
|
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
684
|
-
}, null, 8,
|
|
683
|
+
}, null, 8, St)
|
|
685
684
|
]),
|
|
686
685
|
_: 1
|
|
687
686
|
/* STABLE */
|
|
@@ -702,7 +701,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
702
701
|
]),
|
|
703
702
|
suffixIcon: m(() => [
|
|
704
703
|
S(e.$slots, "suffixIcon", {}, () => [
|
|
705
|
-
V(c(
|
|
704
|
+
V(c(nt), {
|
|
706
705
|
class: "das-suffix-icon",
|
|
707
706
|
size: "medium"
|
|
708
707
|
})
|
|
@@ -735,15 +734,15 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
735
734
|
]),
|
|
736
735
|
key: "2"
|
|
737
736
|
} : void 0
|
|
738
|
-
]), 1040, ["mode", "value", "options", "fieldNames", "bordered", "disabled", "open", "placeholder", "
|
|
739
|
-
[c(
|
|
740
|
-
[c(
|
|
737
|
+
]), 1040, ["mode", "value", "options", "fieldNames", "bordered", "disabled", "open", "placeholder", "optionFilterProp", "size", "style", "dropdownClassName", "maxTagCount", "dropdownStyle"])), [
|
|
738
|
+
[c(lt), { target: Fl, x: !1 }],
|
|
739
|
+
[c(st), Ol]
|
|
741
740
|
]),
|
|
742
|
-
p.error && p.errorLabel ? (f(),
|
|
741
|
+
p.error && p.errorLabel ? (f(), y(
|
|
743
742
|
ke,
|
|
744
743
|
{ key: 1 },
|
|
745
744
|
[
|
|
746
|
-
p.errorMode === "default" ? (f(),
|
|
745
|
+
p.errorMode === "default" ? (f(), y("div", xt, [
|
|
747
746
|
b(
|
|
748
747
|
"span",
|
|
749
748
|
{
|
|
@@ -754,7 +753,7 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
754
753
|
/* TEXT, STYLE */
|
|
755
754
|
)
|
|
756
755
|
])) : L("v-if", !0),
|
|
757
|
-
p.errorMode === "overlay" && we.value ? (f(), K(c(
|
|
756
|
+
p.errorMode === "overlay" && we.value ? (f(), K(c(rt), {
|
|
758
757
|
key: 1,
|
|
759
758
|
errorLabel: p.errorLabel,
|
|
760
759
|
getEl: () => A.value.$el,
|
|
@@ -773,16 +772,16 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
773
772
|
style: { position: "absolute", left: "-50%", top: "-50%", opacity: "0", "pointer-events": "none" }
|
|
774
773
|
},
|
|
775
774
|
[
|
|
776
|
-
b("div",
|
|
777
|
-
b("div",
|
|
778
|
-
b("span",
|
|
775
|
+
b("div", At, [
|
|
776
|
+
b("div", Tt, [
|
|
777
|
+
b("span", kt, [
|
|
779
778
|
V(c(Ie), {
|
|
780
779
|
style: X(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
|
|
781
780
|
}, {
|
|
782
781
|
default: m(() => [
|
|
783
782
|
b("span", {
|
|
784
783
|
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
785
|
-
}, null, 8,
|
|
784
|
+
}, null, 8, Vt)
|
|
786
785
|
]),
|
|
787
786
|
_: 1
|
|
788
787
|
/* STABLE */
|
|
@@ -801,22 +800,22 @@ const yt = { key: 0 }, gt = ["onClick"], bt = { style: { display: "inline-block"
|
|
|
801
800
|
};
|
|
802
801
|
}
|
|
803
802
|
}), tl = (p, D) => {
|
|
804
|
-
const
|
|
803
|
+
const $ = p.__vccOpts || p;
|
|
805
804
|
for (const [t, x] of D)
|
|
806
|
-
|
|
807
|
-
return
|
|
808
|
-
},
|
|
809
|
-
function
|
|
810
|
-
const
|
|
805
|
+
$[t] = x;
|
|
806
|
+
return $;
|
|
807
|
+
}, Mt = /* @__PURE__ */ tl(Lt, [["__scopeId", "data-v-0b7f804b"]]), Ot = {};
|
|
808
|
+
function zt(p, D) {
|
|
809
|
+
const $ = vt;
|
|
811
810
|
return f(), K(
|
|
812
|
-
|
|
811
|
+
$,
|
|
813
812
|
Le({ class: "das-ui-select-option" }, p.$attrs),
|
|
814
813
|
null,
|
|
815
814
|
16
|
|
816
815
|
/* FULL_PROPS */
|
|
817
816
|
);
|
|
818
817
|
}
|
|
819
|
-
const
|
|
818
|
+
const Pt = /* @__PURE__ */ tl(Ot, [["render", zt]]), Nt = {
|
|
820
819
|
添加: { "zh-CN": "添加", en: "Add", "zh-MO": "添加", _appCode: "framework" },
|
|
821
820
|
全选: { "zh-CN": "全选", en: "Select All", "zh-MO": "全選", _appCode: "framework" },
|
|
822
821
|
已选: { "zh-CN": "已选", en: "Selected", "zh-MO": "已選", _appCode: "framework" },
|
|
@@ -827,10 +826,10 @@ const Dt = /* @__PURE__ */ tl(Nt, [["render", _t]]), Bt = {
|
|
|
827
826
|
_appCode: "framework"
|
|
828
827
|
}
|
|
829
828
|
};
|
|
830
|
-
|
|
831
|
-
const
|
|
829
|
+
it(Nt);
|
|
830
|
+
const lo = el(Mt), to = el(Pt), oo = { name: "select 选择器" };
|
|
832
831
|
export {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
832
|
+
lo as DasSelect,
|
|
833
|
+
to as DasSelectOption,
|
|
834
|
+
oo as default
|
|
836
835
|
};
|