@das-fed/upf-ui 6.4.0-dev.248 → 6.4.0-dev.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/packages/components/button/style.css +1 -1
- package/packages/components/button/style.css.gz +0 -0
- package/packages/components/checkbox/index.js +1 -1
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/checkbox/style.css +1 -1
- package/packages/components/checkbox/style.css.gz +0 -0
- package/packages/components/icon/style.css +1 -1
- package/packages/components/radio/style.css +1 -1
- package/packages/components/radio/style.css.gz +0 -0
- package/packages/components/select/index.d.ts +12 -0
- package/packages/components/select/index.js +519 -425
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/src/Select.vue.d.ts +4 -0
- package/packages/components/select/src/type.d.ts +8 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/tag/index.d.ts +3 -3
- package/packages/components/tag/src/Index.vue.d.ts +1 -1
- package/packages/components/tooltip/index.d.ts +9 -9
- package/packages/components/tooltip/src/index.vue.d.ts +1 -1
- package/packages/components/tree-select/src/App.vue.d.ts +26 -2
- package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +26 -2
- package/packages/components/tree-v2/style.css +1 -1
- package/packages/components/tree-v2/style.css.gz +0 -0
- package/presets/theme-cjb.css +14 -11
- package/presets/theme-default.css +14 -11
- package/presets/theme-dkh.css +14 -11
- package/presets/theme-ssl.css +24 -21
- package/theme-default.css +14 -11
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { withInstall as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { Select as
|
|
4
|
-
import { DasCheckbox as
|
|
5
|
-
import { vScrollbar as
|
|
6
|
-
import { DasTooltip as
|
|
7
|
-
import { vDasTooltip as
|
|
8
|
-
import { DasInput as
|
|
9
|
-
import { DasIconXiala as
|
|
10
|
-
import { DasIconEmpty as
|
|
11
|
-
import { DasErrorOverlayModel as
|
|
12
|
-
import { vHoverInside as
|
|
13
|
-
import { t as
|
|
14
|
-
import { useZIndex as
|
|
15
|
-
import { useModelValue as
|
|
16
|
-
import { calcTextWidth as
|
|
1
|
+
import { withInstall as el } from "@das-fed/upf-utils/with-install/index";
|
|
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
|
+
import { DasCheckbox as Qe } from "@das-fed/upf-ui/packages/components/checkbox/index";
|
|
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
|
+
import { vDasTooltip as Ye } from "@das-fed/upf-ui/packages/components/text-tooltip/index";
|
|
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
|
-
VNodes: (
|
|
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 },
|
|
@@ -64,424 +64,518 @@ const Wl = { key: 0 }, Pl = { class: "das-multiple-option-item" }, Fl = { style:
|
|
|
64
64
|
isExterControlCount: { type: Boolean, default: !1 },
|
|
65
65
|
dropdownMode: {},
|
|
66
66
|
inputAttrs: {},
|
|
67
|
-
showSelectAll: { type: Boolean, default: !0 }
|
|
67
|
+
showSelectAll: { type: Boolean, default: !0 },
|
|
68
|
+
optionPaging: { type: Boolean, default: !1 },
|
|
69
|
+
optionPageSize: { default: 80 },
|
|
70
|
+
optionPagingDebug: { type: Boolean, default: !1 },
|
|
71
|
+
largeSelectionCollapseThreshold: { default: 200 }
|
|
68
72
|
},
|
|
69
73
|
emits: ["update:model-value", "change", "focus", "blur", "dropdownVisibleChange", "addCustomItem"],
|
|
70
|
-
setup(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
+
setup(p, { expose: D, emit: $ }) {
|
|
75
|
+
Ul((e) => ({
|
|
76
|
+
c89c8c78: Sl.value,
|
|
77
|
+
v7e92f62e: xl.value
|
|
74
78
|
}));
|
|
75
|
-
const
|
|
79
|
+
const t = p, x = $, J = jl(), ol = s(() => {
|
|
76
80
|
const e = {};
|
|
77
|
-
for (const
|
|
78
|
-
|
|
81
|
+
for (const l in J)
|
|
82
|
+
l === "onClick" || l.startsWith("onClick") || l === "filterOption" || l === "onSearch" || l === "onPopupScroll" || (e[l] = J[l]);
|
|
79
83
|
return e;
|
|
80
|
-
}),
|
|
84
|
+
}), a = dt(t, "modelValue"), Q = s(() => {
|
|
81
85
|
var e;
|
|
82
|
-
return `<span class='key'>${((e =
|
|
83
|
-
}),
|
|
84
|
-
const e =
|
|
85
|
-
return
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
86
|
+
return `<span class='key'>${((e = a.value) == null ? void 0 : e.length) ?? 0}</span>`;
|
|
87
|
+
}), nl = s(() => {
|
|
88
|
+
const e = Array.isArray(a.value) ? a.value.length : a.value ? 1 : 0;
|
|
89
|
+
return M("das-ui-select-selectedItemsCountWithPlaceholder", e);
|
|
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 = () => {
|
|
91
|
+
const e = t.size === "table" ? 12 : 14;
|
|
92
|
+
return ft(Y.value, e);
|
|
93
|
+
}, ze = () => {
|
|
94
|
+
var T, j, h;
|
|
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");
|
|
96
|
+
l && l.length && l.forEach((xe) => xe.removeAttribute("title"));
|
|
97
|
+
let n = (e == null ? void 0 : e.offsetWidth) ?? 0;
|
|
98
|
+
if (n === 0) return n;
|
|
99
|
+
const o = window.getComputedStyle(e, null), u = parseFloat(o.paddingRight), r = parseFloat(o.paddingLeft);
|
|
100
|
+
return n - u - r;
|
|
101
|
+
}, O = i(!1);
|
|
102
|
+
G(() => [Y.value, a.value], () => {
|
|
103
|
+
k(() => {
|
|
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);
|
|
98
105
|
});
|
|
99
|
-
}),
|
|
106
|
+
}), G(
|
|
100
107
|
() => {
|
|
101
108
|
var e;
|
|
102
|
-
return (e =
|
|
109
|
+
return (e = Me.value) == null ? void 0 : e.$tooltipRef.popperRef.contentRef;
|
|
103
110
|
},
|
|
104
111
|
(e) => {
|
|
105
112
|
e && (e.addEventListener("mouseenter", function() {
|
|
106
|
-
|
|
113
|
+
O.value = !0, q.value && clearTimeout(q.value);
|
|
107
114
|
}), e.addEventListener("mouseleave", function() {
|
|
108
|
-
|
|
109
|
-
|
|
115
|
+
q.value = setTimeout(() => {
|
|
116
|
+
O.value = !1;
|
|
110
117
|
}, 200);
|
|
111
118
|
}));
|
|
112
119
|
}
|
|
113
120
|
);
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
},
|
|
117
|
-
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
+
const Pe = i(null), Ne = s(() => t.dropdownMode ?? t.mode ?? ""), F = i(null), sl = i(null), R = i(""), ul = () => {
|
|
122
|
+
F.value = !0;
|
|
123
|
+
}, il = () => {
|
|
124
|
+
F.value = null;
|
|
125
|
+
}, _e = () => {
|
|
126
|
+
R.value && (x("addCustomItem", R.value), k(() => {
|
|
127
|
+
A.value.focus(), R.value = "";
|
|
121
128
|
}));
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
|
|
129
|
+
}, De = Gl(), fe = () => {
|
|
130
|
+
t.dropdownMode === "custom" && !De.dropdownRender && (F.value = !1, k(() => {
|
|
131
|
+
F.value = null;
|
|
125
132
|
}));
|
|
126
133
|
};
|
|
127
|
-
|
|
128
|
-
document.addEventListener("click",
|
|
129
|
-
}),
|
|
130
|
-
document.removeEventListener("click",
|
|
134
|
+
Ae(() => {
|
|
135
|
+
document.addEventListener("click", fe);
|
|
136
|
+
}), Xe(() => {
|
|
137
|
+
document.removeEventListener("click", fe);
|
|
131
138
|
});
|
|
132
|
-
const
|
|
139
|
+
const A = i(), H = i(""), ee = i(0), $e = `__DAS_SELECT_COLLAPSED_${Math.random().toString(36).slice(2)}__`, I = s(() => {
|
|
133
140
|
var e;
|
|
134
|
-
return
|
|
135
|
-
}),
|
|
141
|
+
return t.fieldNames && t.fieldNames.label ? (e = t.fieldNames) == null ? void 0 : e.label : "label";
|
|
142
|
+
}), g = s(() => {
|
|
136
143
|
var e;
|
|
137
|
-
return
|
|
138
|
-
}),
|
|
139
|
-
|
|
140
|
-
|
|
144
|
+
return t.fieldNames && t.fieldNames.value ? (e = t.fieldNames) == null ? void 0 : e.value : "value";
|
|
145
|
+
}), ve = i(/* @__PURE__ */ new Map()), cl = s(() => t.mode), dl = s(() => t.size == "middle" ? "defalut" : t.size == "mini" ? "small" : t.size), Ee = s(() => {
|
|
146
|
+
const e = Number(t.optionPageSize);
|
|
147
|
+
return Number.isFinite(e) && e > 0 ? Math.floor(e) : 80;
|
|
148
|
+
}), Be = (e, l) => {
|
|
149
|
+
Array.isArray(e) && e.forEach((n) => {
|
|
150
|
+
l(n), Array.isArray(n == null ? void 0 : n.children) && Be(n.children, l);
|
|
141
151
|
});
|
|
142
|
-
},
|
|
152
|
+
}, le = (e, l) => {
|
|
143
153
|
if (Array.isArray(e))
|
|
144
|
-
for (const
|
|
145
|
-
if ((
|
|
146
|
-
if (Array.isArray(
|
|
147
|
-
const o =
|
|
154
|
+
for (const n of e) {
|
|
155
|
+
if ((n == null ? void 0 : n[g.value]) == l) return n;
|
|
156
|
+
if (Array.isArray(n == null ? void 0 : n.children)) {
|
|
157
|
+
const o = le(n.children, l);
|
|
148
158
|
if (o) return o;
|
|
149
159
|
}
|
|
150
160
|
}
|
|
151
|
-
},
|
|
152
|
-
|
|
153
|
-
|
|
161
|
+
}, fl = (e) => {
|
|
162
|
+
Be(e, (l) => {
|
|
163
|
+
l && l[g.value] != null && l[I.value] != null && ve.value.set(l[g.value], l[I.value]);
|
|
154
164
|
});
|
|
155
|
-
},
|
|
165
|
+
}, pe = (e) => {
|
|
156
166
|
if (e == null || e === "") return;
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
159
|
-
if (
|
|
160
|
-
return
|
|
161
|
-
},
|
|
162
|
-
const
|
|
163
|
-
return
|
|
164
|
-
if (
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
[
|
|
168
|
-
[
|
|
167
|
+
const l = le(t.options, e);
|
|
168
|
+
if (l && l[I.value] != null) return l[I.value];
|
|
169
|
+
if (t.preserveLabelWhenMissing)
|
|
170
|
+
return ve.value.get(e);
|
|
171
|
+
}, vl = (e) => {
|
|
172
|
+
const l = Array.isArray(e) ? e.slice() : [];
|
|
173
|
+
return t.preserveLabelWhenMissing ? ((t.mode !== "combobox" && Array.isArray(a.value) ? a.value : a.value != null && a.value !== "" ? [a.value] : []).forEach((o) => {
|
|
174
|
+
if (le(l, o)) return;
|
|
175
|
+
const r = ve.value.get(o);
|
|
176
|
+
r != null && l.unshift({
|
|
177
|
+
[g.value]: o,
|
|
178
|
+
[I.value]: r,
|
|
169
179
|
disabled: !0,
|
|
170
180
|
title: "",
|
|
171
181
|
__dasGhostOption: !0
|
|
172
182
|
});
|
|
173
|
-
}),
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
183
|
+
}), l.map((o) => (o.title = o.title ? o.title : "", o))) : l.map((o) => (o.title = o.title ? o.title : "", o));
|
|
184
|
+
}, pl = (e) => Array.isArray(e) ? e.some((l) => Array.isArray(l == null ? void 0 : l.children) && l.children.length > 0) : !1, te = s(() => !!t.optionPaging && Array.isArray(t.options) && !pl(t.options)), We = (e, ...l) => {
|
|
185
|
+
const n = J[e];
|
|
186
|
+
Array.isArray(n) ? n.forEach((o) => typeof o == "function" && o(...l)) : typeof n == "function" && n(...l);
|
|
187
|
+
}, Fe = (e, l) => {
|
|
188
|
+
const n = e == null ? "" : String(e), o = J.filterOption;
|
|
189
|
+
if (typeof o == "function")
|
|
190
|
+
try {
|
|
191
|
+
return o(n, l) !== !1;
|
|
192
|
+
} catch {
|
|
193
|
+
return !1;
|
|
194
|
+
}
|
|
195
|
+
if (o === !1) return !0;
|
|
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]);
|
|
197
|
+
return String(r ?? "").toLowerCase().indexOf(n.toLowerCase()) >= 0;
|
|
198
|
+
}, he = s(() => {
|
|
199
|
+
if (!Array.isArray(t.options)) return;
|
|
200
|
+
const e = vl(t.options);
|
|
201
|
+
return Array.isArray(t.options) && fl(t.options), e;
|
|
202
|
+
}), Re = s(() => {
|
|
203
|
+
const e = he.value ?? [];
|
|
204
|
+
return !te.value || !H.value ? e : e.filter((l) => Fe(H.value, l));
|
|
205
|
+
}), z = (e) => {
|
|
206
|
+
t.optionPagingDebug && k(() => {
|
|
207
|
+
});
|
|
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(() => {
|
|
209
|
+
const e = Number(t.largeSelectionCollapseThreshold);
|
|
210
|
+
return Number.isFinite(e) && e >= 0 ? Math.floor(e) : 200;
|
|
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) => {
|
|
212
|
+
if (H.value || w.value || !oe.value.length) return e;
|
|
213
|
+
const n = new Set(e.map((u) => u == null ? void 0 : u[g.value])), o = [];
|
|
214
|
+
return oe.value.forEach((u) => {
|
|
215
|
+
if (n.has(u)) return;
|
|
216
|
+
const r = le(l, u);
|
|
217
|
+
r && (o.push(r), n.add(u));
|
|
218
|
+
}), o.length ? o.concat(e) : e;
|
|
219
|
+
}, yl = s(() => {
|
|
220
|
+
if (!te.value) return he.value;
|
|
221
|
+
const e = Re.value.slice(0, ee.value);
|
|
222
|
+
return gl(e, he.value ?? []);
|
|
223
|
+
}), Ze = () => {
|
|
224
|
+
ee.value = Ee.value, z();
|
|
225
|
+
}, bl = () => {
|
|
226
|
+
te.value && (ee.value = Math.min(
|
|
227
|
+
ee.value + Ee.value,
|
|
228
|
+
Re.value.length
|
|
229
|
+
), z());
|
|
230
|
+
};
|
|
231
|
+
G(
|
|
232
|
+
() => [t.options, t.optionPaging, t.optionPageSize, H.value, I.value, g.value],
|
|
233
|
+
Ze,
|
|
234
|
+
{ immediate: !0 }
|
|
235
|
+
);
|
|
236
|
+
const ge = i(!1), ye = s(() => {
|
|
237
|
+
if (F.value !== null) return F.value;
|
|
238
|
+
if (t.open !== void 0) return t.open;
|
|
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);
|
|
240
|
+
Je(() => {
|
|
241
|
+
a.value && t.mode == "combobox" && (be.value = !0, setTimeout(() => {
|
|
242
|
+
var l;
|
|
243
|
+
let e = (l = A.value) == null ? void 0 : l.$el.querySelectorAll(".ant-select-selection-item");
|
|
182
244
|
if (e && e.length > 0)
|
|
183
|
-
for (let
|
|
184
|
-
let o = e[
|
|
185
|
-
o.scrollWidth <= o.offsetWidth && (
|
|
245
|
+
for (let n = 0; n < e.length; n++) {
|
|
246
|
+
let o = e[n];
|
|
247
|
+
o.scrollWidth <= o.offsetWidth && (be.value = !1), o.title = "";
|
|
186
248
|
}
|
|
187
249
|
}, 300));
|
|
188
|
-
}), me(() => {
|
|
189
|
-
l.options && (je(l.options), Me.value = Ge(l.options));
|
|
190
250
|
});
|
|
191
|
-
const
|
|
251
|
+
const wl = () => {
|
|
192
252
|
setTimeout(async () => {
|
|
193
|
-
|
|
253
|
+
d.value = 100, await _(), d.value = v.value, C.value = !0;
|
|
194
254
|
}, 100);
|
|
195
255
|
};
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}),
|
|
199
|
-
|
|
256
|
+
Je(() => {
|
|
257
|
+
Ce.value === !0 && t.mode != "combobox" && a.value && a.value.length > 0 && t.options.length > 0 && (Ce.value = !1, wl());
|
|
258
|
+
}), Ae(() => {
|
|
259
|
+
Ce.value = !0, t.focusOpen || (v.value = 1, d.value = v.value, C.value = !0);
|
|
200
260
|
});
|
|
201
|
-
const
|
|
202
|
-
"z-index":
|
|
203
|
-
})),
|
|
261
|
+
const Sl = s(() => t.width ? t.width : "230px"), xl = s(() => t.height ? t.height : "auto"), Ke = i(3e3), Al = s(() => ({
|
|
262
|
+
"z-index": Ke.value
|
|
263
|
+
})), Ue = s(() => {
|
|
264
|
+
if (w.value)
|
|
265
|
+
return nl.value;
|
|
204
266
|
let e = [];
|
|
205
|
-
if (
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
|
|
267
|
+
if (t.mode != "combobox" && Array.isArray(a.value))
|
|
268
|
+
a.value.map((l) => {
|
|
269
|
+
const n = pe(l);
|
|
270
|
+
n != null ? e.push(n) : l != null && l !== "" && e.push(String(l));
|
|
209
271
|
});
|
|
210
|
-
else if (
|
|
211
|
-
const
|
|
212
|
-
|
|
272
|
+
else if (t.mode == "combobox" && a.value) {
|
|
273
|
+
const l = pe(a.value);
|
|
274
|
+
l != null ? e.push(l) : a.value !== null && a.value !== void 0 && a.value !== "" && e.push(String(a.value));
|
|
213
275
|
}
|
|
214
|
-
return
|
|
215
|
-
}),
|
|
216
|
-
var
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}),
|
|
221
|
-
var t, a;
|
|
222
|
-
if (l.mode === "combobox") return !1;
|
|
223
|
-
let e = l.options.filter((o) => !o.disabled);
|
|
224
|
-
return !!(Array.isArray(n.value) && ((t = n.value) == null ? void 0 : t.length) > 0 && ((a = n.value) == null ? void 0 : a.length) < e.length);
|
|
225
|
-
}), tl = u(() => {
|
|
226
|
-
var e, t;
|
|
227
|
-
return l.optionFilterProp ? l.optionFilterProp : (e = l.fieldNames) != null && e.label ? (t = l.fieldNames) == null ? void 0 : t.label : "label";
|
|
228
|
-
}), ol = u(() => ({
|
|
229
|
-
width: typeof l.width == "number" ? l.width + "px" : l.width
|
|
230
|
-
})), de = s(!1), al = s({
|
|
276
|
+
return ut.value === "zh-CN" ? e.join("、") : e.join(", ");
|
|
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(() => {
|
|
278
|
+
var e, l;
|
|
279
|
+
return t.optionFilterProp ? t.optionFilterProp : (e = t.fieldNames) != null && e.label ? (l = t.fieldNames) == null ? void 0 : l.label : "label";
|
|
280
|
+
}), Vl = s(() => ({
|
|
281
|
+
width: typeof t.width == "number" ? t.width + "px" : t.width
|
|
282
|
+
})), we = i(!1), Il = i({
|
|
231
283
|
display: "block",
|
|
232
284
|
color: "var(--upf-color-error)",
|
|
233
285
|
"white-space": "break-spaces"
|
|
234
|
-
}),
|
|
235
|
-
var
|
|
236
|
-
|
|
237
|
-
let e = (
|
|
238
|
-
!!(Array.isArray(
|
|
239
|
-
},
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}, 200),
|
|
243
|
-
},
|
|
244
|
-
e ?
|
|
245
|
-
},
|
|
246
|
-
e
|
|
247
|
-
var
|
|
248
|
-
(
|
|
249
|
-
})),
|
|
250
|
-
},
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
286
|
+
}), q = i(), Ll = () => {
|
|
287
|
+
var n;
|
|
288
|
+
W.value = ze(), B.value = Oe();
|
|
289
|
+
let e = (n = A.value) == null ? void 0 : n.$el.querySelectorAll(".ant-select-selection-item");
|
|
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;
|
|
291
|
+
}, Ml = () => {
|
|
292
|
+
q.value = setTimeout(() => {
|
|
293
|
+
O.value = !1;
|
|
294
|
+
}, 200), we.value = !1;
|
|
295
|
+
}, Ol = (e, l) => {
|
|
296
|
+
e ? Ll() : Ml();
|
|
297
|
+
}, zl = (e) => {
|
|
298
|
+
e ? (Ke.value = ct().nextZIndex(), R.value = "", Ze(), z()) : (H.value = "", z()), ae.value = e, t.mode == "combobox" && (e || setTimeout(() => {
|
|
299
|
+
var l, n;
|
|
300
|
+
(n = (l = A.value) == null ? void 0 : l.blur) == null || n.call(l);
|
|
301
|
+
})), x("dropdownVisibleChange", e);
|
|
302
|
+
}, Pl = (e) => {
|
|
303
|
+
H.value = e ?? "", z(), We("onSearch", e);
|
|
304
|
+
}, Nl = (e) => {
|
|
305
|
+
if (We("onPopupScroll", e), !te.value) return;
|
|
306
|
+
const l = e.target;
|
|
307
|
+
if (!l) return;
|
|
308
|
+
l.scrollHeight - l.scrollTop - l.clientHeight <= 24 && bl();
|
|
309
|
+
}, _l = (e) => {
|
|
310
|
+
let l = e.toString();
|
|
311
|
+
return l.length > t.maxTagTextLength && (l = l.substr(0, t.maxTagTextLength) + "..."), l;
|
|
312
|
+
}, Dl = (e) => t.isRenderNode ? E.value : t.getPopupContainer === void 0 ? document.body : t.getPopupContainer(e), $l = (e) => {
|
|
254
313
|
if (e) {
|
|
255
|
-
Array.isArray(
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
}),
|
|
314
|
+
const l = new Set(Array.isArray(a.value) ? a.value : []), n = Array.isArray(a.value) ? a.value.slice() : [], o = [];
|
|
315
|
+
qe.value.forEach((u) => {
|
|
316
|
+
const r = u[g.value];
|
|
317
|
+
l.has(r) || (l.add(r), n.push(r), o.push(u));
|
|
318
|
+
}), a.value = n, se(n, o, "inner");
|
|
260
319
|
} else {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
const o = l.options.find((h) => h[k.value] === a);
|
|
264
|
-
return o ? !!o.disabled : !1;
|
|
265
|
-
}), fe(n.value, []);
|
|
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));
|
|
321
|
+
a.value = u, se(u, [], "inner");
|
|
266
322
|
}
|
|
267
|
-
},
|
|
323
|
+
}, El = (e) => {
|
|
324
|
+
const l = Array.isArray(a.value) ? a.value.slice() : [], n = l.findIndex((o) => o === e);
|
|
325
|
+
return n > -1 ? l.splice(n, 1) : l.push(e), l;
|
|
326
|
+
}, Bl = (e) => {
|
|
327
|
+
w.value && (e.preventDefault(), e.stopPropagation());
|
|
328
|
+
}, Wl = (e, l) => {
|
|
329
|
+
if (!w.value || e != null && e.disabled) return;
|
|
330
|
+
l.preventDefault(), l.stopPropagation();
|
|
331
|
+
const n = e == null ? void 0 : e[g.value];
|
|
332
|
+
if (n === void 0) return;
|
|
333
|
+
const o = El(n);
|
|
334
|
+
a.value = o, se(o, e, "inner");
|
|
335
|
+
}, Fl = (e) => {
|
|
268
336
|
if (e.className.indexOf("ant-select-multiple") > -1 && e.children[0])
|
|
269
337
|
return e.children[0];
|
|
270
|
-
},
|
|
271
|
-
if (
|
|
272
|
-
|
|
338
|
+
}, Rl = (e) => {
|
|
339
|
+
if (t.mode == "combobox") {
|
|
340
|
+
x("focus", e);
|
|
273
341
|
return;
|
|
274
342
|
}
|
|
275
|
-
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
var e,
|
|
279
|
-
(
|
|
280
|
-
}),
|
|
281
|
-
},
|
|
282
|
-
if (
|
|
283
|
-
|
|
284
|
-
}),
|
|
285
|
-
|
|
343
|
+
ge.value = !0, t.focusOpen && !t.isExterControlCount && (d.value = P, C.value = !1), x("focus", e);
|
|
344
|
+
}, ae = i(!1), Hl = () => {
|
|
345
|
+
ae.value || setTimeout(() => {
|
|
346
|
+
var e, l;
|
|
347
|
+
(l = (e = A.value) == null ? void 0 : e.blur) == null || l.call(e);
|
|
348
|
+
}), t.mode != "combobox";
|
|
349
|
+
}, Ge = (e) => {
|
|
350
|
+
if (k(() => {
|
|
351
|
+
ae.value = !1;
|
|
352
|
+
}), t.mode == "combobox") {
|
|
353
|
+
x("blur", e);
|
|
286
354
|
return;
|
|
287
355
|
}
|
|
288
|
-
|
|
289
|
-
},
|
|
290
|
-
e.onClose(),
|
|
291
|
-
|
|
356
|
+
ge.value = !1, t.focusOpen && !t.isExterControlCount && (_(), d.value = v.value, C.value = !0), x("blur", e);
|
|
357
|
+
}, ql = (e) => {
|
|
358
|
+
e.onClose(), d.value = 100, k(() => {
|
|
359
|
+
t.mode !== "combobox" && ye.value || t.focusOpen && (_(), d.value = v.value, C.value = !0);
|
|
292
360
|
});
|
|
293
361
|
};
|
|
294
|
-
|
|
295
|
-
() =>
|
|
362
|
+
G(
|
|
363
|
+
() => t.disabled || t.isView,
|
|
296
364
|
(e) => {
|
|
297
|
-
if (e &&
|
|
298
|
-
|
|
299
|
-
let
|
|
300
|
-
|
|
365
|
+
if (e && t.mode !== "combobox") {
|
|
366
|
+
ge.value = !1;
|
|
367
|
+
let l = new Event("blur");
|
|
368
|
+
Ge(l);
|
|
301
369
|
}
|
|
302
370
|
}
|
|
303
371
|
);
|
|
304
|
-
let
|
|
305
|
-
const
|
|
306
|
-
|
|
307
|
-
|
|
372
|
+
let U = i(!1);
|
|
373
|
+
const Zl = (e) => {
|
|
374
|
+
U.value = e, N.value = !0, k(() => {
|
|
375
|
+
N.value = !1, t.focusOpen && (_(), d.value = e ? P : v.value, C.value = !e);
|
|
308
376
|
});
|
|
309
377
|
};
|
|
310
|
-
let
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
e && e[0] && e[0].intersectionRatio > 0 &&
|
|
314
|
-
|
|
378
|
+
let re = null;
|
|
379
|
+
Ae(() => {
|
|
380
|
+
re = new IntersectionObserver((e) => {
|
|
381
|
+
e && e[0] && e[0].intersectionRatio > 0 && t.focusOpen && d.value === 0 && (d.value = 100, k(() => {
|
|
382
|
+
_(), d.value = v.value, C.value = !0;
|
|
315
383
|
}));
|
|
316
|
-
}),
|
|
317
|
-
}),
|
|
318
|
-
|
|
384
|
+
}), re.observe(E.value);
|
|
385
|
+
}), Xe(() => {
|
|
386
|
+
re && re.disconnect();
|
|
319
387
|
});
|
|
320
|
-
const
|
|
321
|
-
var
|
|
322
|
-
|
|
388
|
+
const _ = () => {
|
|
389
|
+
var j;
|
|
390
|
+
if (w.value) {
|
|
391
|
+
v.value = 0;
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
let e = (j = A.value) == null ? void 0 : j.$el;
|
|
323
395
|
if (!e) return;
|
|
324
|
-
let
|
|
325
|
-
if (!
|
|
326
|
-
let
|
|
327
|
-
|
|
328
|
-
const
|
|
329
|
-
let
|
|
330
|
-
if (
|
|
331
|
-
|
|
332
|
-
let
|
|
333
|
-
for (let
|
|
334
|
-
if (
|
|
335
|
-
|
|
396
|
+
let l = e == null ? void 0 : e.querySelector(".ant-select-selection-overflow");
|
|
397
|
+
if (!l) return;
|
|
398
|
+
let n = l.offsetWidth - 5;
|
|
399
|
+
t.borderType === "underline" && (n -= 10);
|
|
400
|
+
const u = Math.ceil(Pe.value.querySelector(".ant-tag").offsetWidth) + 4;
|
|
401
|
+
let r = e.querySelectorAll(".ant-select-selection-overflow-item");
|
|
402
|
+
if (r.length < 1) return;
|
|
403
|
+
d.value = P;
|
|
404
|
+
let T = 0;
|
|
405
|
+
for (let h = 0; h < r.length - 1 && (r[h].classList.remove("ellipsis"), !r[h].classList.contains("ant-select-selection-overflow-item-rest")); h++)
|
|
406
|
+
if (T += Math.ceil(r[h].offsetWidth), T <= n - u)
|
|
407
|
+
h >= a.value.length - 1 && T < n ? v.value = a.value.length : v.value = h + 1;
|
|
336
408
|
else {
|
|
337
|
-
|
|
409
|
+
h >= a.value.length - 1 && T < n ? v.value = a.value.length : v.value = h;
|
|
338
410
|
break;
|
|
339
411
|
}
|
|
340
|
-
if (
|
|
341
|
-
let
|
|
342
|
-
|
|
412
|
+
if (v.value === 0) {
|
|
413
|
+
let h = r[0], xe = h.querySelector(".anticon-close") ? 86 : 69;
|
|
414
|
+
h && !h.classList.contains("ant-select-selection-overflow-item-rest") && xe <= n - u && !De.tagRender && (v.value = 1, h.classList.add("ellipsis"));
|
|
343
415
|
}
|
|
344
|
-
},
|
|
345
|
-
|
|
346
|
-
() =>
|
|
416
|
+
}, Se = i(!1);
|
|
417
|
+
G(
|
|
418
|
+
() => a.value,
|
|
347
419
|
async () => {
|
|
348
|
-
if (
|
|
349
|
-
|
|
420
|
+
if (Se.value) {
|
|
421
|
+
Se.value = !1;
|
|
350
422
|
return;
|
|
351
423
|
}
|
|
352
|
-
|
|
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));
|
|
353
425
|
}
|
|
354
426
|
);
|
|
355
|
-
const
|
|
356
|
-
|
|
357
|
-
const
|
|
358
|
-
|
|
427
|
+
const Kl = (e) => {
|
|
428
|
+
if (!w.value || t.mode === "combobox") return e;
|
|
429
|
+
const l = Array.isArray(e) ? e : e == null ? [] : [e];
|
|
430
|
+
if (!l.length) return [];
|
|
431
|
+
const n = Array.from(new Set(l.filter((u) => u !== $e)));
|
|
432
|
+
if (!n.length) return;
|
|
433
|
+
let o = Array.isArray(a.value) ? a.value.slice() : [];
|
|
434
|
+
return n.forEach((u) => {
|
|
435
|
+
const r = o.findIndex((T) => T === u);
|
|
436
|
+
r > -1 ? o.splice(r, 1) : o.push(u);
|
|
437
|
+
}), o;
|
|
438
|
+
}, se = async (e, l, n = "antdv") => {
|
|
439
|
+
ae.value = !1, t.mode === "combobox" && fe();
|
|
440
|
+
let o = n === "antdv" ? Kl(e) : e;
|
|
441
|
+
if (o === void 0) {
|
|
442
|
+
z();
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
445
|
+
Se.value = !0, t.noDropdown && Array.isArray(o) && t.maxTagsLength < o.length && (o = o.slice(), o.pop()), n === "antdv" && w.value && (a.value = o), N.value = !0, x("update:model-value", o), x("change", o, l), z(), d.value = P, await k(), await _(), N.value = !1, t.isExterControlCount && t.focusOpen && (d.value = U.value ? P : v.value, C.value = !U.value), t.focusOpen || (d.value = v.value);
|
|
359
446
|
};
|
|
360
|
-
return
|
|
361
|
-
$select:
|
|
362
|
-
toChangeMaxCount:
|
|
363
|
-
}), (e,
|
|
364
|
-
const
|
|
365
|
-
return
|
|
447
|
+
return D({
|
|
448
|
+
$select: A,
|
|
449
|
+
toChangeMaxCount: Zl
|
|
450
|
+
}), (e, l) => {
|
|
451
|
+
const n = Xl("v-nodes");
|
|
452
|
+
return f(), y(
|
|
366
453
|
"div",
|
|
367
454
|
{
|
|
368
|
-
class:
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
455
|
+
class: Jl(["das-ui-select", [
|
|
456
|
+
t.borderType,
|
|
457
|
+
t.isView ? "readonly" : "",
|
|
458
|
+
t.error ? "is-error" : "",
|
|
459
|
+
C.value ? "show-ellipsis" : ""
|
|
373
460
|
]]),
|
|
374
461
|
ref_key: "$selectBox",
|
|
375
|
-
ref:
|
|
376
|
-
style:
|
|
377
|
-
onClick:
|
|
462
|
+
ref: E,
|
|
463
|
+
style: X(Vl.value),
|
|
464
|
+
onClick: ue(Hl, ["stop"])
|
|
378
465
|
},
|
|
379
466
|
[
|
|
380
|
-
|
|
467
|
+
de.value ? (f(), K(c(tt), {
|
|
381
468
|
key: 0,
|
|
382
469
|
ref_key: "inputTooltipRef",
|
|
383
|
-
ref:
|
|
470
|
+
ref: Me,
|
|
384
471
|
placement: "top",
|
|
385
472
|
"virtual-triggering": "",
|
|
386
|
-
"virtual-ref":
|
|
387
|
-
disabled:
|
|
388
|
-
content:
|
|
389
|
-
}, null, 8, ["virtual-ref", "disabled", "content"])) :
|
|
390
|
-
|
|
391
|
-
value:
|
|
392
|
-
"onUpdate:value": t[4] || (t[4] = (o) => xl(n) ? n.value = o : null),
|
|
473
|
+
"virtual-ref": de.value,
|
|
474
|
+
disabled: al.value,
|
|
475
|
+
content: rl.value
|
|
476
|
+
}, null, 8, ["virtual-ref", "disabled", "content"])) : L("v-if", !0),
|
|
477
|
+
Te((f(), K(c(et), Le({ mode: cl.value }, ol.value, {
|
|
478
|
+
value: ml.value,
|
|
393
479
|
ref_key: "$select",
|
|
394
|
-
ref:
|
|
395
|
-
options:
|
|
396
|
-
fieldNames:
|
|
397
|
-
bordered:
|
|
398
|
-
disabled:
|
|
480
|
+
ref: A,
|
|
481
|
+
options: yl.value,
|
|
482
|
+
fieldNames: p.fieldNames,
|
|
483
|
+
bordered: t.borderType === "bordered",
|
|
484
|
+
disabled: t.disabled || t.isView,
|
|
399
485
|
showArrow: !0,
|
|
400
|
-
open:
|
|
401
|
-
placeholder:
|
|
402
|
-
optionFilterProp:
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
486
|
+
open: t.noDropdown ? !1 : ye.value,
|
|
487
|
+
placeholder: Y.value,
|
|
488
|
+
optionFilterProp: je.value,
|
|
489
|
+
filterOption: Fe,
|
|
490
|
+
size: dl.value,
|
|
491
|
+
style: t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {},
|
|
492
|
+
dropdownClassName: "das-ui-select-dorpdown " + p.dropdownClassName,
|
|
493
|
+
maxTagCount: Cl.value,
|
|
494
|
+
getPopupContainer: Dl,
|
|
495
|
+
dropdownStyle: Al.value,
|
|
496
|
+
onDropdownVisibleChange: zl,
|
|
497
|
+
onChange: l[4] || (l[4] = (o, u) => se(o, u, "antdv")),
|
|
498
|
+
onFocus: Rl,
|
|
499
|
+
onBlur: Ge,
|
|
500
|
+
onSearch: Pl,
|
|
501
|
+
onPopupScroll: Nl
|
|
502
|
+
}), Ql({
|
|
414
503
|
option: m((o) => [
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
{ key
|
|
424
|
-
[
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
504
|
+
S(e.$slots, "option", ie(ce(o)), () => [
|
|
505
|
+
o.children && typeof o.children == "function" ? (f(), K(n, {
|
|
506
|
+
key: 0,
|
|
507
|
+
vnodes: o.children()
|
|
508
|
+
}, null, 8, ["vnodes"])) : (f(), y(
|
|
509
|
+
ke,
|
|
510
|
+
{ key: 1 },
|
|
511
|
+
[
|
|
512
|
+
L(' :option="{value, label, [disabled, key, title]}" '),
|
|
513
|
+
p.mode === "combobox" ? Te((f(), y("div", pt, [
|
|
514
|
+
Ve(
|
|
515
|
+
Z(o[I.value]),
|
|
516
|
+
1
|
|
517
|
+
/* TEXT */
|
|
518
|
+
)
|
|
519
|
+
])), [
|
|
520
|
+
[c(Ye)]
|
|
521
|
+
]) : (f(), y(
|
|
522
|
+
ke,
|
|
523
|
+
{ key: 1 },
|
|
524
|
+
[
|
|
525
|
+
L(` <das-tooltip v-if="mode === 'combobox'" placement="right-start" :text="option[labelKeyName]"></das-tooltip> `),
|
|
526
|
+
b("div", {
|
|
527
|
+
class: "das-multiple-option-item",
|
|
528
|
+
onMousedown: Bl,
|
|
529
|
+
onClick: (u) => Wl(o, u)
|
|
530
|
+
}, [
|
|
531
|
+
(f(), K(c(Qe), {
|
|
532
|
+
class: "das-select-checkbox",
|
|
533
|
+
modelValue: He.value.has(o[g.value]),
|
|
534
|
+
key: o[g.value],
|
|
535
|
+
disabled: o.disabled
|
|
536
|
+
}, null, 8, ["modelValue", "disabled"])),
|
|
537
|
+
Te((f(), y("div", mt, [
|
|
538
|
+
Ve(
|
|
539
|
+
Z(o[I.value]),
|
|
540
|
+
1
|
|
541
|
+
/* TEXT */
|
|
542
|
+
)
|
|
543
|
+
])), [
|
|
544
|
+
[c(Ye)]
|
|
455
545
|
])
|
|
456
|
-
],
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
546
|
+
], 40, ht)
|
|
547
|
+
],
|
|
548
|
+
2112
|
|
549
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
550
|
+
))
|
|
551
|
+
],
|
|
552
|
+
64
|
|
553
|
+
/* STABLE_FRAGMENT */
|
|
554
|
+
))
|
|
555
|
+
], !0)
|
|
466
556
|
]),
|
|
467
557
|
tagRender: m((o) => [
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
closable: o.closable,
|
|
558
|
+
S(e.$slots, "tagRender", ie(ce(o)), () => [
|
|
559
|
+
V(c(Ie), {
|
|
560
|
+
closable: !w.value && o.closable,
|
|
471
561
|
style: { "margin-right": "3px", "background-color": "transparent" },
|
|
472
|
-
onClose: (
|
|
562
|
+
onClose: (u) => ql(o)
|
|
473
563
|
}, {
|
|
474
564
|
default: m(() => [
|
|
475
|
-
|
|
565
|
+
w.value ? (f(), y("span", {
|
|
566
|
+
key: 0,
|
|
567
|
+
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
568
|
+
}, null, 8, gt)) : (f(), y(
|
|
476
569
|
"span",
|
|
477
570
|
{
|
|
571
|
+
key: 1,
|
|
478
572
|
class: "tag-span",
|
|
479
|
-
style:
|
|
573
|
+
style: X(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
|
|
480
574
|
},
|
|
481
|
-
|
|
575
|
+
Z(_l(pe(o.value) ?? o.label ?? String(o.value))),
|
|
482
576
|
5
|
|
483
577
|
/* TEXT, STYLE */
|
|
484
|
-
)
|
|
578
|
+
))
|
|
485
579
|
]),
|
|
486
580
|
_: 2
|
|
487
581
|
/* DYNAMIC */
|
|
@@ -489,42 +583,42 @@ const Wl = { key: 0 }, Pl = { class: "das-multiple-option-item" }, Fl = { style:
|
|
|
489
583
|
], !0)
|
|
490
584
|
]),
|
|
491
585
|
dropdownRender: m(({ menuNode: o }) => [
|
|
492
|
-
|
|
493
|
-
var
|
|
586
|
+
S(e.$slots, "dropdownRender", ie(ce({ menuNode: o })), () => {
|
|
587
|
+
var u;
|
|
494
588
|
return [
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
])) :
|
|
589
|
+
Ne.value === "combobox" ? (f(), y("div", yt, [
|
|
590
|
+
V(n, { vnodes: o }, null, 8, ["vnodes"])
|
|
591
|
+
])) : Ne.value === "custom" ? (f(), y("div", {
|
|
498
592
|
key: 1,
|
|
499
|
-
onClick:
|
|
593
|
+
onClick: l[2] || (l[2] = ue(() => {
|
|
500
594
|
}, ["stop"]))
|
|
501
595
|
}, [
|
|
502
|
-
|
|
596
|
+
V(n, { vnodes: o }, null, 8, ["vnodes"]),
|
|
503
597
|
b(
|
|
504
598
|
"div",
|
|
505
599
|
{
|
|
506
600
|
class: "customDropdown",
|
|
507
|
-
onMousedown:
|
|
601
|
+
onMousedown: l[1] || (l[1] = (r) => r.preventDefault())
|
|
508
602
|
},
|
|
509
603
|
[
|
|
510
|
-
|
|
604
|
+
V(c(ot), Le({
|
|
511
605
|
ref_key: "testInput",
|
|
512
|
-
ref:
|
|
513
|
-
modelValue:
|
|
514
|
-
"onUpdate:modelValue":
|
|
515
|
-
onKeyup:
|
|
516
|
-
onFocus:
|
|
517
|
-
onBlur:
|
|
606
|
+
ref: sl,
|
|
607
|
+
modelValue: R.value,
|
|
608
|
+
"onUpdate:modelValue": l[0] || (l[0] = (r) => R.value = r),
|
|
609
|
+
onKeyup: Yl(_e, ["enter"]),
|
|
610
|
+
onFocus: ue(ul, ["stop"]),
|
|
611
|
+
onBlur: ue(il, ["stop"]),
|
|
518
612
|
width: "100%",
|
|
519
613
|
borderType: "bordered"
|
|
520
|
-
},
|
|
614
|
+
}, t.inputAttrs), null, 16, ["modelValue"]),
|
|
521
615
|
b(
|
|
522
616
|
"div",
|
|
523
617
|
{
|
|
524
618
|
class: "addBtn",
|
|
525
|
-
onClick:
|
|
619
|
+
onClick: _e
|
|
526
620
|
},
|
|
527
|
-
|
|
621
|
+
Z(c(M)("添加")),
|
|
528
622
|
1
|
|
529
623
|
/* TEXT */
|
|
530
624
|
)
|
|
@@ -532,26 +626,26 @@ const Wl = { key: 0 }, Pl = { class: "das-multiple-option-item" }, Fl = { style:
|
|
|
532
626
|
32
|
|
533
627
|
/* NEED_HYDRATION */
|
|
534
628
|
)
|
|
535
|
-
])) : (
|
|
536
|
-
|
|
537
|
-
(
|
|
629
|
+
])) : (f(), y("div", bt, [
|
|
630
|
+
V(n, { vnodes: o }, null, 8, ["vnodes"]),
|
|
631
|
+
(u = t.options) != null && u.length && t.showSelectAll ? (f(), y(
|
|
538
632
|
"div",
|
|
539
633
|
{
|
|
540
634
|
key: 0,
|
|
541
635
|
class: "das-ui-select-dropdown-checkall",
|
|
542
|
-
onMousedown:
|
|
636
|
+
onMousedown: l[3] || (l[3] = (r) => r.preventDefault())
|
|
543
637
|
},
|
|
544
638
|
[
|
|
545
|
-
b("div",
|
|
546
|
-
|
|
547
|
-
modelValue:
|
|
548
|
-
indeterminate:
|
|
549
|
-
onChange:
|
|
639
|
+
b("div", Ct, [
|
|
640
|
+
V(c(Qe), {
|
|
641
|
+
modelValue: Tl.value,
|
|
642
|
+
indeterminate: kl.value,
|
|
643
|
+
onChange: $l,
|
|
550
644
|
style: { display: "flex" }
|
|
551
645
|
}, {
|
|
552
646
|
default: m(() => [
|
|
553
|
-
|
|
554
|
-
|
|
647
|
+
Ve(
|
|
648
|
+
Z(c(M)("全选")),
|
|
555
649
|
1
|
|
556
650
|
/* TEXT */
|
|
557
651
|
)
|
|
@@ -562,41 +656,41 @@ const Wl = { key: 0 }, Pl = { class: "das-multiple-option-item" }, Fl = { style:
|
|
|
562
656
|
]),
|
|
563
657
|
b("span", {
|
|
564
658
|
class: "das-ui-dropdown-has-checked",
|
|
565
|
-
innerHTML:
|
|
566
|
-
}, null, 8,
|
|
659
|
+
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
660
|
+
}, null, 8, wt)
|
|
567
661
|
],
|
|
568
662
|
32
|
|
569
663
|
/* NEED_HYDRATION */
|
|
570
|
-
)) :
|
|
664
|
+
)) : L("v-if", !0)
|
|
571
665
|
]))
|
|
572
666
|
];
|
|
573
667
|
}, !0)
|
|
574
668
|
]),
|
|
575
669
|
clearIcon: m(() => [
|
|
576
|
-
|
|
577
|
-
|
|
670
|
+
S(e.$slots, "clearIcon", {}, () => [
|
|
671
|
+
V(c(at), { size: "medium" })
|
|
578
672
|
], !0)
|
|
579
673
|
]),
|
|
580
674
|
maxTagPlaceholder: m((o) => [
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
style:
|
|
675
|
+
S(e.$slots, "maxTagPlaceholder", ie(ce(o)), () => [
|
|
676
|
+
L(" 隐藏tag时显示的内容 "),
|
|
677
|
+
V(c(Ie), {
|
|
678
|
+
style: X(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
|
|
585
679
|
}, {
|
|
586
680
|
default: m(() => [
|
|
587
681
|
b("span", {
|
|
588
|
-
innerHTML:
|
|
589
|
-
}, null, 8,
|
|
682
|
+
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
683
|
+
}, null, 8, St)
|
|
590
684
|
]),
|
|
591
685
|
_: 1
|
|
592
686
|
/* STABLE */
|
|
593
687
|
}, 8, ["style"]),
|
|
594
|
-
|
|
688
|
+
L(" <a-tag>+{{ currValue?.length - maxTagCountCell }}</a-tag> ")
|
|
595
689
|
], !0)
|
|
596
690
|
]),
|
|
597
691
|
notFoundContent: m(() => [
|
|
598
|
-
|
|
599
|
-
|
|
692
|
+
S(e.$slots, "notFoundContent", {}, () => [
|
|
693
|
+
l[5] || (l[5] = b(
|
|
600
694
|
"div",
|
|
601
695
|
{ class: "hasNoData" },
|
|
602
696
|
"暂无数据",
|
|
@@ -606,15 +700,15 @@ const Wl = { key: 0 }, Pl = { class: "das-multiple-option-item" }, Fl = { style:
|
|
|
606
700
|
], !0)
|
|
607
701
|
]),
|
|
608
702
|
suffixIcon: m(() => [
|
|
609
|
-
|
|
610
|
-
|
|
703
|
+
S(e.$slots, "suffixIcon", {}, () => [
|
|
704
|
+
V(c(nt), {
|
|
611
705
|
class: "das-suffix-icon",
|
|
612
706
|
size: "medium"
|
|
613
707
|
})
|
|
614
708
|
], !0)
|
|
615
709
|
]),
|
|
616
710
|
default: m(() => [
|
|
617
|
-
|
|
711
|
+
S(e.$slots, "default", {}, void 0, !0)
|
|
618
712
|
]),
|
|
619
713
|
_: 2
|
|
620
714
|
/* DYNAMIC */
|
|
@@ -622,72 +716,72 @@ const Wl = { key: 0 }, Pl = { class: "das-multiple-option-item" }, Fl = { style:
|
|
|
622
716
|
e.$slots.menuItemSelectedIcon ? {
|
|
623
717
|
name: "menuItemSelectedIcon",
|
|
624
718
|
fn: m(() => [
|
|
625
|
-
|
|
719
|
+
S(e.$slots, "menuItemSelectedIcon", {}, void 0, !0)
|
|
626
720
|
]),
|
|
627
721
|
key: "0"
|
|
628
722
|
} : void 0,
|
|
629
723
|
e.$slots.placeholder ? {
|
|
630
724
|
name: "placeholder",
|
|
631
725
|
fn: m(() => [
|
|
632
|
-
|
|
726
|
+
S(e.$slots, "placeholder", {}, void 0, !0)
|
|
633
727
|
]),
|
|
634
728
|
key: "1"
|
|
635
729
|
} : void 0,
|
|
636
730
|
e.$slots.removeIcon ? {
|
|
637
731
|
name: "removeIcon",
|
|
638
732
|
fn: m(() => [
|
|
639
|
-
|
|
733
|
+
S(e.$slots, "removeIcon", {}, void 0, !0)
|
|
640
734
|
]),
|
|
641
735
|
key: "2"
|
|
642
736
|
} : void 0
|
|
643
737
|
]), 1040, ["mode", "value", "options", "fieldNames", "bordered", "disabled", "open", "placeholder", "optionFilterProp", "size", "style", "dropdownClassName", "maxTagCount", "dropdownStyle"])), [
|
|
644
|
-
[
|
|
645
|
-
[
|
|
738
|
+
[c(lt), { target: Fl, x: !1 }],
|
|
739
|
+
[c(st), Ol]
|
|
646
740
|
]),
|
|
647
|
-
|
|
648
|
-
|
|
741
|
+
p.error && p.errorLabel ? (f(), y(
|
|
742
|
+
ke,
|
|
649
743
|
{ key: 1 },
|
|
650
744
|
[
|
|
651
|
-
|
|
745
|
+
p.errorMode === "default" ? (f(), y("div", xt, [
|
|
652
746
|
b(
|
|
653
747
|
"span",
|
|
654
748
|
{
|
|
655
|
-
style:
|
|
749
|
+
style: X(Il.value)
|
|
656
750
|
},
|
|
657
|
-
|
|
751
|
+
Z(p.errorLabel),
|
|
658
752
|
5
|
|
659
753
|
/* TEXT, STYLE */
|
|
660
754
|
)
|
|
661
|
-
])) :
|
|
662
|
-
|
|
755
|
+
])) : L("v-if", !0),
|
|
756
|
+
p.errorMode === "overlay" && we.value ? (f(), K(c(rt), {
|
|
663
757
|
key: 1,
|
|
664
|
-
errorLabel:
|
|
665
|
-
getEl: () =>
|
|
666
|
-
errorModelZIndex:
|
|
667
|
-
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) :
|
|
758
|
+
errorLabel: p.errorLabel,
|
|
759
|
+
getEl: () => A.value.$el,
|
|
760
|
+
errorModelZIndex: p.errorModelZIndex
|
|
761
|
+
}, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : L("v-if", !0)
|
|
668
762
|
],
|
|
669
763
|
64
|
|
670
764
|
/* STABLE_FRAGMENT */
|
|
671
|
-
)) :
|
|
765
|
+
)) : L("v-if", !0),
|
|
672
766
|
b(
|
|
673
767
|
"div",
|
|
674
768
|
{
|
|
675
769
|
class: "ant-select-selection-overflow",
|
|
676
770
|
ref_key: "virtualTotalCount",
|
|
677
|
-
ref:
|
|
771
|
+
ref: Pe,
|
|
678
772
|
style: { position: "absolute", left: "-50%", top: "-50%", opacity: "0", "pointer-events": "none" }
|
|
679
773
|
},
|
|
680
774
|
[
|
|
681
|
-
b("div",
|
|
682
|
-
b("div",
|
|
683
|
-
b("span",
|
|
684
|
-
|
|
685
|
-
style:
|
|
775
|
+
b("div", At, [
|
|
776
|
+
b("div", Tt, [
|
|
777
|
+
b("span", kt, [
|
|
778
|
+
V(c(Ie), {
|
|
779
|
+
style: X(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
|
|
686
780
|
}, {
|
|
687
781
|
default: m(() => [
|
|
688
782
|
b("span", {
|
|
689
|
-
innerHTML:
|
|
690
|
-
}, null, 8,
|
|
783
|
+
innerHTML: c(M)("das-ui-select-selectedItemsCountWithPlaceholder", Q.value)
|
|
784
|
+
}, null, 8, Vt)
|
|
691
785
|
]),
|
|
692
786
|
_: 1
|
|
693
787
|
/* STABLE */
|
|
@@ -705,23 +799,23 @@ const Wl = { key: 0 }, Pl = { class: "das-multiple-option-item" }, Fl = { style:
|
|
|
705
799
|
);
|
|
706
800
|
};
|
|
707
801
|
}
|
|
708
|
-
}),
|
|
709
|
-
const
|
|
710
|
-
for (const [
|
|
711
|
-
|
|
712
|
-
return
|
|
713
|
-
},
|
|
714
|
-
function
|
|
715
|
-
const
|
|
716
|
-
return
|
|
717
|
-
|
|
718
|
-
|
|
802
|
+
}), tl = (p, D) => {
|
|
803
|
+
const $ = p.__vccOpts || p;
|
|
804
|
+
for (const [t, x] of D)
|
|
805
|
+
$[t] = x;
|
|
806
|
+
return $;
|
|
807
|
+
}, Mt = /* @__PURE__ */ tl(Lt, [["__scopeId", "data-v-93b3fa17"]]), Ot = {};
|
|
808
|
+
function zt(p, D) {
|
|
809
|
+
const $ = vt;
|
|
810
|
+
return f(), K(
|
|
811
|
+
$,
|
|
812
|
+
Le({ class: "das-ui-select-option" }, p.$attrs),
|
|
719
813
|
null,
|
|
720
814
|
16
|
|
721
815
|
/* FULL_PROPS */
|
|
722
816
|
);
|
|
723
817
|
}
|
|
724
|
-
const
|
|
818
|
+
const Pt = /* @__PURE__ */ tl(Ot, [["render", zt]]), Nt = {
|
|
725
819
|
添加: { "zh-CN": "添加", en: "Add", "zh-MO": "添加", _appCode: "framework" },
|
|
726
820
|
全选: { "zh-CN": "全选", en: "Select All", "zh-MO": "全選", _appCode: "framework" },
|
|
727
821
|
已选: { "zh-CN": "已选", en: "Selected", "zh-MO": "已選", _appCode: "framework" },
|
|
@@ -732,10 +826,10 @@ const ot = /* @__PURE__ */ We(lt, [["render", tt]]), at = {
|
|
|
732
826
|
_appCode: "framework"
|
|
733
827
|
}
|
|
734
828
|
};
|
|
735
|
-
|
|
736
|
-
const
|
|
829
|
+
it(Nt);
|
|
830
|
+
const lo = el(Mt), to = el(Pt), oo = { name: "select 选择器" };
|
|
737
831
|
export {
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
832
|
+
lo as DasSelect,
|
|
833
|
+
to as DasSelectOption,
|
|
834
|
+
oo as default
|
|
741
835
|
};
|