@das-fed/ui 6.4.0-test.20 → 6.4.0-test.21

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.
@@ -1,17 +1,17 @@
1
1
  import '@das-fed/ui/packages/components/select/style.css';
2
2
  import { withInstall as Oe } from "@das-fed/utils/with-install/index";
3
- import { defineComponent as Pe, useCssVars as xl, ref as n, computed as i, watch as Y, useSlots as Cl, onMounted as me, onUnmounted as De, watchEffect as he, nextTick as T, resolveComponent as wl, openBlock as d, createElementBlock as b, normalizeClass as Tl, normalizeStyle as k, createVNode as y, unref as r, withDirectives as be, createBlock as K, mergeProps as Re, isRef as kl, withModifiers as ee, createSlots as Sl, withCtx as m, renderSlot as x, normalizeProps as le, guardReactiveProps as te, Fragment as ge, createTextVNode as ye, toDisplayString as I, createElementVNode as h, withKeys as Il, createCommentVNode as xe, Teleport as zl } from "vue";
3
+ import { defineComponent as Pe, useCssVars as xl, ref as n, computed as i, watch as Y, useSlots as Cl, onMounted as me, onUnmounted as Ae, watchEffect as he, nextTick as k, resolveComponent as wl, openBlock as d, createElementBlock as b, normalizeClass as Tl, normalizeStyle as S, createVNode as x, unref as r, withDirectives as be, createBlock as K, mergeProps as Re, isRef as kl, withModifiers as ee, createSlots as Sl, withCtx as m, renderSlot as C, normalizeProps as le, guardReactiveProps as te, Fragment as ge, createTextVNode as ye, toDisplayString as z, createElementVNode as h, withKeys as Il, createCommentVNode as xe, Teleport as zl } from "vue";
4
4
  import { Select as Ml, Tag as Ce } from "ant-design-vue";
5
- import { DasCheckbox as Ae } from "@das-fed/ui/packages/components/checkbox/index";
5
+ import { DasCheckbox as De } from "@das-fed/ui/packages/components/checkbox/index";
6
6
  import { vScrollbar as Vl } from "@das-fed/ui/packages/components/scrollbar/index";
7
- import { DasTooltip as Ll } from "@das-fed/ui/packages/components/tooltip/index";
7
+ import { DasTooltip as $l } from "@das-fed/ui/packages/components/tooltip/index";
8
8
  import { vDasTooltip as Ee } from "@das-fed/ui/packages/components/text-tooltip/index";
9
- import { DasInput as _l } from "@das-fed/ui/packages/components/input/index";
10
- import { DasIconXiala as Fl } from "@das-fed/ui/packages/icons/xiala/index";
11
- import { DasIconEmpty as Nl } from "@das-fed/ui/packages/icons/empty/index";
12
- import { vHoverInside as $l } from "@das-fed/utils/directive";
9
+ import { DasInput as Ll } from "@das-fed/ui/packages/components/input/index";
10
+ import { DasIconXiala as _l } from "@das-fed/ui/packages/icons/xiala/index";
11
+ import { DasIconEmpty as Fl } from "@das-fed/ui/packages/icons/empty/index";
12
+ import { vHoverInside as Nl } from "@das-fed/utils/directive";
13
13
  import { getVarValue as We, getVar as He, setThemeRule as Bl } from "@das-fed/web/packages/theme/index";
14
- import { t as P, currentLang as Dl, setI18nRule as Al } from "@das-fed/web/packages/i18n/index";
14
+ import { t as R, currentLang as Al, setI18nRule as Dl } from "@das-fed/web/packages/i18n/index";
15
15
  import { useZIndex as El } from "@das-fed/utils/hooks/popup-manager/use-zindex";
16
16
  import { useModelValue as Wl } from "@das-fed/utils/vue";
17
17
  import { calcTextWidth as Hl } from "@das-fed/utils/common-tools";
@@ -27,7 +27,7 @@ const Pl = { key: 0 }, Rl = {
27
27
  }, Jl = { class: "ant-select ant-select-multiple ant-select-selection-overflow-item ant-select-selection-overflow-item-rest" }, Ql = { class: "ant-select-selection-item" }, Yl = { class: "ant-select-selection-item-content" }, et = ["innerHTML"], lt = Pe({
28
28
  inheritAttrs: !1,
29
29
  components: {
30
- VNodes: (z, { attrs: $ }) => $.vnodes
30
+ VNodes: (M, { attrs: B }) => B.vnodes
31
31
  }
32
32
  }), tt = /* @__PURE__ */ Pe({
33
33
  ...lt,
@@ -66,27 +66,29 @@ const Pl = { key: 0 }, Rl = {
66
66
  dropdownMode: {}
67
67
  },
68
68
  emits: ["update:model-value", "change", "focus", "blur", "dropdownVisibleChange", "addCustomItem"],
69
- setup(z, { expose: $, emit: B }) {
69
+ setup(M, { expose: B, emit: A }) {
70
70
  xl((e) => ({
71
- "6d3e5102": Ye.value,
72
- "48eb1e8e": el.value
71
+ "5a771b26": Ye.value,
72
+ "4ac56072": el.value
73
73
  }));
74
- const l = z, C = B, s = Wl(l, "modelValue"), Ze = n(null), oe = i(() => {
74
+ const l = M, w = A, s = Wl(l, "modelValue"), Ze = n(null), oe = i(() => {
75
75
  var e;
76
76
  return `<span class='key'>${((e = s.value) == null ? void 0 : e.length) ?? 0}</span>`;
77
- }), D = n(null), we = n(null), g = n(!1), U = i(() => l.isView ? l.noSetDefaultVal ? "" : "-" : l.placeholder || P("请选择")), Ke = i(() => D.value ? D.value.querySelector(".ant-select-selector") : null), A = n(0), E = n(0), Ue = i(() => l.isTooltip && M.value ? !1 : !l.isTooltip || L.value || !_e.value || !re.value), je = i(() => (Array.isArray(s.value) ? s.value.length : s.value) ? _e.value : U.value), Te = () => {
77
+ }), D = n(null), we = n(null), g = n(!1), U = i(() => l.isView ? l.noSetDefaultVal ? "" : "-" : l.placeholder || R("请选择")), Ke = i(() => D.value ? D.value.querySelector(".ant-select-selector") : null), E = n(0), W = n(0), Ue = i(() => l.isTooltip && V.value ? !1 : !l.isTooltip || L.value || !Le.value || !re.value), je = i(() => (Array.isArray(s.value) ? s.value.length : s.value) ? Le.value : U.value), Te = () => {
78
78
  const e = l.size === "table" ? 12 : 14;
79
79
  return Hl(U.value, e);
80
80
  }, ke = () => {
81
- const e = D.value.querySelector(".ant-select-selection-placeholder");
82
- let t = (e == null ? void 0 : e.offsetWidth) ?? 0;
83
- if (t === 0) return t;
84
- const a = window.getComputedStyle(e, null), o = parseFloat(a.paddingRight), v = parseFloat(a.paddingLeft);
85
- return t - o - v;
86
- }, M = n(!1);
81
+ var T;
82
+ const e = D.value.querySelector(".ant-select-selection-placeholder"), t = (T = y.value) == null ? void 0 : T.$el.querySelectorAll(".ant-select-selection-item");
83
+ t && t.length && t.forEach((N) => N.removeAttribute("title"));
84
+ let o = (e == null ? void 0 : e.offsetWidth) ?? 0;
85
+ if (o === 0) return o;
86
+ const a = window.getComputedStyle(e, null), v = parseFloat(a.paddingRight), f = parseFloat(a.paddingLeft);
87
+ return o - v - f;
88
+ }, V = n(!1);
87
89
  Y(() => [U.value, s.value], () => {
88
- T(() => {
89
- E.value = ke(), A.value = Te(), ((Array.isArray(s.value) ? s.value.length : s.value) || E.value === A.value || A.value - E.value < 1) && (M.value = !1);
90
+ k(() => {
91
+ W.value = ke(), E.value = Te(), ((Array.isArray(s.value) ? s.value.length : s.value) || W.value === E.value || E.value - W.value < 1) && (V.value = !1);
90
92
  });
91
93
  }), Y(
92
94
  () => {
@@ -95,44 +97,44 @@ const Pl = { key: 0 }, Rl = {
95
97
  },
96
98
  (e) => {
97
99
  e && (e.addEventListener("mouseenter", function() {
98
- M.value = !0, O.value && clearTimeout(O.value);
100
+ V.value = !0, P.value && clearTimeout(P.value);
99
101
  }), e.addEventListener("mouseleave", function() {
100
- O.value = setTimeout(() => {
101
- M.value = !1;
102
+ P.value = setTimeout(() => {
103
+ V.value = !1;
102
104
  }, 200);
103
105
  }));
104
106
  }
105
107
  );
106
- const Se = n(null), Ie = i(() => l.dropdownMode ?? l.mode ?? ""), W = n(null), Xe = n(null), H = n(""), Ge = () => {
107
- W.value = !0;
108
+ const Se = n(null), Ie = i(() => l.dropdownMode ?? l.mode ?? ""), H = n(null), Xe = n(null), O = n(""), Ge = () => {
109
+ H.value = !0;
108
110
  }, Je = () => {
109
- W.value = null;
111
+ H.value = null;
110
112
  }, ze = () => {
111
- H.value && (C("addCustomItem", H.value), T(() => {
112
- w.value.focus(), H.value = "";
113
+ O.value && (w("addCustomItem", O.value), k(() => {
114
+ y.value.focus(), O.value = "";
113
115
  }));
114
116
  }, Me = Cl(), ae = () => {
115
- l.dropdownMode === "custom" && !Me.dropdownRender && (W.value = !1, T(() => {
116
- W.value = null;
117
+ l.dropdownMode === "custom" && !Me.dropdownRender && (H.value = !1, k(() => {
118
+ H.value = null;
117
119
  }));
118
120
  };
119
121
  me(() => {
120
122
  document.addEventListener("click", ae);
121
- }), De(() => {
123
+ }), Ae(() => {
122
124
  document.removeEventListener("click", ae);
123
125
  });
124
- const w = n(), Ve = n(), se = n(!1), ne = i(() => {
125
- if (W.value !== null) return W.value;
126
+ const y = n(), Ve = n(), se = n(!1), ne = i(() => {
127
+ if (H.value !== null) return H.value;
126
128
  if (l.open !== void 0) return l.open;
127
- }), V = 1e6, u = n(100), c = n(100), L = n(!1), re = n(!0), ue = n(!1);
129
+ }), $ = 1e6, u = n(100), c = n(100), L = n(!1), re = n(!0), ue = n(!1);
128
130
  he(() => {
129
131
  s.value && l.mode == "combobox" && (re.value = !0, setTimeout(() => {
130
132
  var t;
131
- let e = (t = w.value) == null ? void 0 : t.$el.querySelectorAll(".ant-select-selection-item");
133
+ let e = (t = y.value) == null ? void 0 : t.$el.querySelectorAll(".ant-select-selection-item");
132
134
  if (e && e.length > 0)
133
- for (let a = 0; a < e.length; a++) {
134
- let o = e[a];
135
- o.scrollWidth <= o.offsetWidth && (re.value = !1), o.title = "";
135
+ for (let o = 0; o < e.length; o++) {
136
+ let a = e[o];
137
+ a.scrollWidth <= a.offsetWidth && (re.value = !1), a.title = "";
136
138
  }
137
139
  }, 300));
138
140
  }), he(() => {
@@ -148,32 +150,32 @@ const Pl = { key: 0 }, Rl = {
148
150
  }), me(() => {
149
151
  ue.value = !0, l.focusOpen || (c.value = 1, u.value = c.value, g.value = !0);
150
152
  });
151
- const Ye = i(() => l.width ? l.width : "230px"), el = i(() => l.height ? l.height : "auto"), Le = n(3e3), ll = i(() => ({
152
- "z-index": Le.value
153
- })), _e = i(() => {
153
+ const Ye = i(() => l.width ? l.width : "230px"), el = i(() => l.height ? l.height : "auto"), $e = n(3e3), ll = i(() => ({
154
+ "z-index": $e.value
155
+ })), Le = i(() => {
154
156
  var t;
155
157
  let e = [];
156
158
  if (l.mode != "combobox" && Array.isArray(s.value))
157
- s.value.map((a) => {
159
+ s.value.map((o) => {
158
160
  var v;
159
- let o = (v = l.options) == null ? void 0 : v.find((p) => p[_.value] == a);
160
- o && e.push(o[j.value]);
161
+ let a = (v = l.options) == null ? void 0 : v.find((f) => f[_.value] == o);
162
+ a && e.push(a[j.value]);
161
163
  });
162
164
  else if (l.mode == "combobox" && s.value) {
163
- let a = (t = l.options) == null ? void 0 : t.find((o) => o[_.value] == s.value);
164
- a && e.push(a[j.value]);
165
+ let o = (t = l.options) == null ? void 0 : t.find((a) => a[_.value] == s.value);
166
+ o && e.push(o[j.value]);
165
167
  }
166
- return Dl.value === "zh-CN" ? e.join("、") : e.join(", ");
168
+ return Al.value === "zh-CN" ? e.join("、") : e.join(", ");
167
169
  }), tl = i(() => {
168
170
  var t;
169
171
  if (l.mode === "combobox") return !1;
170
- let e = l.options.filter((a) => !a.disabled);
172
+ let e = l.options.filter((o) => !o.disabled);
171
173
  return !!(Array.isArray(s.value) && ((t = s.value) == null ? void 0 : t.length) == e.length);
172
174
  }), ol = i(() => {
173
- var t, a;
175
+ var t, o;
174
176
  if (l.mode === "combobox") return !1;
175
- let e = l.options.filter((o) => !o.disabled);
176
- return !!(Array.isArray(s.value) && ((t = s.value) == null ? void 0 : t.length) > 0 && ((a = s.value) == null ? void 0 : a.length) < e.length);
177
+ let e = l.options.filter((a) => !a.disabled);
178
+ return !!(Array.isArray(s.value) && ((t = s.value) == null ? void 0 : t.length) > 0 && ((o = s.value) == null ? void 0 : o.length) < e.length);
177
179
  }), al = i(() => {
178
180
  var e, t;
179
181
  return l.optionFilterProp ? l.optionFilterProp : (e = l.fieldNames) != null && e.label ? (t = l.fieldNames) == null ? void 0 : t.label : "label";
@@ -185,7 +187,7 @@ const Pl = { key: 0 }, Rl = {
185
187
  return l.fieldNames && l.fieldNames.value ? (e = l.fieldNames) == null ? void 0 : e.value : "value";
186
188
  }), sl = i(() => ({
187
189
  width: typeof l.width == "number" ? l.width + "px" : l.width
188
- })), ie = n(!1), R = n({
190
+ })), ie = n(!1), q = n({
189
191
  x: 0,
190
192
  y: 0
191
193
  }), de = n(0), ce = i(() => ({
@@ -201,83 +203,86 @@ const Pl = { key: 0 }, Rl = {
201
203
  width: de.value + "px",
202
204
  position: "fixed",
203
205
  visibility: "visible",
204
- top: R.value.y + "px",
205
- left: R.value.x + "px"
206
+ top: q.value.y + "px",
207
+ left: q.value.x + "px"
206
208
  })), X = n({
207
209
  display: "block",
208
210
  color: We("--das-ui-select-overlay-error-color").value,
209
211
  "white-space": "break-spaces"
210
212
  }), rl = () => {
211
- var Z, f, Q, Ne;
213
+ var N, p, Q, Fe;
212
214
  const e = () => {
213
- var S = document.createElement("div");
215
+ var I = document.createElement("div");
214
216
  for (let [pe, Be] of Object.entries({
215
217
  ...ce.value,
216
218
  ...X.value,
217
219
  width: de.value + "px"
218
220
  }))
219
- S.style[pe] = Be;
220
- S.textContent = l.errorLabel, document.body.appendChild(S);
221
- const $e = S.offsetHeight;
222
- return document.body.removeChild(S), $e;
221
+ I.style[pe] = Be;
222
+ I.textContent = l.errorLabel, document.body.appendChild(I);
223
+ const Ne = I.offsetHeight;
224
+ return document.body.removeChild(I), Ne;
223
225
  }, t = () => {
224
- const S = document.documentElement.clientHeight, pe = document.documentElement.scrollHeight - S;
225
- return S - pe;
226
+ const I = document.documentElement.clientHeight, pe = document.documentElement.scrollHeight - I;
227
+ return I - pe;
226
228
  };
227
- de.value = (f = (Z = w.value) == null ? void 0 : Z.$el) == null ? void 0 : f.clientWidth;
228
- const { top: a = 0, left: o = 0, height: v = 0 } = ((Ne = (Q = w.value) == null ? void 0 : Q.$el) == null ? void 0 : Ne.getBoundingClientRect()) ?? {}, p = t(), N = e();
229
- a + v + N >= p ? R.value.y = a - N : R.value.y = a + v, R.value.x = o;
230
- }, O = n(), ul = () => {
231
- E.value = ke(), A.value = Te(), (Array.isArray(s.value) ? s.value.length : s.value) || E.value === A.value || A.value - E.value < 1 ? M.value = !1 : (M.value = !0, O.value && clearTimeout(O.value)), rl(), ie.value = !0;
229
+ de.value = (p = (N = y.value) == null ? void 0 : N.$el) == null ? void 0 : p.clientWidth;
230
+ const { top: o = 0, left: a = 0, height: v = 0 } = ((Fe = (Q = y.value) == null ? void 0 : Q.$el) == null ? void 0 : Fe.getBoundingClientRect()) ?? {}, f = t(), T = e();
231
+ o + v + T >= f ? q.value.y = o - T : q.value.y = o + v, q.value.x = a;
232
+ }, P = n(), ul = () => {
233
+ var o;
234
+ W.value = ke(), E.value = Te();
235
+ let e = (o = y.value) == null ? void 0 : o.$el.querySelectorAll(".ant-select-selection-item");
236
+ !!(Array.isArray(s.value) ? s.value.length : e != null && e.length) || W.value === E.value || E.value - W.value < 1 ? V.value = !1 : (V.value = !0, P.value && clearTimeout(P.value)), rl(), ie.value = !0;
232
237
  }, il = () => {
233
- O.value = setTimeout(() => {
234
- M.value = !1;
238
+ P.value = setTimeout(() => {
239
+ V.value = !1;
235
240
  }, 200), ie.value = !1;
236
241
  }, dl = (e, t) => {
237
242
  e ? ul() : il();
238
243
  }, cl = (e) => {
239
- e && (Le.value = El().nextZIndex(), H.value = ""), G.value = e, l.mode == "combobox" && (e || setTimeout(() => {
240
- var t, a;
241
- (a = (t = w.value) == null ? void 0 : t.blur) == null || a.call(t);
242
- })), C("dropdownVisibleChange", e);
244
+ e && ($e.value = El().nextZIndex(), O.value = ""), G.value = e, l.mode == "combobox" && (e || setTimeout(() => {
245
+ var t, o;
246
+ (o = (t = y.value) == null ? void 0 : t.blur) == null || o.call(t);
247
+ })), w("dropdownVisibleChange", e);
243
248
  }, vl = (e) => {
244
249
  let t = e.toString();
245
250
  return t.length > l.maxTagTextLength && (t = t.substr(0, l.maxTagTextLength) + "..."), t;
246
251
  }, fl = (e) => l.isRenderNode ? D.value : l.getPopupContainer === void 0 ? document.body : l.getPopupContainer(e), pl = (e) => {
247
252
  if (e) {
248
253
  Array.isArray(s.value) || (s.value = []);
249
- let t = s.value, a = [];
250
- l.options.forEach((o) => {
251
- !s.value.includes(o[_.value]) && !o.disabled && (t.push(o[_.value]), a.push(o));
252
- }), s.value = t, fe(s.value, a);
254
+ let t = s.value, o = [];
255
+ l.options.forEach((a) => {
256
+ !s.value.includes(a[_.value]) && !a.disabled && (t.push(a[_.value]), o.push(a));
257
+ }), s.value = t, fe(s.value, o);
253
258
  } else {
254
259
  let t = s.value;
255
- s.value = t.filter((a) => !!l.options.find((o) => o[_.value] === a).disabled), fe(s.value, []);
260
+ s.value = t.filter((o) => !!l.options.find((a) => a[_.value] === o).disabled), fe(s.value, []);
256
261
  }
257
262
  }, ml = (e) => {
258
263
  if (e.className.indexOf("ant-select-multiple") > -1 && e.children[0])
259
264
  return e.children[0];
260
265
  }, hl = (e) => {
261
266
  if (l.mode == "combobox") {
262
- C("focus", e);
267
+ w("focus", e);
263
268
  return;
264
269
  }
265
- se.value = !0, l.focusOpen && !l.isExterControlCount && (u.value = V, g.value = !1), C("focus", e);
270
+ se.value = !0, l.focusOpen && !l.isExterControlCount && (u.value = $, g.value = !1), w("focus", e);
266
271
  }, G = n(!1), bl = () => {
267
272
  G.value || setTimeout(() => {
268
273
  var e, t;
269
- (t = (e = w.value) == null ? void 0 : e.blur) == null || t.call(e);
274
+ (t = (e = y.value) == null ? void 0 : e.blur) == null || t.call(e);
270
275
  }), l.mode != "combobox";
271
- }, Fe = (e) => {
272
- if (T(() => {
276
+ }, _e = (e) => {
277
+ if (k(() => {
273
278
  G.value = !1;
274
279
  }), l.mode == "combobox") {
275
- C("blur", e);
280
+ w("blur", e);
276
281
  return;
277
282
  }
278
- se.value = !1, l.focusOpen && !l.isExterControlCount && (F(), u.value = c.value, g.value = !0), C("blur", e);
283
+ se.value = !1, l.focusOpen && !l.isExterControlCount && (F(), u.value = c.value, g.value = !0), w("blur", e);
279
284
  }, gl = (e) => {
280
- e.onClose(), u.value = 100, T(() => {
285
+ e.onClose(), u.value = 100, k(() => {
281
286
  l.mode !== "combobox" && ne.value || l.focusOpen && (F(), u.value = c.value, g.value = !0);
282
287
  });
283
288
  };
@@ -287,49 +292,49 @@ const Pl = { key: 0 }, Rl = {
287
292
  if (e && l.mode !== "combobox") {
288
293
  se.value = !1;
289
294
  let t = new Event("blur");
290
- Fe(t);
295
+ _e(t);
291
296
  }
292
297
  }
293
298
  );
294
- let q = n(!1);
299
+ let Z = n(!1);
295
300
  const yl = (e) => {
296
- q.value = e, L.value = !0, T(() => {
297
- L.value = !1, l.focusOpen && (F(), u.value = e ? V : c.value, g.value = !e);
301
+ Z.value = e, L.value = !0, k(() => {
302
+ L.value = !1, l.focusOpen && (F(), u.value = e ? $ : c.value, g.value = !e);
298
303
  });
299
304
  };
300
305
  let J = null;
301
306
  me(() => {
302
307
  J = new IntersectionObserver((e) => {
303
- e && e[0] && e[0].intersectionRatio > 0 && l.focusOpen && u.value === 0 && (u.value = 100, T(() => {
308
+ e && e[0] && e[0].intersectionRatio > 0 && l.focusOpen && u.value === 0 && (u.value = 100, k(() => {
304
309
  F(), u.value = c.value, g.value = !0;
305
310
  }));
306
311
  }), J.observe(D.value);
307
- }), De(() => {
312
+ }), Ae(() => {
308
313
  J && J.disconnect();
309
314
  });
310
315
  const F = () => {
311
- var Z;
312
- let e = (Z = w.value) == null ? void 0 : Z.$el;
316
+ var N;
317
+ let e = (N = y.value) == null ? void 0 : N.$el;
313
318
  if (!e) return;
314
319
  let t = e == null ? void 0 : e.querySelector(".ant-select-selection-overflow");
315
320
  if (!t) return;
316
- let a = t.offsetWidth - 5;
317
- l.borderType === "underline" && (a -= 10);
321
+ let o = t.offsetWidth - 5;
322
+ l.borderType === "underline" && (o -= 10);
318
323
  const v = Math.ceil(Se.value.querySelector(".ant-tag").offsetWidth) + 4;
319
- let p = e.querySelectorAll(".ant-select-selection-overflow-item");
320
- if (p.length < 1) return;
321
- u.value = V;
322
- let N = 0;
323
- for (let f = 0; f < p.length - 1 && !p[f].classList.contains("ant-select-selection-overflow-item-rest"); f++)
324
- if (N += Math.ceil(p[f].offsetWidth), N <= a - v)
325
- f >= s.value.length - 1 && N < a ? c.value = s.value.length : c.value = f + 1;
324
+ let f = e.querySelectorAll(".ant-select-selection-overflow-item");
325
+ if (f.length < 1) return;
326
+ u.value = $;
327
+ let T = 0;
328
+ for (let p = 0; p < f.length - 1 && !f[p].classList.contains("ant-select-selection-overflow-item-rest"); p++)
329
+ if (T += Math.ceil(f[p].offsetWidth), T <= o - v)
330
+ p >= s.value.length - 1 && T < o ? c.value = s.value.length : c.value = p + 1;
326
331
  else {
327
- f >= s.value.length - 1 && N < a ? c.value = s.value.length : c.value = f;
332
+ p >= s.value.length - 1 && T < o ? c.value = s.value.length : c.value = p;
328
333
  break;
329
334
  }
330
335
  if (c.value === 0) {
331
- let f = p[0], Q = f.querySelector(".anticon-close") ? 86 : 69;
332
- f && !f.classList.contains("ant-select-selection-overflow-item-rest") && Q <= a - v && !Me.tagRender && (c.value = 1, f.classList.add("ellipsis"));
336
+ let p = f[0], Q = p.querySelector(".anticon-close") ? 86 : 69;
337
+ p && !p.classList.contains("ant-select-selection-overflow-item-rest") && Q <= o - v && !Me.tagRender && (c.value = 1, p.classList.add("ellipsis"));
333
338
  }
334
339
  }, ve = n(!1);
335
340
  Y(
@@ -339,19 +344,19 @@ const Pl = { key: 0 }, Rl = {
339
344
  ve.value = !1;
340
345
  return;
341
346
  }
342
- l.mode !== "combobox" && ne.value || (L.value = !0, u.value = V, await T(), await F(), L.value = !1, l.isExterControlCount && l.focusOpen ? (u.value = q.value ? V : c.value, g.value = !q.value) : (u.value = c.value, g.value = !0));
347
+ l.mode !== "combobox" && ne.value || (L.value = !0, u.value = $, await k(), await F(), L.value = !1, l.isExterControlCount && l.focusOpen ? (u.value = Z.value ? $ : c.value, g.value = !Z.value) : (u.value = c.value, g.value = !0));
343
348
  }
344
349
  );
345
350
  const fe = async (e, t) => {
346
351
  ve.value = !0, G.value = !1, l.mode === "combobox" && ae();
347
- const a = e;
348
- l.noDropdown && l.maxTagsLength < a.length && a.pop(), L.value = !0, C("update:model-value", a), C("change", a, t), u.value = V, await T(), await F(), L.value = !1, l.isExterControlCount && l.focusOpen && (u.value = q.value ? V : c.value, g.value = !q.value), l.focusOpen || (u.value = c.value);
352
+ const o = e;
353
+ l.noDropdown && l.maxTagsLength < o.length && o.pop(), L.value = !0, w("update:model-value", o), w("change", o, t), u.value = $, await k(), await F(), L.value = !1, l.isExterControlCount && l.focusOpen && (u.value = Z.value ? $ : c.value, g.value = !Z.value), l.focusOpen || (u.value = c.value);
349
354
  };
350
- return $({
351
- $select: w,
355
+ return B({
356
+ $select: y,
352
357
  toChangeMaxCount: yl
353
358
  }), (e, t) => {
354
- const a = wl("v-nodes");
359
+ const o = wl("v-nodes");
355
360
  return d(), b("div", {
356
361
  class: Tl(["das-ui-select", [
357
362
  l.borderType,
@@ -361,9 +366,9 @@ const Pl = { key: 0 }, Rl = {
361
366
  ]]),
362
367
  ref_key: "$selectBox",
363
368
  ref: D,
364
- style: k(sl.value)
369
+ style: S(sl.value)
365
370
  }, [
366
- y(r(Ll), {
371
+ x(r($l), {
367
372
  ref_key: "inputTooltipRef",
368
373
  ref: we,
369
374
  placement: "top",
@@ -374,9 +379,9 @@ const Pl = { key: 0 }, Rl = {
374
379
  }, null, 8, ["virtual-ref", "disabled", "content"]),
375
380
  be((d(), K(r(Ml), Re({ mode: e.mode }, e.$attrs, {
376
381
  value: r(s),
377
- "onUpdate:value": t[4] || (t[4] = (o) => kl(s) ? s.value = o : null),
382
+ "onUpdate:value": t[4] || (t[4] = (a) => kl(s) ? s.value = a : null),
378
383
  ref_key: "$select",
379
- ref: w,
384
+ ref: y,
380
385
  options: Ve.value,
381
386
  fieldNames: e.fieldNames,
382
387
  bordered: l.borderType === "bordered",
@@ -399,29 +404,29 @@ const Pl = { key: 0 }, Rl = {
399
404
  t[5] || (t[5] = ee(() => {
400
405
  }, ["stop"]))
401
406
  ],
402
- onBlur: Fe
407
+ onBlur: _e
403
408
  }), Sl({
404
- option: m((o) => [
405
- x(e.$slots, "option", le(te(o)), () => {
409
+ option: m((a) => [
410
+ C(e.$slots, "option", le(te(a)), () => {
406
411
  var v;
407
412
  return [
408
- o.children && typeof o.children == "function" ? (d(), K(a, {
413
+ a.children && typeof a.children == "function" ? (d(), K(o, {
409
414
  key: 0,
410
- vnodes: o.children()
415
+ vnodes: a.children()
411
416
  }, null, 8, ["vnodes"])) : (d(), b(ge, { key: 1 }, [
412
417
  e.mode === "combobox" ? be((d(), b("div", Pl, [
413
- ye(I(o[j.value]), 1)
418
+ ye(z(a[j.value]), 1)
414
419
  ])), [
415
420
  [r(Ee)]
416
421
  ]) : (d(), b("div", Rl, [
417
- (d(), K(r(Ae), {
422
+ (d(), K(r(De), {
418
423
  class: "das-select-checkbox",
419
- modelValue: (v = r(s)) == null ? void 0 : v.includes(o[_.value]),
420
- key: o[_.value],
421
- disabled: o.disabled
424
+ modelValue: (v = r(s)) == null ? void 0 : v.includes(a[_.value]),
425
+ key: a[_.value],
426
+ disabled: a.disabled
422
427
  }, null, 8, ["modelValue", "disabled"])),
423
428
  be((d(), b("div", ql, [
424
- ye(I(o[j.value]), 1)
429
+ ye(z(a[j.value]), 1)
425
430
  ])), [
426
431
  [r(Ee)]
427
432
  ])
@@ -430,44 +435,44 @@ const Pl = { key: 0 }, Rl = {
430
435
  ];
431
436
  }, !0)
432
437
  ]),
433
- tagRender: m((o) => [
434
- x(e.$slots, "tagRender", le(te(o)), () => [
435
- y(r(Ce), {
436
- closable: o.closable,
438
+ tagRender: m((a) => [
439
+ C(e.$slots, "tagRender", le(te(a)), () => [
440
+ x(r(Ce), {
441
+ closable: a.closable,
437
442
  style: { "margin-right": "3px", "background-color": "transparent" },
438
- onClose: (v) => gl(o)
443
+ onClose: (v) => gl(a)
439
444
  }, {
440
445
  default: m(() => [
441
446
  h("span", {
442
447
  class: "tag-span",
443
- style: k(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
444
- }, I(vl(o.label)), 5)
448
+ style: S(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
449
+ }, z(vl(a.label)), 5)
445
450
  ]),
446
451
  _: 2
447
452
  }, 1032, ["closable", "onClose"])
448
453
  ], !0)
449
454
  ]),
450
- dropdownRender: m(({ menuNode: o }) => [
451
- x(e.$slots, "dropdownRender", le(te({ menuNode: o })), () => {
455
+ dropdownRender: m(({ menuNode: a }) => [
456
+ C(e.$slots, "dropdownRender", le(te({ menuNode: a })), () => {
452
457
  var v;
453
458
  return [
454
459
  Ie.value === "combobox" ? (d(), b("div", Zl, [
455
- y(a, { vnodes: o }, null, 8, ["vnodes"])
460
+ x(o, { vnodes: a }, null, 8, ["vnodes"])
456
461
  ])) : Ie.value === "custom" ? (d(), b("div", {
457
462
  key: 1,
458
463
  onClick: t[2] || (t[2] = ee(() => {
459
464
  }, ["stop"]))
460
465
  }, [
461
- y(a, { vnodes: o }, null, 8, ["vnodes"]),
466
+ x(o, { vnodes: a }, null, 8, ["vnodes"]),
462
467
  h("div", {
463
468
  class: "customDropdown",
464
- onMousedown: t[1] || (t[1] = (p) => p.preventDefault())
469
+ onMousedown: t[1] || (t[1] = (f) => f.preventDefault())
465
470
  }, [
466
- y(r(_l), {
471
+ x(r(Ll), {
467
472
  ref_key: "testInput",
468
473
  ref: Xe,
469
- modelValue: H.value,
470
- "onUpdate:modelValue": t[0] || (t[0] = (p) => H.value = p),
474
+ modelValue: O.value,
475
+ "onUpdate:modelValue": t[0] || (t[0] = (f) => O.value = f),
471
476
  onKeyup: Il(ze, ["enter"]),
472
477
  onFocus: ee(Ge, ["stop"]),
473
478
  onBlur: ee(Je, ["stop"]),
@@ -477,31 +482,31 @@ const Pl = { key: 0 }, Rl = {
477
482
  h("div", {
478
483
  class: "addBtn",
479
484
  onClick: ze
480
- }, I(r(P)("添加")), 1)
485
+ }, z(r(R)("添加")), 1)
481
486
  ], 32)
482
487
  ])) : (d(), b("div", Kl, [
483
- y(a, { vnodes: o }, null, 8, ["vnodes"]),
488
+ x(o, { vnodes: a }, null, 8, ["vnodes"]),
484
489
  (v = l.options) != null && v.length ? (d(), b("div", {
485
490
  key: 0,
486
491
  class: "das-ui-select-dropdown-checkall",
487
- onMousedown: t[3] || (t[3] = (p) => p.preventDefault())
492
+ onMousedown: t[3] || (t[3] = (f) => f.preventDefault())
488
493
  }, [
489
494
  h("div", Ul, [
490
- y(r(Ae), {
495
+ x(r(De), {
491
496
  modelValue: tl.value,
492
497
  indeterminate: ol.value,
493
498
  onChange: pl,
494
499
  style: { display: "flex" }
495
500
  }, {
496
501
  default: m(() => [
497
- ye(I(r(P)("全选")), 1)
502
+ ye(z(r(R)("全选")), 1)
498
503
  ]),
499
504
  _: 1
500
505
  }, 8, ["modelValue", "indeterminate"])
501
506
  ]),
502
507
  h("span", {
503
508
  class: "das-ui-dropdown-has-checked",
504
- innerHTML: r(P)("das-ui-select-selectedItemsCountWithPlaceholder", oe.value)
509
+ innerHTML: r(R)("das-ui-select-selectedItemsCountWithPlaceholder", oe.value)
505
510
  }, null, 8, jl)
506
511
  ], 32)) : xe("", !0)
507
512
  ]))
@@ -509,18 +514,18 @@ const Pl = { key: 0 }, Rl = {
509
514
  }, !0)
510
515
  ]),
511
516
  clearIcon: m(() => [
512
- x(e.$slots, "clearIcon", {}, () => [
513
- y(r(Nl), { size: "medium" })
517
+ C(e.$slots, "clearIcon", {}, () => [
518
+ x(r(Fl), { size: "medium" })
514
519
  ], !0)
515
520
  ]),
516
- maxTagPlaceholder: m((o) => [
517
- x(e.$slots, "maxTagPlaceholder", le(te(o)), () => [
518
- y(r(Ce), {
519
- style: k(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
521
+ maxTagPlaceholder: m((a) => [
522
+ C(e.$slots, "maxTagPlaceholder", le(te(a)), () => [
523
+ x(r(Ce), {
524
+ style: S(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
520
525
  }, {
521
526
  default: m(() => [
522
527
  h("span", {
523
- innerHTML: r(P)("das-ui-select-selectedItemsCountWithPlaceholder", oe.value)
528
+ innerHTML: r(R)("das-ui-select-selectedItemsCountWithPlaceholder", oe.value)
524
529
  }, null, 8, Xl)
525
530
  ]),
526
531
  _: 1
@@ -528,55 +533,55 @@ const Pl = { key: 0 }, Rl = {
528
533
  ], !0)
529
534
  ]),
530
535
  suffixIcon: m(() => [
531
- x(e.$slots, "suffixIcon", {}, () => [
532
- y(r(Fl), {
536
+ C(e.$slots, "suffixIcon", {}, () => [
537
+ x(r(_l), {
533
538
  class: "das-suffix-icon",
534
539
  size: "medium"
535
540
  })
536
541
  ], !0)
537
542
  ]),
538
543
  default: m(() => [
539
- x(e.$slots, "default", {}, void 0, !0)
544
+ C(e.$slots, "default", {}, void 0, !0)
540
545
  ]),
541
546
  _: 2
542
547
  }, [
543
548
  e.$slots.menuItemSelectedIcon ? {
544
549
  name: "menuItemSelectedIcon",
545
550
  fn: m(() => [
546
- x(e.$slots, "menuItemSelectedIcon", {}, void 0, !0)
551
+ C(e.$slots, "menuItemSelectedIcon", {}, void 0, !0)
547
552
  ]),
548
553
  key: "0"
549
554
  } : void 0,
550
555
  e.$slots.notFoundContent ? {
551
556
  name: "notFoundContent",
552
557
  fn: m(() => [
553
- x(e.$slots, "notFoundContent", {}, void 0, !0)
558
+ C(e.$slots, "notFoundContent", {}, void 0, !0)
554
559
  ]),
555
560
  key: "1"
556
561
  } : void 0,
557
562
  e.$slots.placeholder ? {
558
563
  name: "placeholder",
559
564
  fn: m(() => [
560
- x(e.$slots, "placeholder", {}, void 0, !0)
565
+ C(e.$slots, "placeholder", {}, void 0, !0)
561
566
  ]),
562
567
  key: "2"
563
568
  } : void 0,
564
569
  e.$slots.removeIcon ? {
565
570
  name: "removeIcon",
566
571
  fn: m(() => [
567
- x(e.$slots, "removeIcon", {}, void 0, !0)
572
+ C(e.$slots, "removeIcon", {}, void 0, !0)
568
573
  ]),
569
574
  key: "3"
570
575
  } : void 0
571
576
  ]), 1040, ["mode", "value", "options", "fieldNames", "bordered", "disabled", "open", "placeholder", "optionFilterProp", "size", "style", "dropdownClassName", "maxTagCount", "dropdownStyle"])), [
572
577
  [r(Vl), { target: ml, x: !1 }],
573
- [r($l), dl]
578
+ [r(Nl), dl]
574
579
  ]),
575
580
  e.error && e.errorLabel ? (d(), b(ge, { key: 0 }, [
576
581
  e.errorMode === "default" ? (d(), b("div", Gl, [
577
582
  h("span", {
578
- style: k(X.value)
579
- }, I(e.errorLabel), 5)
583
+ style: S(X.value)
584
+ }, z(e.errorLabel), 5)
580
585
  ])) : e.errorMode === "overlay" && ie.value ? (d(), b(ge, { key: 1 }, [
581
586
  e.teleported ? (d(), K(zl, {
582
587
  key: 0,
@@ -585,20 +590,20 @@ const Pl = { key: 0 }, Rl = {
585
590
  h("div", {
586
591
  ref_key: "$errorModel",
587
592
  ref: Ze,
588
- style: k(nl.value)
593
+ style: S(nl.value)
589
594
  }, [
590
595
  h("span", {
591
- style: k(X.value)
592
- }, I(e.errorLabel), 5)
596
+ style: S(X.value)
597
+ }, z(e.errorLabel), 5)
593
598
  ], 4)
594
599
  ])) : (d(), b("div", {
595
600
  key: 1,
596
- style: k(ce.value),
601
+ style: S(ce.value),
597
602
  class: "das-select-error-label label"
598
603
  }, [
599
604
  h("span", {
600
- style: k(X.value)
601
- }, I(e.errorLabel), 5)
605
+ style: S(X.value)
606
+ }, z(e.errorLabel), 5)
602
607
  ], 4))
603
608
  ], 64)) : xe("", !0)
604
609
  ], 64)) : xe("", !0),
@@ -611,12 +616,12 @@ const Pl = { key: 0 }, Rl = {
611
616
  h("div", Jl, [
612
617
  h("div", Ql, [
613
618
  h("span", Yl, [
614
- y(r(Ce), {
615
- style: k(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
619
+ x(r(Ce), {
620
+ style: S(l.size == "mini" || l.size == "table" ? { fontSize: "12px" } : {})
616
621
  }, {
617
622
  default: m(() => [
618
623
  h("span", {
619
- innerHTML: r(P)("das-ui-select-selectedItemsCountWithPlaceholder", oe.value)
624
+ innerHTML: r(R)("das-ui-select-selectedItemsCountWithPlaceholder", oe.value)
620
625
  }, null, 8, et)
621
626
  ]),
622
627
  _: 1
@@ -628,15 +633,15 @@ const Pl = { key: 0 }, Rl = {
628
633
  ], 6);
629
634
  };
630
635
  }
631
- }), qe = (z, $) => {
632
- const B = z.__vccOpts || z;
633
- for (const [l, C] of $)
634
- B[l] = C;
635
- return B;
636
- }, ot = /* @__PURE__ */ qe(tt, [["__scopeId", "data-v-033d5fd0"]]), at = {};
637
- function st(z, $) {
638
- const B = Ol;
639
- return d(), K(B, Re({ class: "das-ui-select-option" }, z.$attrs), null, 16);
636
+ }), qe = (M, B) => {
637
+ const A = M.__vccOpts || M;
638
+ for (const [l, w] of B)
639
+ A[l] = w;
640
+ return A;
641
+ }, ot = /* @__PURE__ */ qe(tt, [["__scopeId", "data-v-ef45506c"]]), at = {};
642
+ function st(M, B) {
643
+ const A = Ol;
644
+ return d(), K(A, Re({ class: "das-ui-select-option" }, M.$attrs), null, 16);
640
645
  }
641
646
  const nt = /* @__PURE__ */ qe(at, [["render", st]]), rt = {
642
647
  "--das-ui-select-color-bg": "#FFFFFF",
@@ -695,11 +700,11 @@ const nt = /* @__PURE__ */ qe(at, [["render", st]]), rt = {
695
700
  _appCode: "framework"
696
701
  }
697
702
  };
698
- Al(ut);
703
+ Dl(ut);
699
704
  Bl(rt);
700
- const Vt = Oe(ot), Lt = Oe(nt), _t = { name: "select 选择器" };
705
+ const Vt = Oe(ot), $t = Oe(nt), Lt = { name: "select 选择器" };
701
706
  export {
702
707
  Vt as DasSelect,
703
- Lt as DasSelectOption,
704
- _t as default
708
+ $t as DasSelectOption,
709
+ Lt as default
705
710
  };