@dazhicheng/ui 1.6.82 → 1.6.83

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 (34) hide show
  1. package/dist/assets/svg/download.svg.js +1 -1
  2. package/dist/components/tt-area/TtArea.vue.js +1 -1
  3. package/dist/components/tt-button/index.d.ts +28 -28
  4. package/dist/components/tt-button/index.vue.d.ts +16 -16
  5. package/dist/components/tt-custom-export-modal/src/assets/search.svg.js +5 -5
  6. package/dist/components/tt-custom-export-modal/src/assets/star.svg.js +3 -3
  7. package/dist/components/tt-custom-export-modal/src/assets/trash.svg.js +7 -7
  8. package/dist/components/tt-custom-export-modal/src/components/FieldGridSection.vue.js +1 -1
  9. package/dist/components/tt-drawer/index.d.ts +109 -109
  10. package/dist/components/tt-drawer/src/RenderDrawer.vue.d.ts +60 -60
  11. package/dist/components/tt-drawer/src/components/DrawerHeader.vue.js +2 -2
  12. package/dist/components/tt-empty/index.d.ts +4 -4
  13. package/dist/components/tt-form/src/components/FormElInput.vue.d.ts +10 -10
  14. package/dist/components/tt-icon/index.vue.js +2 -2
  15. package/dist/components/tt-image/index.d.ts +29 -29
  16. package/dist/components/tt-image/src/components/ImageViewer.d.ts +20 -20
  17. package/dist/components/tt-image/tt-image.d.ts +29 -29
  18. package/dist/components/tt-input-textarea/index.vue.d.ts +40 -40
  19. package/dist/components/tt-loading/src/loading.vue.js +2 -2
  20. package/dist/components/tt-modal/index.d.ts +150 -150
  21. package/dist/components/tt-modal/src/RenderModal.vue.d.ts +42 -42
  22. package/dist/components/tt-modal/src/RenderModal.vue.js +179 -171
  23. package/dist/components/tt-modal/src/hooks/useModalRender.d.ts +17 -17
  24. package/dist/components/tt-modal/src/utils/modal-z-index.d.ts +20 -0
  25. package/dist/components/tt-modal/src/utils/modal-z-index.js +26 -16
  26. package/dist/components/tt-modal/src/utils/resolve-modal-target.js +3 -3
  27. package/dist/components/tt-panel-select/src/components/PanelMiddle.vue.d.ts +5 -5
  28. package/dist/components/tt-panel-select/src/index.vue.d.ts +5 -5
  29. package/dist/components/tt-panel-select/src/index.vue.js +251 -237
  30. package/dist/components/tt-upload/index.d.ts +60 -60
  31. package/dist/components/tt-upload/src/TtUpload.vue.d.ts +37 -37
  32. package/dist/components/tt-upload/src/typing.d.ts +17 -17
  33. package/dist/style.css +1 -1
  34. package/package.json +3 -3
@@ -1,9 +1,9 @@
1
- import { defineComponent as fl, mergeModels as ne, computed as i, useModel as hl, watch as b, ref as g, useTemplateRef as L, unref as s, onMounted as ml, createElementBlock as R, openBlock as w, normalizeClass as x, createVNode as re, mergeProps as vl, withCtx as ie, withDirectives as gl, normalizeStyle as wl, createBlock as se, createCommentVNode as B, createElementVNode as ue, toDisplayString as yl, nextTick as _ } from "vue";
1
+ import { defineComponent as gl, mergeModels as se, ref as m, computed as i, useModel as yl, watch as x, useTemplateRef as B, unref as s, onMounted as wl, createElementBlock as _, openBlock as y, normalizeClass as S, createVNode as ue, mergeProps as Al, withCtx as ce, withDirectives as Cl, normalizeStyle as kl, createBlock as de, createCommentVNode as T, createElementVNode as pe, toDisplayString as xl, nextTick as G } from "vue";
2
2
  import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.34_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
3
- import { useDesign as Al } from "../../../packages/hooks/src/useDesign.js";
3
+ import { useDesign as Sl } from "../../../packages/hooks/src/useDesign.js";
4
4
  import "axios";
5
- import { ElSelect as Cl, vLoading as kl } from "element-plus";
6
- import { isString as bl } from "../../../packages/utils/src/is.js";
5
+ import { useZIndex as bl, ElSelect as Ol, vLoading as Ml } from "element-plus";
6
+ import { isString as Vl } from "../../../packages/utils/src/is.js";
7
7
  import "dayjs";
8
8
  import "numeral";
9
9
  import "xe-utils";
@@ -17,20 +17,21 @@ import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/mode-
17
17
  import "../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pad-pkcs7.js";
18
18
  import "lodash-es";
19
19
  import "vue-router";
20
- import { missingOptionsEchoVersion as xl, getPanelMissingEchoOptions as Sl, expandJoinedOptionValues as Ol, diffPanelMissingCodes as Ml, ensurePanelResolveMissingOptions as Vl, PANEL_MISSING_ECHO_DEFAULT_SCOPE as ce } from "../../../hooks/missingOptionsCache.js";
21
- import { useDebounceFn as El, useResizeObserver as Fl } from "@vueuse/core";
22
- import { useSelectCollapseOptions as Pl } from "../../tt-form/src/hooks/useSelectCollapse.js";
23
- import { splitPanelSelectText as T, ALL as $l, DEFAULT_PANEL_SELECT_SEPARATORS as Nl } from "./common.js";
24
- import Ll from "./components/PanelLeft.vue.js";
25
- import Rl from "./components/PanelMiddle.vue.js";
26
- import Bl from "./components/PanelRight.vue.js";
27
- import { usePanelSelectData as _l } from "./hooks/usePanelData.js";
28
- import { usePanelSelectSelection as Tl } from "./hooks/usePanelSelection.js";
20
+ import { missingOptionsEchoVersion as El, getPanelMissingEchoOptions as Pl, expandJoinedOptionValues as Fl, diffPanelMissingCodes as $l, ensurePanelResolveMissingOptions as Nl, PANEL_MISSING_ECHO_DEFAULT_SCOPE as fe } from "../../../hooks/missingOptionsCache.js";
21
+ import { useDebounceFn as Ll, useResizeObserver as Rl } from "@vueuse/core";
22
+ import { useSelectCollapseOptions as Bl } from "../../tt-form/src/hooks/useSelectCollapse.js";
23
+ import { ensureElementPlusAboveOpenModals as _l } from "../../tt-modal/src/utils/modal-z-index.js";
24
+ import { splitPanelSelectText as D, ALL as Tl, DEFAULT_PANEL_SELECT_SEPARATORS as Gl } from "./common.js";
25
+ import Dl from "./components/PanelLeft.vue.js";
26
+ import Il from "./components/PanelMiddle.vue.js";
27
+ import Kl from "./components/PanelRight.vue.js";
28
+ import { usePanelSelectData as Wl } from "./hooks/usePanelData.js";
29
+ import { usePanelSelectSelection as Ul } from "./hooks/usePanelSelection.js";
29
30
  /* empty css */
30
- const m = 4, ht = /* @__PURE__ */ fl({
31
+ const v = 4, Ct = /* @__PURE__ */ gl({
31
32
  name: "TtPanelSelect",
32
33
  __name: "index",
33
- props: /* @__PURE__ */ ne({
34
+ props: /* @__PURE__ */ se({
34
35
  allowCreate: { type: Boolean, default: !1 },
35
36
  disabled: { type: Boolean, default: !1 },
36
37
  showNav: { type: Boolean, default: !0 },
@@ -41,7 +42,7 @@ const m = 4, ht = /* @__PURE__ */ fl({
41
42
  resultField: { default: "" },
42
43
  options: { default: () => [] },
43
44
  resolveMissingOptions: { type: Function, default: void 0 },
44
- missingEchoKey: { default: ce },
45
+ missingEchoKey: { default: fe },
45
46
  treeConfig: { default: () => ({
46
47
  transform: !1,
47
48
  labelField: "label",
@@ -54,11 +55,11 @@ const m = 4, ht = /* @__PURE__ */ fl({
54
55
  immediate: { type: Boolean, default: !0 },
55
56
  beforeFetch: { type: Function, default: void 0 },
56
57
  afterFetch: { type: Function, default: void 0 },
57
- separator: { default: () => [...Nl] },
58
+ separator: { default: () => [...Gl] },
58
59
  pasteSearch: { type: Boolean, default: !0 },
59
60
  alwaysLoad: { type: Boolean, default: !1 },
60
61
  showAll: { type: Boolean, default: !0 },
61
- showAllField: { default: $l },
62
+ showAllField: { default: Tl },
62
63
  showPinyinMode: { type: Boolean, default: !1 },
63
64
  showOriginMode: { type: Boolean, default: !0 },
64
65
  leftPlaceholder: { default: "支持模糊搜索" },
@@ -68,10 +69,13 @@ const m = 4, ht = /* @__PURE__ */ fl({
68
69
  modelValue: {},
69
70
  modelModifiers: {}
70
71
  }),
71
- emits: /* @__PURE__ */ ne(["visible-change", "change", "focus"], ["update:modelValue"]),
72
- setup(c, { expose: de, emit: pe }) {
73
- const fe = kl, he = Cl, t = c, S = pe, { prefixCls: d } = Al("panel-select");
74
- function me(e = []) {
72
+ emits: /* @__PURE__ */ se(["visible-change", "change", "focus"], ["update:modelValue"]),
73
+ setup(c, { expose: he, emit: me }) {
74
+ const ve = Ml, ge = Ol, t = c, b = me, { prefixCls: d } = Sl("panel-select"), I = bl(), O = m();
75
+ function M() {
76
+ _l(I), O.value = I.nextZIndex();
77
+ }
78
+ function ye(e = []) {
75
79
  const l = /* @__PURE__ */ new Set(), a = (o) => {
76
80
  o.forEach((n) => {
77
81
  var u;
@@ -84,110 +88,110 @@ const m = 4, ht = /* @__PURE__ */ fl({
84
88
  };
85
89
  return a(e), l;
86
90
  }
87
- function ve(e) {
91
+ function we(e) {
88
92
  return Array.isArray(e) ? e : e == null || e === "" ? [] : [e];
89
93
  }
90
- function G() {
91
- return t.missingEchoKey || ce;
94
+ function K() {
95
+ return t.missingEchoKey || fe;
92
96
  }
93
- const ge = i(() => {
94
- xl.value;
95
- const e = t.options || [], l = Sl(G());
97
+ const Ae = i(() => {
98
+ El.value;
99
+ const e = t.options || [], l = Pl(K());
96
100
  if (!l.length) return e;
97
- const a = me(e), o = l.filter(
101
+ const a = ye(e), o = l.filter(
98
102
  (n) => n.value !== void 0 && n.value !== null && !a.has(n.value)
99
103
  );
100
104
  return o.length ? [...e, ...o] : e;
101
- }), we = new Proxy(t, {
105
+ }), Ce = new Proxy(t, {
102
106
  get(e, l, a) {
103
- return l === "options" ? ge.value : Reflect.get(e, l, a);
107
+ return l === "options" ? Ae.value : Reflect.get(e, l, a);
104
108
  }
105
109
  }), {
106
- loading: D,
107
- fetchApi: v,
108
- treeOptions: ye,
109
- navTreeOptions: K,
110
- navNodes: Ae,
110
+ loading: W,
111
+ fetchApi: g,
112
+ treeOptions: ke,
113
+ navTreeOptions: U,
114
+ navNodes: xe,
111
115
  leafNodes: f,
112
- isFirstLoaded: W,
113
- filterNodes: Ce,
114
- buildOptionGroups: U
115
- } = _l(we), r = hl(c, "modelValue");
116
- let I;
117
- const z = i(() => t.disabled), ke = i(() => {
116
+ isFirstLoaded: Z,
117
+ filterNodes: Se,
118
+ buildOptionGroups: z
119
+ } = Wl(Ce), r = yl(c, "modelValue");
120
+ let j;
121
+ const H = i(() => t.disabled), be = i(() => {
118
122
  if (!t.multiple)
119
123
  return t.allowCreate ? `${t.placeholder ? t.placeholder : "请选择"}(可创建)` : t.placeholder;
120
124
  const e = t.showMultiple ? "支持多选和全选" : "支持多选", l = typeof t.placeholder == "string" && t.placeholder.trim() ? t.placeholder.trim().replace(/[,,]\s*$/, "") : "请选择", a = l.includes("支持多选和全选") || l.includes("支持多选") ? l : `${l},${e}`;
121
125
  return t.allowCreate ? `${a}(可创建)` : a;
122
- }), be = i(() => {
126
+ }), Oe = i(() => {
123
127
  const e = /* @__PURE__ */ new Map();
124
128
  return f.value.forEach((l) => e.set(l.value, l.label)), e;
125
- }), j = i(() => {
129
+ }), J = i(() => {
126
130
  const e = /* @__PURE__ */ new Map();
127
131
  return f.value.forEach((l) => {
128
132
  var a;
129
133
  (l.deleted === !0 || ((a = l.raw) == null ? void 0 : a.deleted) === !0) && e.set(l.value, !0);
130
134
  }), e;
131
135
  });
132
- function O(e) {
136
+ function V(e) {
133
137
  return e === t.showAllField ? { label: "全部", value: t.showAllField } : {
134
- label: be.value.get(e) ?? String(e),
138
+ label: Oe.value.get(e) ?? String(e),
135
139
  value: e,
136
- deleted: j.value.get(e) === !0
140
+ deleted: J.value.get(e) === !0
137
141
  };
138
142
  }
139
- function xe(e) {
140
- return e == null ? !1 : j.value.get(e) === !0;
143
+ function Me(e) {
144
+ return e == null ? !1 : J.value.get(e) === !0;
141
145
  }
142
- const Se = El(async () => {
146
+ const Ve = Ll(async () => {
143
147
  const e = t.resolveMissingOptions;
144
148
  if (!e) return;
145
- const l = Ol(
146
- ve(r.value).filter((n) => n !== t.showAllField)
149
+ const l = Fl(
150
+ we(r.value).filter((n) => n !== t.showAllField)
147
151
  );
148
152
  if (!l.length) return;
149
- const a = G();
150
- Ml(a, l, t.options || []).length && await Vl(a, l, t.options || [], (n) => e(n));
153
+ const a = K();
154
+ $l(a, l, t.options || []).length && await Nl(a, l, t.options || [], (n) => e(n));
151
155
  }, 64);
152
- b(
156
+ x(
153
157
  [r, () => t.options, () => t.showAllField, () => t.missingEchoKey],
154
158
  () => {
155
- t.resolveMissingOptions && Se();
159
+ t.resolveMissingOptions && Ve();
156
160
  },
157
161
  { immediate: !0, deep: !0 }
158
162
  );
159
- function H(e) {
163
+ function q(e) {
160
164
  if (e != null)
161
165
  return typeof e == "object" && "value" in e ? e.value : e;
162
166
  }
163
- const J = i({
167
+ const Q = i({
164
168
  get() {
165
169
  return Array.isArray(r.value) ? t.multiple ? r.value : r.value.slice(-1) : r.value === void 0 ? [] : [r.value];
166
170
  },
167
171
  set(e) {
168
172
  r.value = t.multiple ? [...e] : e.at(-1);
169
173
  }
170
- }), M = i(() => {
174
+ }), E = i(() => {
171
175
  if (!t.allowCreate) return [];
172
176
  const e = new Set(f.value.map((a) => a.value)), l = [];
173
- return new Set(J.value).forEach((a) => {
174
- !bl(a) || a === t.showAllField || e.has(a) || l.push({ label: a, value: a, level: 0, path: [], raw: { label: a, value: a } });
177
+ return new Set(Q.value).forEach((a) => {
178
+ !Vl(a) || a === t.showAllField || e.has(a) || l.push({ label: a, value: a, level: 0, path: [], raw: { label: a, value: a } });
175
179
  }), l;
176
- }), V = i(() => [...f.value, ...M.value]);
177
- b([() => t.multiple, () => r.value], ([e, l]) => {
180
+ }), P = i(() => [...f.value, ...E.value]);
181
+ x([() => t.multiple, () => r.value], ([e, l]) => {
178
182
  if (e) {
179
183
  Array.isArray(l) || (r.value = l === void 0 ? [] : [l]);
180
184
  return;
181
185
  }
182
186
  Array.isArray(l) && (r.value = l.at(-1));
183
187
  });
184
- const E = g(), y = g(""), p = g(""), F = g(), P = L("middleRef"), A = L("selectWrapRef"), q = L("selectRef"), $ = g(0);
185
- function Q() {
188
+ const F = m(), w = m(""), p = m(""), $ = m(), N = B("middleRef"), A = B("selectWrapRef"), X = B("selectRef"), L = m(0);
189
+ function Y() {
186
190
  const e = A.value;
187
- e && ($.value = e.offsetWidth);
191
+ e && (L.value = e.offsetWidth);
188
192
  }
189
- Fl(A, () => Q());
190
- const Oe = i(() => ({
193
+ Rl(A, () => Y());
194
+ const Ee = i(() => ({
191
195
  componentProps: {
192
196
  multiple: t.multiple,
193
197
  component: {
@@ -196,135 +200,144 @@ const m = 4, ht = /* @__PURE__ */ fl({
196
200
  },
197
201
  component: "TtPanelSelect",
198
202
  selectWrapRef: A,
199
- selectRef: q
200
- })), { selectComponentProps: Me } = Pl(Oe), X = i(() => {
201
- const e = y.value.trim().toLowerCase();
202
- if (!e) return K.value;
203
+ selectRef: X
204
+ })), { selectComponentProps: Pe } = Bl(Ee), Fe = i(() => {
205
+ const e = Pe.value || {}, l = e.popperStyle && typeof e.popperStyle == "object" && !Array.isArray(e.popperStyle) ? e.popperStyle : {};
206
+ return {
207
+ ...e,
208
+ popperStyle: {
209
+ ...l,
210
+ ...O.value != null ? { zIndex: O.value } : {}
211
+ }
212
+ };
213
+ }), ee = i(() => {
214
+ const e = w.value.trim().toLowerCase();
215
+ if (!e) return U.value;
203
216
  const l = (a) => {
204
217
  const o = [];
205
218
  return a.forEach((n) => {
206
- var oe;
207
- const u = (oe = n.children) != null && oe.length ? l(n.children) : void 0;
219
+ var ie;
220
+ const u = (ie = n.children) != null && ie.length ? l(n.children) : void 0;
208
221
  (String(n.label).toLowerCase().includes(e) || u && u.length) && o.push({ ...n, children: u != null && u.length ? u : void 0 });
209
222
  }), o;
210
223
  };
211
- return l(K.value);
212
- }), Ve = i(() => {
224
+ return l(U.value);
225
+ }), $e = i(() => {
213
226
  const e = [], l = (a) => {
214
227
  a.forEach((o) => {
215
228
  var n;
216
229
  e.push(o.value), (n = o.children) != null && n.length && l(o.children);
217
230
  });
218
231
  };
219
- return l(X.value), e;
232
+ return l(ee.value), e;
220
233
  }), C = i(
221
- () => Fe(p.value).map((e) => ({
234
+ () => Le(p.value).map((e) => ({
222
235
  label: e,
223
236
  value: e,
224
237
  level: 0,
225
238
  path: [],
226
239
  raw: { label: e, value: e }
227
240
  }))
228
- ), Ee = i(() => [...V.value, ...C.value]), k = i(() => {
229
- const e = U(f.value, p.value), l = Ce([...M.value, ...C.value], p.value);
241
+ ), Ne = i(() => [...P.value, ...C.value]), k = i(() => {
242
+ const e = z(f.value, p.value), l = Se([...E.value, ...C.value], p.value);
230
243
  if (!l.length) return e;
231
244
  const a = new Map(l.map((u) => [u.value, u])), o = [];
232
- T(p.value, t.separator).forEach((u) => {
233
- const N = a.get(u);
234
- N && (o.push(N), a.delete(u));
245
+ D(p.value, t.separator).forEach((u) => {
246
+ const R = a.get(u);
247
+ R && (o.push(R), a.delete(u));
235
248
  }), o.push(...a.values());
236
249
  let n = "__created__";
237
250
  for (; e.some((u) => u.value === n); ) n += "_";
238
251
  return [{ value: n, label: "自定义", options: o }, ...e];
239
252
  });
240
- function Fe(e) {
241
- if (!t.allowCreate || t.disabled || D.value || t.api && !W.value) return [];
242
- const l = T(e, t.separator);
243
- if (!l.length || U(f.value, e).length) return [];
244
- const a = new Set(V.value.map((o) => `${o.value}`));
253
+ function Le(e) {
254
+ if (!t.allowCreate || t.disabled || W.value || t.api && !Z.value) return [];
255
+ const l = D(e, t.separator);
256
+ if (!l.length || z(f.value, e).length) return [];
257
+ const a = new Set(P.value.map((o) => `${o.value}`));
245
258
  return [...new Set(l)].filter((o) => o !== `${t.showAllField}` && !a.has(o));
246
259
  }
247
- function Pe() {
260
+ function Re() {
248
261
  if (!C.value.length) return;
249
262
  const e = new Set(
250
- [...M.value, ...C.value].map((a) => a.value)
251
- ), l = [...new Set(T(p.value, t.separator))].filter(
263
+ [...E.value, ...C.value].map((a) => a.value)
264
+ ), l = [...new Set(D(p.value, t.separator))].filter(
252
265
  (a) => e.has(a)
253
266
  );
254
- ae(l, !0);
267
+ re(l, !0);
255
268
  }
256
- const $e = i(() => {
269
+ const Be = i(() => {
257
270
  const e = "minmax(var(--tt-panel-select-middle-width, 450px), 1fr)";
258
271
  return t.showNav && !t.multiple ? `200px ${e}` : !t.showNav && t.multiple ? `${e} 180px` : !t.showNav && !t.multiple ? e : `200px ${e} 180px`;
259
- }), Ne = i(() => {
272
+ }), _e = i(() => {
260
273
  const e = "var(--tt-panel-select-middle-width, 450px)";
261
274
  return t.showNav && !t.multiple ? `max(calc(200px + ${e}), 800px)` : !t.showNav && t.multiple ? `max(calc(${e} + 180px), 800px)` : !t.showNav && !t.multiple ? `max(${e}, 800px)` : `max(calc(200px + ${e} + 180px), 800px)`;
262
- }), Le = i(() => {
275
+ }), Te = i(() => {
263
276
  const e = [];
264
277
  return k.value.forEach((l) => {
265
278
  !(t.showOriginMode && l.value === "__origin__") && e.push({ key: `group-${String(l.value)}`, type: "group", group: l });
266
- const o = Math.ceil(l.options.length / m);
267
- for (let n = 0; n < l.options.length; n += m) {
268
- const u = n / m;
279
+ const o = Math.ceil(l.options.length / v);
280
+ for (let n = 0; n < l.options.length; n += v) {
281
+ const u = n / v;
269
282
  e.push({
270
- key: `options-${String(l.value)}-${n / m}`,
283
+ key: `options-${String(l.value)}-${n / v}`,
271
284
  type: "options",
272
285
  group: l,
273
- options: l.options.slice(n, n + m),
286
+ options: l.options.slice(n, n + v),
274
287
  isLast: u === o - 1
275
288
  });
276
289
  }
277
290
  }), e;
278
291
  }), {
279
- selectedOptions: Re,
280
- selectedValueSet: Y,
281
- isAllChecked: Be,
282
- isIndeterminate: _e,
283
- getGroupCheckCount: Te,
284
- handleGroupCheck: Ge,
285
- handleAllOptionCheck: De,
286
- handleOptionCheck: Ke,
287
- handleOptionsCheck: We,
288
- handleCheckAll: Ue,
289
- clearSelected: Ie,
290
- removeSelected: ze,
291
- withLockedSelectedValues: je
292
- } = Tl({
292
+ selectedOptions: Ge,
293
+ selectedValueSet: le,
294
+ isAllChecked: De,
295
+ isIndeterminate: Ie,
296
+ getGroupCheckCount: Ke,
297
+ handleGroupCheck: We,
298
+ handleAllOptionCheck: Ue,
299
+ handleOptionCheck: Ze,
300
+ handleOptionsCheck: ze,
301
+ handleCheckAll: je,
302
+ clearSelected: He,
303
+ removeSelected: Je,
304
+ withLockedSelectedValues: qe
305
+ } = Ul({
293
306
  multiple: i(() => t.multiple),
294
307
  modelValue: r,
295
- selectedValues: J,
296
- leafNodes: Ee,
308
+ selectedValues: Q,
309
+ leafNodes: Ne,
297
310
  allValue: i(() => t.showAllField)
298
- }), Z = i({
311
+ }), te = i({
299
312
  get() {
300
313
  if (t.multiple)
301
- return (Array.isArray(r.value) ? r.value : r.value === void 0 ? [] : [r.value]).map((l) => O(l));
314
+ return (Array.isArray(r.value) ? r.value : r.value === void 0 ? [] : [r.value]).map((l) => V(l));
302
315
  if (Array.isArray(r.value)) {
303
316
  const e = r.value.at(-1);
304
- return e === void 0 ? void 0 : O(e);
317
+ return e === void 0 ? void 0 : V(e);
305
318
  }
306
- return r.value === void 0 ? void 0 : O(r.value);
319
+ return r.value === void 0 ? void 0 : V(r.value);
307
320
  },
308
321
  set(e) {
309
322
  const l = s(r);
310
- if (I = Array.isArray(l) ? [...l] : l, t.multiple) {
311
- const o = (Array.isArray(e) ? e : []).map((n) => H(n)).filter((n) => n !== void 0);
312
- r.value = je(o);
323
+ if (j = Array.isArray(l) ? [...l] : l, t.multiple) {
324
+ const o = (Array.isArray(e) ? e : []).map((n) => q(n)).filter((n) => n !== void 0);
325
+ r.value = qe(o);
313
326
  return;
314
327
  }
315
- r.value = H(e);
328
+ r.value = q(e);
316
329
  }
317
- }), ee = i(
330
+ }), ae = i(
318
331
  () => {
319
332
  const e = {}, l = {};
320
333
  return k.value.forEach((a) => {
321
- const { enabledCount: o, checkedCount: n } = Te(a), u = String(a.value);
334
+ const { enabledCount: o, checkedCount: n } = Ke(a), u = String(a.value);
322
335
  e[u] = o > 0 && n === o, l[u] = o > 0 && n > 0 && n < o;
323
336
  }), { checkedMap: e, indeterminateMap: l };
324
337
  }
325
- ), He = i(() => ee.value.checkedMap), Je = i(() => ee.value.indeterminateMap), qe = i(() => Y.value.has(t.showAllField)), le = i(() => [...t.showAll ? [{ label: "全部", value: t.showAllField }] : [], ...V.value.map((l) => ({ ...l }))]);
326
- function Qe(e) {
327
- const l = s(le);
338
+ ), Qe = i(() => ae.value.checkedMap), Xe = i(() => ae.value.indeterminateMap), Ye = i(() => le.value.has(t.showAllField)), oe = i(() => [...t.showAll ? [{ label: "全部", value: t.showAllField }] : [], ...P.value.map((l) => ({ ...l }))]);
339
+ function el(e) {
340
+ const l = s(oe);
328
341
  if (Array.isArray(e)) {
329
342
  const a = new Set(e);
330
343
  return l.filter((o) => o.value !== void 0 && a.has(o.value));
@@ -332,215 +345,216 @@ const m = 4, ht = /* @__PURE__ */ fl({
332
345
  if (e !== void 0)
333
346
  return l.find((a) => a.value === e);
334
347
  }
335
- function Xe(e) {
348
+ function ll(e) {
336
349
  var a;
337
350
  if (t.showPinyinMode || k.value.some((o) => o.value === e.value)) return e.value;
338
351
  const l = f.value.find((o) => o.path.some((n) => n.value === e.value));
339
352
  return (a = l == null ? void 0 : l.path.at(-2)) == null ? void 0 : a.value;
340
353
  }
341
- function Ye(e) {
342
- E.value = e.value;
343
- const l = Xe(e);
344
- F.value = void 0, _(() => {
354
+ function tl(e) {
355
+ F.value = e.value;
356
+ const l = ll(e);
357
+ $.value = void 0, G(() => {
345
358
  var a;
346
- F.value = l, l !== void 0 && ((a = P.value) == null || a.scrollToGroup(l));
359
+ $.value = l, l !== void 0 && ((a = N.value) == null || a.scrollToGroup(l));
347
360
  });
348
361
  }
349
- function Ze(e) {
350
- y.value = e;
362
+ function al(e) {
363
+ w.value = e;
351
364
  }
352
- function el(e) {
365
+ function ol(e) {
353
366
  p.value = e;
354
367
  }
355
- function ll(e, l) {
368
+ function nl(e, l) {
356
369
  const a = k.value.find((o) => o.value === e);
357
- a && Ge(a, l);
370
+ a && We(a, l);
358
371
  }
359
- async function tl(e) {
372
+ async function rl(e) {
360
373
  var l;
361
- S("visible-change", e), e && (p.value = "", y.value = "", await _(), (l = P.value) == null || l.inputFocus(), Q(), t.alwaysLoad ? await v() : !t.immediate && !s(W) && await v());
374
+ b("visible-change", e), e && (M(), p.value = "", w.value = "", await G(), (l = N.value) == null || l.inputFocus(), Y(), t.alwaysLoad ? await g() : !t.immediate && !s(Z) && await g());
362
375
  }
363
- function al() {
364
- te(I);
376
+ function il() {
377
+ ne(j);
365
378
  }
366
- function ol(e) {
367
- S("change", e, [...s(le)], Qe(e));
379
+ function sl(e) {
380
+ b("change", e, [...s(oe)], el(e));
368
381
  }
369
- function nl(e, l) {
382
+ function ul(e, l) {
370
383
  return Array.isArray(e) && Array.isArray(l) ? e.length === l.length && e.every((a, o) => a === l[o]) : e === l;
371
384
  }
372
- function te(e) {
373
- _(() => {
385
+ function ne(e) {
386
+ G(() => {
374
387
  const l = s(r);
375
- nl(l, e) || ol(l);
388
+ ul(l, e) || sl(l);
376
389
  });
377
390
  }
378
391
  function h(e) {
379
392
  const l = s(r), a = Array.isArray(l) ? [...l] : l;
380
- e(), te(a);
393
+ e(), ne(a);
381
394
  }
382
- function rl(e) {
395
+ function cl(e) {
383
396
  h(() => {
384
- De(e);
397
+ Ue(e);
385
398
  });
386
399
  }
387
- function il(e) {
400
+ function dl(e) {
388
401
  h(() => {
389
- Ue(e);
402
+ je(e);
390
403
  });
391
404
  }
392
- function sl(e, l) {
405
+ function pl(e, l) {
393
406
  h(() => {
394
- ll(e, l);
407
+ nl(e, l);
395
408
  });
396
409
  }
397
- function ul(e, l) {
410
+ function fl(e, l) {
398
411
  h(() => {
399
- Ke(e, l);
412
+ Ze(e, l);
400
413
  });
401
414
  }
402
- function ae(e, l) {
415
+ function re(e, l) {
403
416
  h(() => {
404
- We(e, l);
417
+ ze(e, l);
405
418
  });
406
419
  }
407
- function cl(e) {
420
+ function hl(e) {
408
421
  h(() => {
409
- ze(e);
422
+ Je(e);
410
423
  });
411
424
  }
412
- function dl() {
425
+ function ml() {
413
426
  h(() => {
414
- Ie();
427
+ He();
415
428
  });
416
429
  }
417
- function pl(e) {
418
- S("focus", e);
430
+ function vl(e) {
431
+ M(), b("focus", e);
419
432
  }
420
- return b(
433
+ return x(
421
434
  () => t.params,
422
435
  () => {
423
- v();
436
+ g();
424
437
  },
425
438
  { deep: !0 }
426
- ), b(
427
- Ae,
439
+ ), x(
440
+ xe,
428
441
  (e) => {
429
442
  var l;
430
- E.value !== void 0 || !e.length || (E.value = (l = e[0]) == null ? void 0 : l.value);
443
+ F.value !== void 0 || !e.length || (F.value = (l = e[0]) == null ? void 0 : l.value);
431
444
  },
432
445
  { immediate: !0 }
433
- ), ml(() => {
434
- t.immediate && v();
435
- }), de({
446
+ ), wl(() => {
447
+ t.immediate && g();
448
+ }), he({
436
449
  /** 重新加载数据源*/
437
- reload: v,
450
+ reload: g,
438
451
  /** 获取当前归一化后的树形选项数据 */
439
- getOptions: () => s(ye),
452
+ getOptions: () => s(ke),
440
453
  /** 获取当前v-model值 */
441
454
  getValue: () => s(r)
442
- }), (e, l) => (w(), R("div", {
455
+ }), (e, l) => (y(), _("div", {
443
456
  ref_key: "selectWrapRef",
444
457
  ref: A,
445
- class: x(s(d))
458
+ class: S(s(d)),
459
+ onPointerdownCapture: M
446
460
  }, [
447
- re(s(he), vl({
461
+ ue(s(ge), Al({
448
462
  ref_key: "selectRef",
449
- ref: q,
450
- modelValue: Z.value,
451
- "onUpdate:modelValue": l[0] || (l[0] = (a) => Z.value = a)
452
- }, s(Me), {
463
+ ref: X,
464
+ modelValue: te.value,
465
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => te.value = a)
466
+ }, Fe.value, {
453
467
  multiple: c.multiple,
454
468
  filterable: !1,
455
- placeholder: ke.value,
469
+ placeholder: be.value,
456
470
  persistent: !1,
457
471
  "fallback-placements": ["bottom-start", "bottom-end", "bottom", "top-start", "top-end", "top", "right", "left"],
458
472
  disabled: c.disabled,
459
473
  "popper-class": `${s(d)}__popper vxe-table--ignore-clear`,
460
- onVisibleChange: tl,
461
- onChange: al,
462
- onFocus: pl
474
+ onVisibleChange: rl,
475
+ onChange: il,
476
+ onFocus: vl
463
477
  }), {
464
- label: ie(({ label: a, value: o }) => [
465
- ue("span", {
466
- class: x(`${s(d)}__trigger-label`)
478
+ label: ce(({ label: a, value: o }) => [
479
+ pe("span", {
480
+ class: S(`${s(d)}__trigger-label`)
467
481
  }, [
468
- ue("span", null, yl(a), 1),
469
- xe(o) ? (w(), R("span", {
482
+ pe("span", null, xl(a), 1),
483
+ Me(o) ? (y(), _("span", {
470
484
  key: 0,
471
- class: x(`${s(d)}__deleted-mark`)
472
- }, "删", 2)) : B("", !0)
485
+ class: S(`${s(d)}__deleted-mark`)
486
+ }, "删", 2)) : T("", !0)
473
487
  ], 2)
474
488
  ]),
475
- empty: ie(() => [
476
- gl((w(), R("div", {
489
+ empty: ce(() => [
490
+ Cl((y(), _("div", {
477
491
  "element-loading-text": "加载中",
478
- class: x(`${s(d)}__panel`),
479
- style: wl({
480
- "--columns": $e.value,
481
- "--panel-min-width": Ne.value,
482
- "--panel-width": $.value ? `${$.value}px` : "100%"
492
+ class: S(`${s(d)}__panel`),
493
+ style: kl({
494
+ "--columns": Be.value,
495
+ "--panel-min-width": _e.value,
496
+ "--panel-width": L.value ? `${L.value}px` : "100%"
483
497
  })
484
498
  }, [
485
- t.showNav ? (w(), se(Ll, {
499
+ t.showNav ? (y(), de(Dl, {
486
500
  key: 0,
487
501
  "prefix-cls": s(d),
488
- keyword: y.value,
489
- "tree-data": X.value,
490
- "expanded-keys": Ve.value,
502
+ keyword: w.value,
503
+ "tree-data": ee.value,
504
+ "expanded-keys": $e.value,
491
505
  "left-placeholder": c.leftPlaceholder,
492
- "onUpdate:keyword": Ze,
493
- onSelect: Ye
494
- }, null, 8, ["prefix-cls", "keyword", "tree-data", "expanded-keys", "left-placeholder"])) : B("", !0),
495
- re(Rl, {
506
+ "onUpdate:keyword": al,
507
+ onSelect: tl
508
+ }, null, 8, ["prefix-cls", "keyword", "tree-data", "expanded-keys", "left-placeholder"])) : T("", !0),
509
+ ue(Il, {
496
510
  ref_key: "middleRef",
497
- ref: P,
511
+ ref: N,
498
512
  "allow-create": t.allowCreate,
499
513
  "prefix-cls": s(d),
500
514
  multiple: c.multiple,
501
515
  keyword: p.value,
502
- rows: Le.value,
503
- disabled: z.value,
516
+ rows: Te.value,
517
+ disabled: H.value,
504
518
  "show-all": t.showAll,
505
- "option-per-row": m,
519
+ "option-per-row": v,
506
520
  "row-height": 40,
507
- "selected-value-set": s(Y),
508
- "is-all-checked": s(Be),
509
- "is-indeterminate": s(_e),
510
- "all-checked": qe.value,
511
- "scroll-to-group-value": F.value,
512
- "group-checked-map": He.value,
513
- "group-indeterminate-map": Je.value,
521
+ "selected-value-set": s(le),
522
+ "is-all-checked": s(De),
523
+ "is-indeterminate": s(Ie),
524
+ "all-checked": Ye.value,
525
+ "scroll-to-group-value": $.value,
526
+ "group-checked-map": Qe.value,
527
+ "group-indeterminate-map": Xe.value,
514
528
  "paste-search": c.pasteSearch,
515
529
  separator: c.separator,
516
530
  "middle-placeholder": c.middlePlaceholder,
517
531
  "show-multiple": c.showMultiple,
518
- "onUpdate:keyword": el,
519
- onAllCheck: rl,
520
- onCheckAll: il,
521
- onGroupCheck: sl,
522
- onOptionCheck: ul,
523
- onOptionsCheck: ae,
524
- onSelectCreatedOptions: Pe
532
+ "onUpdate:keyword": ol,
533
+ onAllCheck: cl,
534
+ onCheckAll: dl,
535
+ onGroupCheck: pl,
536
+ onOptionCheck: fl,
537
+ onOptionsCheck: re,
538
+ onSelectCreatedOptions: Re
525
539
  }, null, 8, ["allow-create", "prefix-cls", "multiple", "keyword", "rows", "disabled", "show-all", "selected-value-set", "is-all-checked", "is-indeterminate", "all-checked", "scroll-to-group-value", "group-checked-map", "group-indeterminate-map", "paste-search", "separator", "middle-placeholder", "show-multiple"]),
526
- t.multiple ? (w(), se(Bl, {
540
+ t.multiple ? (y(), de(Kl, {
527
541
  key: 1,
528
542
  "prefix-cls": s(d),
529
543
  multiple: c.multiple,
530
- disabled: z.value,
531
- "selected-options": s(Re),
532
- onClearAll: dl,
533
- onRemove: cl
534
- }, null, 8, ["prefix-cls", "multiple", "disabled", "selected-options"])) : B("", !0)
544
+ disabled: H.value,
545
+ "selected-options": s(Ge),
546
+ onClearAll: ml,
547
+ onRemove: hl
548
+ }, null, 8, ["prefix-cls", "multiple", "disabled", "selected-options"])) : T("", !0)
535
549
  ], 6)), [
536
- [s(fe), s(D)]
550
+ [s(ve), s(W)]
537
551
  ])
538
552
  ]),
539
553
  _: 1
540
554
  }, 16, ["modelValue", "multiple", "placeholder", "disabled", "popper-class"])
541
- ], 2));
555
+ ], 34));
542
556
  }
543
557
  });
544
558
  export {
545
- ht as default
559
+ Ct as default
546
560
  };