@das-fed/upf-ui 6.4.0-dev.248 → 6.4.0-dev.249

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