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

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