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