@das-fed/upf-ui 6.4.0-dev.211 → 6.4.0-dev.212

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