@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.
@@ -1,34 +1,34 @@
1
- import { withInstall as tl } from "@das-fed/upf-utils/with-install/index";
2
- import { defineComponent as ol, useCssVars as lt, useAttrs as tt, computed as s, ref as i, watch as U, useSlots as ot, onMounted as Ae, onUnmounted as Qe, watchEffect as Ye, nextTick as w, resolveComponent as nt, openBlock as v, createElementBlock as b, normalizeClass as at, normalizeStyle as j, withModifiers as se, createBlock as K, unref as d, createCommentVNode as L, withDirectives as Te, mergeProps as Le, createSlots as rt, withCtx as m, renderSlot as x, normalizeProps as ue, guardReactiveProps as ie, Fragment as ke, createTextVNode as Ie, toDisplayString as Z, createElementVNode as S, createVNode as I, withKeys as st } from "vue";
3
- import { Select as ut, Tag as Ve } from "ant-design-vue";
4
- import { DasCheckbox as el } from "@das-fed/upf-ui/packages/components/checkbox/index";
5
- import { vScrollbar as it } from "@das-fed/upf-ui/packages/components/scrollbar/index";
6
- import { DasTooltip as ct } from "@das-fed/upf-ui/packages/components/tooltip/index";
7
- import { vDasTooltip as ll } from "@das-fed/upf-ui/packages/components/text-tooltip/index";
8
- import { DasInput as dt } from "@das-fed/upf-ui/packages/components/input/index";
9
- import { DasIconXiala as ft } from "@das-fed/upf-ui/packages/icons/xiala/index";
10
- import { DasIconEmpty as vt } from "@das-fed/upf-ui/packages/icons/empty/index";
11
- import { DasErrorOverlayModel as pt } from "@das-fed/upf-ui/packages/components/error-overlay-model/index";
12
- import { vHoverInside as ht } from "@das-fed/upf-utils/directive";
13
- import { t as O, currentLang as mt, setI18nRule as gt } from "@das-fed/upf-web/packages/i18n/index";
14
- import { useZIndex as yt } from "@das-fed/upf-utils/hooks/popup-manager/use-zindex";
15
- import { useModelValue as bt } from "@das-fed/upf-utils/vue";
16
- import { calcTextWidth as St } from "@das-fed/upf-utils/common-tools";
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 Ct } from "ant-design-vue/es"
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 wt = { key: 0 }, xt = ["onClick"], At = { style: { display: "inline-block" } }, Tt = ["innerHTML"], kt = { key: 0 }, It = { key: 2 }, Vt = { style: { display: "inline-block" } }, Lt = ["innerHTML"], Mt = ["innerHTML"], Ot = {
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
- }, zt = { class: "ant-select ant-select-multiple ant-select-selection-overflow-item ant-select-selection-overflow-item-rest" }, Pt = { class: "ant-select-selection-item" }, _t = { class: "ant-select-selection-item-content" }, Et = ["innerHTML"], Nt = ol({
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: N }) => N.vnodes
28
+ VNodes: (p, { attrs: $ }) => $.vnodes
29
29
  }
30
- }), Dt = /* @__PURE__ */ ol({
31
- ...Nt,
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: N, emit: D }) {
76
- lt((e) => ({
77
- ed7cab80: Il.value,
78
- f5b6b826: Vl.value
75
+ setup(p, { expose: $, emit: B }) {
76
+ ct((e) => ({
77
+ v2d34f3ba: Nl.value,
78
+ v5f9a89b3: $l.value
79
79
  }));
80
- const t = p, A = D, X = tt(), al = s(() => {
80
+ const t = p, T = B, ee = dt(), fl = s(() => {
81
81
  const e = {};
82
- for (const l in X)
83
- l === "size" || l === "formSize" || l === "onClick" || l.startsWith("onClick") || l === "filterOption" || l === "onSearch" || l === "onPopupScroll" || (e[l] = X[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 = bt(t, "modelValue"), J = s(() => {
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
- }), rl = s(() => {
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
- }), B = i(null), Me = i(null), y = i(!1), Q = s(() => t.isView ? t.noSetDefaultVal ? "" : "-" : t.placeholder || O("请选择")), ce = s(() => B.value ? B.value.querySelector(".ant-select-selector") : null), $ = i(0), W = i(0), sl = s(() => ce.value ? t.isTooltip && z.value ? !1 : !t.isTooltip || E.value || !je.value || !ye.value : !0), ul = s(() => (Array.isArray(a.value) ? a.value.length : a.value) ? je.value : Q.value), Oe = () => {
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 St(Q.value, e);
94
- }, ze = () => {
95
- var k, G, h;
96
- const e = (k = B.value) == null ? void 0 : k.querySelector(".ant-select-selection-placeholder"), l = (h = (G = T.value) == null ? void 0 : G.$el) == null ? void 0 : h.querySelectorAll(".ant-select-selection-item");
97
- l && l.length && l.forEach((xe) => xe.removeAttribute("title"));
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
- U(() => [Q.value, a.value], () => {
104
- w(() => {
105
- W.value = ze(), $.value = Oe(), ((Array.isArray(a.value) ? a.value.length : a.value) || W.value === $.value || $.value - W.value < 1) && (z.value = !1);
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
- }), U(
131
+ }), J(
108
132
  () => {
109
133
  var e;
110
- return (e = Me.value) == null ? void 0 : e.$tooltipRef.popperRef.contentRef;
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, q.value && clearTimeout(q.value);
138
+ z.value = !0, G.value && clearTimeout(G.value);
115
139
  }), e.addEventListener("mouseleave", function() {
116
- q.value = setTimeout(() => {
140
+ G.value = setTimeout(() => {
117
141
  z.value = !1;
118
142
  }, 200);
119
143
  }));
120
144
  }
121
145
  );
122
- const Pe = i(null), _e = s(() => t.dropdownMode ?? t.mode ?? ""), F = i(null), il = i(null), R = i(""), cl = () => {
123
- F.value = !0;
124
- }, dl = () => {
125
- F.value = null;
126
- }, Ee = () => {
127
- R.value && (A("addCustomItem", R.value), w(() => {
128
- T.value.focus(), R.value = "";
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
- }, Ne = ot(), de = () => {
131
- t.dropdownMode === "custom" && !Ne.dropdownRender && (F.value = !1, w(() => {
132
- F.value = null;
154
+ }, qe = ft(), he = () => {
155
+ t.dropdownMode === "custom" && !qe.dropdownRender && (q.value = !1, x(() => {
156
+ q.value = null;
133
157
  }));
134
158
  };
135
- Ae(() => {
136
- document.addEventListener("click", de);
137
- }), Qe(() => {
138
- document.removeEventListener("click", de);
159
+ Pe(() => {
160
+ document.addEventListener("click", he);
161
+ }), al(() => {
162
+ document.removeEventListener("click", he);
139
163
  });
140
- const T = i(), H = i(""), Y = i(0), De = `__DAS_SELECT_COLLAPSED_${Math.random().toString(36).slice(2)}__`, V = s(() => {
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
- }), fe = i(/* @__PURE__ */ new Map()), fl = s(() => t.mode === "combobox" ? void 0 : t.mode), Be = {
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
- }, vl = {
177
+ }, wl = {
154
178
  large: "36px",
155
179
  middle: "32px",
156
180
  small: "24px"
157
- }, pl = (e) => e && e in Be ? e : "middle", hl = s(() => pl(t.size)), $e = s(() => Be[hl.value]), ml = s(() => t.height ?? vl[$e.value]), We = s(() => {
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
- }), Fe = (e, l) => {
184
+ }), Xe = (e, l) => {
161
185
  Array.isArray(e) && e.forEach((n) => {
162
- l(n), Array.isArray(n == null ? void 0 : n.children) && Fe(n.children, l);
186
+ l(n), Array.isArray(n == null ? void 0 : n.children) && Xe(n.children, l);
163
187
  });
164
- }, ee = (e, l) => {
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 = ee(n.children, l);
193
+ const o = ae(n.children, l);
170
194
  if (o) return o;
171
195
  }
172
196
  }
173
- }, gl = (e) => {
174
- Fe(e, (l) => {
175
- l && l[g.value] != null && l[V.value] != null && fe.value.set(l[g.value], l[V.value]);
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
- }, ve = (e) => {
201
+ }, ye = (e) => {
178
202
  if (e == null || e === "") return;
179
- const l = ee(t.options, e);
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 fe.value.get(e);
183
- }, yl = (e) => {
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 (ee(l, o)) return;
187
- const r = fe.value.get(o);
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
- }, bl = (e) => Array.isArray(e) ? e.some((l) => Array.isArray(l == null ? void 0 : l.children) && l.children.length > 0) : !1, le = s(() => !!t.optionPaging && Array.isArray(t.options) && !bl(t.options)), Re = (e, ...l) => {
197
- const n = X[e];
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
- }, He = (e, l) => {
200
- const n = e == null ? "" : String(e), o = X.filterOption;
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 = Xe.value, r = (l == null ? void 0 : l[u]) ?? (l == null ? void 0 : l[V.value]) ?? (l == null ? void 0 : l[g.value]);
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
- }, pe = s(() => {
234
+ }, be = s(() => {
211
235
  if (!Array.isArray(t.options)) return;
212
- const e = yl(t.options);
213
- return Array.isArray(t.options) && gl(t.options), e;
214
- }), qe = s(() => {
215
- const e = pe.value ?? [];
216
- return !le.value || !H.value ? e : e.filter((l) => He(H.value, l));
217
- }), P = (e) => {
218
- t.optionPagingDebug && w(() => {
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
- }, te = s(() => t.mode !== "combobox" && Array.isArray(a.value) ? a.value : a.value !== null && a.value !== void 0 && a.value !== "" ? [a.value] : []), Ze = s(() => new Set(te.value)), Sl = s(() => {
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
- }), C = s(() => t.mode !== "combobox" && te.value.length > Sl.value), Cl = s(() => C.value ? [De] : a.value), Ke = s(() => Array.isArray(t.options) ? t.options.filter((e) => !(e != null && e.disabled)) : []), oe = s(() => Ke.value.map((e) => e == null ? void 0 : e[g.value])), he = s(() => oe.value.reduce((e, l) => Ze.value.has(l) ? e + 1 : e, 0)), wl = (e, l) => {
224
- if (H.value || C.value || !te.value.length) return e;
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 te.value.forEach((u) => {
250
+ return se.value.forEach((u) => {
227
251
  if (n.has(u)) return;
228
- const r = ee(l, u);
252
+ const r = ae(l, u);
229
253
  r && (o.push(r), n.add(u));
230
254
  }), o.length ? o.concat(e) : e;
231
- }, xl = s(() => {
232
- if (!le.value) return pe.value;
233
- const e = qe.value.slice(0, Y.value);
234
- return wl(e, pe.value ?? []);
235
- }), Ge = () => {
236
- Y.value = We.value, P();
237
- }, Al = () => {
238
- le.value && (Y.value = Math.min(
239
- Y.value + We.value,
240
- qe.value.length
241
- ), P());
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
- U(
267
+ J(
244
268
  () => [
245
269
  t.options,
246
270
  t.optionPaging,
247
271
  t.optionPageSize,
248
- H.value,
272
+ K.value,
249
273
  V.value,
250
274
  g.value
251
275
  ],
252
- Ge,
276
+ ll,
253
277
  { immediate: !0 }
254
278
  );
255
- const me = i(!1), ge = s(() => {
256
- if (F.value !== null) return F.value;
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), Tl = s(() => C.value ? 0 : c.value), E = i(!1), ye = i(!0), be = i(!1);
259
- Ye(() => {
260
- a.value && t.mode == "combobox" && (ye.value = !0, setTimeout(() => {
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 = T.value) == null ? void 0 : l.$el.querySelectorAll(".ant-select-selection-item");
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 && (ye.value = !1), o.title = "";
290
+ o.scrollWidth <= o.offsetWidth && (xe.value = !1), o.title = "";
267
291
  }
268
292
  }, 300));
269
293
  });
270
- const kl = () => {
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
- Ye(() => {
276
- be.value === !0 && t.mode != "combobox" && a.value && a.value.length > 0 && t.options.length > 0 && (be.value = !1, kl());
277
- }), Ae(() => {
278
- be.value = !0, t.focusOpen || (f.value = 1, c.value = f.value, y.value = !0);
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 Il = s(() => t.width ? t.width : "230px"), Vl = s(() => t.height ? t.height : "auto"), Ue = i(3e3), Ll = s(() => ({
281
- "z-index": Ue.value
282
- })), je = s(() => {
283
- if (C.value)
284
- return rl.value;
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 = ve(l);
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 = ve(a.value);
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 mt.value === "zh-CN" ? e.join("、") : e.join(", ");
296
- }), Ml = s(() => t.mode === "combobox" ? !1 : oe.value.length > 0 && he.value === oe.value.length), Ol = s(() => t.mode === "combobox" ? !1 : he.value > 0 && he.value < oe.value.length), Xe = s(() => {
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
- }), zl = s(() => ({
323
+ }), Fl = s(() => ({
300
324
  width: typeof t.width == "number" ? t.width + "px" : t.width,
301
- "--das-select-resolved-height": ml.value
302
- })), Se = i(!1), Pl = i({
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
- }), q = i(), _l = () => {
330
+ }), G = i(), Hl = () => {
307
331
  var n;
308
- W.value = ze(), $.value = Oe();
309
- let e = (n = T.value) == null ? void 0 : n.$el.querySelectorAll(".ant-select-selection-item");
310
- !!(Array.isArray(a.value) ? a.value.length : e != null && e.length) || W.value === $.value || $.value - W.value < 1 ? z.value = !1 : (z.value = !0, q.value && clearTimeout(q.value)), Se.value = !0;
311
- }, El = () => {
312
- q.value = setTimeout(() => {
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), Se.value = !1;
315
- }, Nl = (e, l) => {
316
- e ? _l() : El();
317
- }, Dl = (e) => {
318
- e ? (Ue.value = yt().nextZIndex(), R.value = "", Ge(), P()) : (H.value = "", P()), ne.value = e, t.mode == "combobox" && (e || setTimeout(() => {
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 = T.value) == null ? void 0 : l.blur) == null || n.call(l);
321
- })), A("dropdownVisibleChange", e);
322
- }, Bl = (e) => {
323
- H.value = e ?? "", P(), Re("onSearch", e);
324
- }, $l = s(() => t.mode === "combobox" ? t.showSearch === !0 : t.mode === "tags" ? !0 : typeof t.showSearch == "boolean" ? t.showSearch : t.mode === "multiple"), Wl = s(() => $l.value ? { onSearch: Bl } : {}), Fl = s(() => ({ ...al.value, ...Wl.value })), Rl = (e) => {
325
- if (Re("onPopupScroll", e), !le.value) return;
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 && Al();
329
- }, Hl = (e) => {
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
- }, ql = (e) => t.isRenderNode ? B.value : t.getPopupContainer === void 0 ? document.body : t.getPopupContainer(e), Zl = (e) => {
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
- Ke.value.forEach((u) => {
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, re(n, o, "inner");
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, re(u, [], "inner");
367
+ a.value = u, de(u, [], "inner");
344
368
  }
345
- }, Kl = (e) => {
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
- }, Gl = (e) => {
349
- C.value && (e.preventDefault(), e.stopPropagation());
350
- }, Ul = (e, l) => {
351
- if (!C.value || e != null && e.disabled) return;
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 = Kl(n);
356
- a.value = o, re(o, e, "inner");
357
- }, jl = (e) => {
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
- }, Xl = (e) => {
384
+ }, at = (e) => {
361
385
  if (t.mode == "combobox") {
362
- A("focus", e);
386
+ T("focus", e);
363
387
  return;
364
388
  }
365
- me.value = !0, t.focusOpen && !t.isExterControlCount && (c.value = _, t.mode === "multiple" ? w(() => {
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), A("focus", e);
368
- }, ne = i(!1), Jl = () => {
369
- ne.value || setTimeout(() => {
391
+ }) : y.value = !1), T("focus", e);
392
+ }, ie = i(!1), rt = () => {
393
+ ie.value || setTimeout(() => {
370
394
  var e, l;
371
- (l = (e = T.value) == null ? void 0 : e.blur) == null || l.call(e);
395
+ (l = (e = C.value) == null ? void 0 : e.blur) == null || l.call(e);
372
396
  }), t.mode != "combobox";
373
- }, Je = (e) => {
374
- if (w(() => {
375
- ne.value = !1;
397
+ }, nl = (e) => {
398
+ if (x(() => {
399
+ ie.value = !1;
376
400
  }), t.mode == "combobox") {
377
- A("blur", e);
401
+ T("blur", e);
378
402
  return;
379
403
  }
380
- me.value = !1, t.focusOpen && !t.isExterControlCount && (M(), c.value = f.value, y.value = !0), A("blur", e);
381
- }, Ql = (e) => {
382
- e.onClose(), c.value = 100, w(() => {
383
- t.mode !== "combobox" && ge.value || t.focusOpen && (M(), c.value = f.value, y.value = !0);
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
- U(
410
+ J(
387
411
  () => t.disabled || t.isView,
388
412
  (e) => {
389
413
  if (e && t.mode !== "combobox") {
390
- me.value = !1;
414
+ Ce.value = !1;
391
415
  let l = new Event("blur");
392
- Je(l);
416
+ nl(l);
393
417
  }
394
418
  }
395
419
  );
396
- let Ce = i(!1);
397
- const Yl = (e) => {
398
- Ce.value = e, E.value = !0, w(() => {
399
- if (E.value = !1, t.focusOpen) {
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 ae = null;
407
- Ae(() => {
408
- ae = new IntersectionObserver((e) => {
409
- e && e[0] && e[0].intersectionRatio > 0 && t.focusOpen && c.value === 0 && (c.value = 100, w(() => {
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
- }), ae.observe(B.value);
413
- }), Qe(() => {
414
- ae && ae.disconnect();
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 G;
418
- if (C.value) {
442
+ var Y;
443
+ if (w.value) {
419
444
  f.value = 0;
420
445
  return;
421
446
  }
422
- let e = (G = T.value) == null ? void 0 : G.$el;
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(Pe.value.querySelector(".ant-tag").offsetWidth) + 4;
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 h = 0; h < r.length - 1 && (r[h].classList.remove("ellipsis"), !r[h].classList.contains("ant-select-selection-overflow-item-rest")); h++)
434
- if (k += Math.ceil(r[h].offsetWidth), k <= n - u)
435
- h >= a.value.length - 1 && k < n ? f.value = a.value.length : f.value = h + 1;
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
- h >= a.value.length - 1 && k < n ? f.value = a.value.length : f.value = h;
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 h = r[0], xe = h.querySelector(".anticon-close") ? 86 : 69;
442
- h && !h.classList.contains("ant-select-selection-overflow-item-rest") && xe <= n - u && !Ne.tagRender && (f.value = 1, h.classList.add("ellipsis"));
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
- }, we = i(!1);
445
- U(
469
+ }, Le = i(!1);
470
+ J(
446
471
  () => a.value,
447
472
  async () => {
448
- if (we.value) {
449
- we.value = !1;
473
+ if (Le.value) {
474
+ Le.value = !1;
450
475
  return;
451
476
  }
452
- if (!(t.mode !== "combobox" && ge.value))
453
- if (E.value = !0, c.value = _, await w(), await M(), E.value = !1, t.isExterControlCount && t.focusOpen) {
454
- const e = Ce.value && t.mode !== "multiple";
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 et = (e) => {
461
- if (!C.value || t.mode === "combobox") return e;
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 !== De)));
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
- }, re = async (e, l, n = "antdv") => {
472
- ne.value = !1, t.mode === "combobox" && de();
473
- let o = n === "antdv" ? et(e) : e;
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
- P();
500
+ E();
476
501
  return;
477
502
  }
478
- if (we.value = !0, t.noDropdown && Array.isArray(o) && t.maxTagsLength < o.length && (o = o.slice(), o.pop()), n === "antdv" && C.value && (a.value = o), E.value = !0, A("update:model-value", o), A("change", o, l), P(), c.value = _, await w(), await M(), E.value = !1, t.isExterControlCount && t.focusOpen) {
479
- const u = Ce.value && t.mode !== "multiple";
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 N({
485
- $select: T,
486
- toChangeMaxCount: Yl
509
+ return $({
510
+ $select: C,
511
+ toChangeMaxCount: ut
487
512
  }), (e, l) => {
488
- const n = nt("v-nodes");
513
+ const n = vt("v-nodes");
489
514
  return v(), b(
490
515
  "div",
491
516
  {
492
- class: at(["das-ui-select", [
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: B,
500
- style: j(zl.value),
501
- onClick: se(Jl, ["stop"])
524
+ ref: D,
525
+ style: Q(Fl.value),
526
+ onClick: fe(rt, ["stop"])
502
527
  },
503
528
  [
504
- ce.value ? (v(), K(d(ct), {
529
+ me.value ? (v(), X(d(bt), {
505
530
  key: 0,
506
531
  ref_key: "inputTooltipRef",
507
- ref: Me,
532
+ ref: Ne,
508
533
  placement: "top",
509
534
  "virtual-triggering": "",
510
- "virtual-ref": ce.value,
511
- disabled: sl.value,
512
- content: ul.value
513
- }, null, 8, ["virtual-ref", "disabled", "content"])) : L("v-if", !0),
514
- Te((v(), K(d(ut), Le({ mode: fl.value }, Fl.value, {
515
- value: Cl.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: T,
518
- options: xl.value,
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 : ge.value,
524
- placeholder: Q.value,
548
+ open: t.noDropdown ? !1 : we.value,
549
+ placeholder: oe.value,
525
550
  showSearch: t.showSearch,
526
- optionFilterProp: Xe.value,
527
- filterOption: He,
528
- size: $e.value,
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: Tl.value,
532
- getPopupContainer: ql,
533
- dropdownStyle: Ll.value,
534
- onDropdownVisibleChange: Dl,
535
- onChange: l[4] || (l[4] = (o, u) => re(o, u, "antdv")),
536
- onFocus: Xl,
537
- onBlur: Je,
538
- onPopupScroll: Rl
539
- }), rt({
540
- option: m((o) => [
541
- x(e.$slots, "option", ue(ie(o)), () => [
542
- o.children && typeof o.children == "function" ? (v(), K(n, {
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
- ke,
571
+ Oe,
547
572
  { key: 1 },
548
573
  [
549
- L(' :option="{value, label, [disabled, key, title]}" '),
550
- p.mode === "combobox" ? Te((v(), b("div", wt, [
551
- Ie(
552
- Z(o[V.value]),
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(ll)]
582
+ [d(ul)]
558
583
  ]) : (v(), b(
559
- ke,
584
+ Oe,
560
585
  { key: 1 },
561
586
  [
562
- L(` <das-tooltip v-if="mode === 'combobox'" placement="right-start" :text="option[labelKeyName]"></das-tooltip> `),
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: Gl,
566
- onClick: (u) => Ul(o, u)
590
+ onMousedown: tt,
591
+ onClick: (u) => ot(o, u)
567
592
  }, [
568
- (v(), K(d(el), {
593
+ (v(), X(d(sl), {
569
594
  class: "das-select-checkbox",
570
- modelValue: Ze.value.has(o[g.value]),
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
- Te((v(), b("div", At, [
575
- Ie(
576
- Z(o[V.value]),
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(ll)]
606
+ [d(ul)]
582
607
  ])
583
- ], 40, xt)
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: m((o) => [
595
- x(e.$slots, "tagRender", ue(ie(o)), () => [
596
- I(d(Ve), {
597
- closable: !C.value && o.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) => Ql(o)
624
+ onClose: (u) => st(o)
600
625
  }, {
601
- default: m(() => [
602
- C.value ? (v(), b("span", {
626
+ default: h(() => [
627
+ w.value ? (v(), b("span", {
603
628
  key: 0,
604
- innerHTML: d(O)("das-ui-select-selectedItemsCountWithPlaceholder", J.value)
605
- }, null, 8, Tt)) : (v(), b(
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: j(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
635
+ style: Q(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
611
636
  },
612
- Z(Hl(ve(o.value) ?? o.label ?? String(o.value))),
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: m(({ menuNode: o }) => [
623
- x(e.$slots, "dropdownRender", ue(ie({ menuNode: o })), () => {
647
+ dropdownRender: h(({ menuNode: o }) => [
648
+ A(e.$slots, "dropdownRender", ve(pe({ menuNode: o })), () => {
624
649
  var u;
625
650
  return [
626
- _e.value === "combobox" ? (v(), b("div", kt, [
651
+ Re.value === "combobox" ? (v(), b("div", _t, [
627
652
  I(n, { vnodes: o }, null, 8, ["vnodes"])
628
- ])) : _e.value === "custom" ? (v(), b("div", {
653
+ ])) : Re.value === "custom" ? (v(), b("div", {
629
654
  key: 1,
630
- onClick: l[2] || (l[2] = se(() => {
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(dt), Le({
666
+ I(d(St), _e({
642
667
  ref_key: "testInput",
643
- ref: il,
644
- modelValue: R.value,
645
- "onUpdate:modelValue": l[0] || (l[0] = (r) => R.value = r),
646
- onKeyup: st(Ee, ["enter"]),
647
- onFocus: se(cl, ["stop"]),
648
- onBlur: se(dl, ["stop"]),
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: Ee
681
+ onClick: He
657
682
  },
658
- Z(d(O)("添加")),
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", It, [
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", Vt, [
677
- I(d(el), {
678
- modelValue: Ml.value,
679
- indeterminate: Ol.value,
680
- onChange: Zl,
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: m(() => [
684
- Ie(
685
- Z(d(O)("全选")),
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", J.value)
697
- }, null, 8, Lt)
721
+ innerHTML: d(O)("das-ui-select-selectedItemsCountWithPlaceholder", le.value)
722
+ }, null, 8, Bt)
698
723
  ],
699
724
  32
700
725
  /* NEED_HYDRATION */
701
- )) : L("v-if", !0)
726
+ )) : P("v-if", !0)
702
727
  ]))
703
728
  ];
704
729
  }, !0)
705
730
  ]),
706
- clearIcon: m(() => [
707
- x(e.$slots, "clearIcon", {}, () => [
708
- I(d(vt), { size: "medium" })
731
+ clearIcon: h(() => [
732
+ A(e.$slots, "clearIcon", {}, () => [
733
+ I(d(wt), { size: "medium" })
709
734
  ], !0)
710
735
  ]),
711
- maxTagPlaceholder: m((o) => [
712
- x(e.$slots, "maxTagPlaceholder", ue(ie(o)), () => [
713
- L(" 隐藏tag时显示的内容 "),
714
- I(d(Ve), {
715
- style: j(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
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: m(() => [
742
+ default: h(() => [
718
743
  S("span", {
719
- innerHTML: d(O)("das-ui-select-selectedItemsCountWithPlaceholder", J.value)
720
- }, null, 8, Mt)
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
- L(" <a-tag>+{{ currValue?.length - maxTagCountCell }}</a-tag> ")
750
+ P(" <a-tag>+{{ currValue?.length - maxTagCountCell }}</a-tag> ")
726
751
  ], !0)
727
752
  ]),
728
- notFoundContent: m(() => [
729
- x(e.$slots, "notFoundContent", {}, () => [
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: m(() => [
740
- x(e.$slots, "suffixIcon", {}, () => [
741
- I(d(ft), {
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: m(() => [
749
- x(e.$slots, "default", {}, void 0, !0)
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: m(() => [
757
- x(e.$slots, "menuItemSelectedIcon", {}, void 0, !0)
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: m(() => [
764
- x(e.$slots, "placeholder", {}, void 0, !0)
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: m(() => [
771
- x(e.$slots, "removeIcon", {}, void 0, !0)
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(it), { target: jl, x: !1 }],
777
- [d(ht), Nl]
801
+ [d(yt), { target: nt, x: !1 }],
802
+ [d(At), Zl]
778
803
  ]),
779
804
  p.error && p.errorLabel ? (v(), b(
780
- ke,
805
+ Oe,
781
806
  { key: 1 },
782
807
  [
783
- p.errorMode === "default" ? (v(), b("div", Ot, [
808
+ p.errorMode === "default" ? (v(), b("div", Wt, [
784
809
  S(
785
810
  "span",
786
811
  {
787
- style: j(Pl.value)
812
+ style: Q(Rl.value)
788
813
  },
789
- Z(p.errorLabel),
814
+ U(p.errorLabel),
790
815
  5
791
816
  /* TEXT, STYLE */
792
817
  )
793
- ])) : L("v-if", !0),
794
- p.errorMode === "overlay" && Se.value ? (v(), K(d(pt), {
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: () => T.value.$el,
822
+ getEl: () => C.value.$el,
798
823
  errorModelZIndex: p.errorModelZIndex
799
- }, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : L("v-if", !0)
824
+ }, null, 8, ["errorLabel", "getEl", "errorModelZIndex"])) : P("v-if", !0)
800
825
  ],
801
826
  64
802
827
  /* STABLE_FRAGMENT */
803
- )) : L("v-if", !0),
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: Pe,
834
+ ref: Fe,
810
835
  style: { position: "absolute", left: "-50%", top: "-50%", opacity: "0", "pointer-events": "none" }
811
836
  },
812
837
  [
813
- S("div", zt, [
814
- S("div", Pt, [
815
- S("span", _t, [
816
- I(d(Ve), {
817
- style: j(t.size == "mini" || t.size == "table" ? { fontSize: "12px" } : {})
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: m(() => [
844
+ default: h(() => [
820
845
  S("span", {
821
- innerHTML: d(O)("das-ui-select-selectedItemsCountWithPlaceholder", J.value)
822
- }, null, 8, Et)
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
- }), nl = (p, N) => {
841
- const D = p.__vccOpts || p;
842
- for (const [t, A] of N)
843
- D[t] = A;
844
- return D;
845
- }, Bt = /* @__PURE__ */ nl(Dt, [["__scopeId", "data-v-21a12cc3"]]), $t = {};
846
- function Wt(p, N) {
847
- const D = Ct;
848
- return v(), K(
849
- D,
850
- Le({ class: "das-ui-select-option" }, p.$attrs),
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 Ft = /* @__PURE__ */ nl($t, [["render", Wt]]), Rt = {
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
- gt(Rt);
868
- const io = tl(Bt), co = tl(Ft), fo = { name: "select 选择器" };
892
+ kt(Yt);
893
+ const bo = il(Gt), So = il(jt), Co = { name: "select 选择器" };
869
894
  export {
870
- io as DasSelect,
871
- co as DasSelectOption,
872
- fo as default
895
+ bo as DasSelect,
896
+ So as DasSelectOption,
897
+ Co as default
873
898
  };