@dazhicheng/ui 1.6.81 → 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.
@@ -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,115 +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(
151
- a,
152
- l,
153
- t.options || [],
154
- (n) => e(n)
155
- );
153
+ const a = K();
154
+ $l(a, l, t.options || []).length && await Nl(a, l, t.options || [], (n) => e(n));
156
155
  }, 64);
157
- b(
156
+ x(
158
157
  [r, () => t.options, () => t.showAllField, () => t.missingEchoKey],
159
158
  () => {
160
- t.resolveMissingOptions && Se();
159
+ t.resolveMissingOptions && Ve();
161
160
  },
162
161
  { immediate: !0, deep: !0 }
163
162
  );
164
- function H(e) {
163
+ function q(e) {
165
164
  if (e != null)
166
165
  return typeof e == "object" && "value" in e ? e.value : e;
167
166
  }
168
- const J = i({
167
+ const Q = i({
169
168
  get() {
170
169
  return Array.isArray(r.value) ? t.multiple ? r.value : r.value.slice(-1) : r.value === void 0 ? [] : [r.value];
171
170
  },
172
171
  set(e) {
173
172
  r.value = t.multiple ? [...e] : e.at(-1);
174
173
  }
175
- }), M = i(() => {
174
+ }), E = i(() => {
176
175
  if (!t.allowCreate) return [];
177
176
  const e = new Set(f.value.map((a) => a.value)), l = [];
178
- return new Set(J.value).forEach((a) => {
179
- !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 } });
180
179
  }), l;
181
- }), V = i(() => [...f.value, ...M.value]);
182
- b([() => t.multiple, () => r.value], ([e, l]) => {
180
+ }), P = i(() => [...f.value, ...E.value]);
181
+ x([() => t.multiple, () => r.value], ([e, l]) => {
183
182
  if (e) {
184
183
  Array.isArray(l) || (r.value = l === void 0 ? [] : [l]);
185
184
  return;
186
185
  }
187
186
  Array.isArray(l) && (r.value = l.at(-1));
188
187
  });
189
- const E = g(), y = g(""), p = g(""), F = g(), P = L("middleRef"), A = L("selectWrapRef"), q = L("selectRef"), $ = g(0);
190
- 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() {
191
190
  const e = A.value;
192
- e && ($.value = e.offsetWidth);
191
+ e && (L.value = e.offsetWidth);
193
192
  }
194
- Fl(A, () => Q());
195
- const Oe = i(() => ({
193
+ Rl(A, () => Y());
194
+ const Ee = i(() => ({
196
195
  componentProps: {
197
196
  multiple: t.multiple,
198
197
  component: {
@@ -201,135 +200,144 @@ const m = 4, ht = /* @__PURE__ */ fl({
201
200
  },
202
201
  component: "TtPanelSelect",
203
202
  selectWrapRef: A,
204
- selectRef: q
205
- })), { selectComponentProps: Me } = Pl(Oe), X = i(() => {
206
- const e = y.value.trim().toLowerCase();
207
- 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;
208
216
  const l = (a) => {
209
217
  const o = [];
210
218
  return a.forEach((n) => {
211
- var oe;
212
- 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;
213
221
  (String(n.label).toLowerCase().includes(e) || u && u.length) && o.push({ ...n, children: u != null && u.length ? u : void 0 });
214
222
  }), o;
215
223
  };
216
- return l(K.value);
217
- }), Ve = i(() => {
224
+ return l(U.value);
225
+ }), $e = i(() => {
218
226
  const e = [], l = (a) => {
219
227
  a.forEach((o) => {
220
228
  var n;
221
229
  e.push(o.value), (n = o.children) != null && n.length && l(o.children);
222
230
  });
223
231
  };
224
- return l(X.value), e;
232
+ return l(ee.value), e;
225
233
  }), C = i(
226
- () => Fe(p.value).map((e) => ({
234
+ () => Le(p.value).map((e) => ({
227
235
  label: e,
228
236
  value: e,
229
237
  level: 0,
230
238
  path: [],
231
239
  raw: { label: e, value: e }
232
240
  }))
233
- ), Ee = i(() => [...V.value, ...C.value]), k = i(() => {
234
- 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);
235
243
  if (!l.length) return e;
236
244
  const a = new Map(l.map((u) => [u.value, u])), o = [];
237
- T(p.value, t.separator).forEach((u) => {
238
- const N = a.get(u);
239
- 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));
240
248
  }), o.push(...a.values());
241
249
  let n = "__created__";
242
250
  for (; e.some((u) => u.value === n); ) n += "_";
243
251
  return [{ value: n, label: "自定义", options: o }, ...e];
244
252
  });
245
- function Fe(e) {
246
- if (!t.allowCreate || t.disabled || D.value || t.api && !W.value) return [];
247
- const l = T(e, t.separator);
248
- if (!l.length || U(f.value, e).length) return [];
249
- 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}`));
250
258
  return [...new Set(l)].filter((o) => o !== `${t.showAllField}` && !a.has(o));
251
259
  }
252
- function Pe() {
260
+ function Re() {
253
261
  if (!C.value.length) return;
254
262
  const e = new Set(
255
- [...M.value, ...C.value].map((a) => a.value)
256
- ), 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(
257
265
  (a) => e.has(a)
258
266
  );
259
- ae(l, !0);
267
+ re(l, !0);
260
268
  }
261
- const $e = i(() => {
269
+ const Be = i(() => {
262
270
  const e = "minmax(var(--tt-panel-select-middle-width, 450px), 1fr)";
263
271
  return t.showNav && !t.multiple ? `200px ${e}` : !t.showNav && t.multiple ? `${e} 180px` : !t.showNav && !t.multiple ? e : `200px ${e} 180px`;
264
- }), Ne = i(() => {
272
+ }), _e = i(() => {
265
273
  const e = "var(--tt-panel-select-middle-width, 450px)";
266
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)`;
267
- }), Le = i(() => {
275
+ }), Te = i(() => {
268
276
  const e = [];
269
277
  return k.value.forEach((l) => {
270
278
  !(t.showOriginMode && l.value === "__origin__") && e.push({ key: `group-${String(l.value)}`, type: "group", group: l });
271
- const o = Math.ceil(l.options.length / m);
272
- for (let n = 0; n < l.options.length; n += m) {
273
- 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;
274
282
  e.push({
275
- key: `options-${String(l.value)}-${n / m}`,
283
+ key: `options-${String(l.value)}-${n / v}`,
276
284
  type: "options",
277
285
  group: l,
278
- options: l.options.slice(n, n + m),
286
+ options: l.options.slice(n, n + v),
279
287
  isLast: u === o - 1
280
288
  });
281
289
  }
282
290
  }), e;
283
291
  }), {
284
- selectedOptions: Re,
285
- selectedValueSet: Y,
286
- isAllChecked: Be,
287
- isIndeterminate: _e,
288
- getGroupCheckCount: Te,
289
- handleGroupCheck: Ge,
290
- handleAllOptionCheck: De,
291
- handleOptionCheck: Ke,
292
- handleOptionsCheck: We,
293
- handleCheckAll: Ue,
294
- clearSelected: Ie,
295
- removeSelected: ze,
296
- withLockedSelectedValues: je
297
- } = 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({
298
306
  multiple: i(() => t.multiple),
299
307
  modelValue: r,
300
- selectedValues: J,
301
- leafNodes: Ee,
308
+ selectedValues: Q,
309
+ leafNodes: Ne,
302
310
  allValue: i(() => t.showAllField)
303
- }), Z = i({
311
+ }), te = i({
304
312
  get() {
305
313
  if (t.multiple)
306
- 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));
307
315
  if (Array.isArray(r.value)) {
308
316
  const e = r.value.at(-1);
309
- return e === void 0 ? void 0 : O(e);
317
+ return e === void 0 ? void 0 : V(e);
310
318
  }
311
- return r.value === void 0 ? void 0 : O(r.value);
319
+ return r.value === void 0 ? void 0 : V(r.value);
312
320
  },
313
321
  set(e) {
314
322
  const l = s(r);
315
- if (I = Array.isArray(l) ? [...l] : l, t.multiple) {
316
- const o = (Array.isArray(e) ? e : []).map((n) => H(n)).filter((n) => n !== void 0);
317
- 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);
318
326
  return;
319
327
  }
320
- r.value = H(e);
328
+ r.value = q(e);
321
329
  }
322
- }), ee = i(
330
+ }), ae = i(
323
331
  () => {
324
332
  const e = {}, l = {};
325
333
  return k.value.forEach((a) => {
326
- const { enabledCount: o, checkedCount: n } = Te(a), u = String(a.value);
334
+ const { enabledCount: o, checkedCount: n } = Ke(a), u = String(a.value);
327
335
  e[u] = o > 0 && n === o, l[u] = o > 0 && n > 0 && n < o;
328
336
  }), { checkedMap: e, indeterminateMap: l };
329
337
  }
330
- ), 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 }))]);
331
- function Qe(e) {
332
- 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);
333
341
  if (Array.isArray(e)) {
334
342
  const a = new Set(e);
335
343
  return l.filter((o) => o.value !== void 0 && a.has(o.value));
@@ -337,215 +345,216 @@ const m = 4, ht = /* @__PURE__ */ fl({
337
345
  if (e !== void 0)
338
346
  return l.find((a) => a.value === e);
339
347
  }
340
- function Xe(e) {
348
+ function ll(e) {
341
349
  var a;
342
350
  if (t.showPinyinMode || k.value.some((o) => o.value === e.value)) return e.value;
343
351
  const l = f.value.find((o) => o.path.some((n) => n.value === e.value));
344
352
  return (a = l == null ? void 0 : l.path.at(-2)) == null ? void 0 : a.value;
345
353
  }
346
- function Ye(e) {
347
- E.value = e.value;
348
- const l = Xe(e);
349
- F.value = void 0, _(() => {
354
+ function tl(e) {
355
+ F.value = e.value;
356
+ const l = ll(e);
357
+ $.value = void 0, G(() => {
350
358
  var a;
351
- 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));
352
360
  });
353
361
  }
354
- function Ze(e) {
355
- y.value = e;
362
+ function al(e) {
363
+ w.value = e;
356
364
  }
357
- function el(e) {
365
+ function ol(e) {
358
366
  p.value = e;
359
367
  }
360
- function ll(e, l) {
368
+ function nl(e, l) {
361
369
  const a = k.value.find((o) => o.value === e);
362
- a && Ge(a, l);
370
+ a && We(a, l);
363
371
  }
364
- async function tl(e) {
372
+ async function rl(e) {
365
373
  var l;
366
- 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());
367
375
  }
368
- function al() {
369
- te(I);
376
+ function il() {
377
+ ne(j);
370
378
  }
371
- function ol(e) {
372
- S("change", e, [...s(le)], Qe(e));
379
+ function sl(e) {
380
+ b("change", e, [...s(oe)], el(e));
373
381
  }
374
- function nl(e, l) {
382
+ function ul(e, l) {
375
383
  return Array.isArray(e) && Array.isArray(l) ? e.length === l.length && e.every((a, o) => a === l[o]) : e === l;
376
384
  }
377
- function te(e) {
378
- _(() => {
385
+ function ne(e) {
386
+ G(() => {
379
387
  const l = s(r);
380
- nl(l, e) || ol(l);
388
+ ul(l, e) || sl(l);
381
389
  });
382
390
  }
383
391
  function h(e) {
384
392
  const l = s(r), a = Array.isArray(l) ? [...l] : l;
385
- e(), te(a);
393
+ e(), ne(a);
386
394
  }
387
- function rl(e) {
395
+ function cl(e) {
388
396
  h(() => {
389
- De(e);
397
+ Ue(e);
390
398
  });
391
399
  }
392
- function il(e) {
400
+ function dl(e) {
393
401
  h(() => {
394
- Ue(e);
402
+ je(e);
395
403
  });
396
404
  }
397
- function sl(e, l) {
405
+ function pl(e, l) {
398
406
  h(() => {
399
- ll(e, l);
407
+ nl(e, l);
400
408
  });
401
409
  }
402
- function ul(e, l) {
410
+ function fl(e, l) {
403
411
  h(() => {
404
- Ke(e, l);
412
+ Ze(e, l);
405
413
  });
406
414
  }
407
- function ae(e, l) {
415
+ function re(e, l) {
408
416
  h(() => {
409
- We(e, l);
417
+ ze(e, l);
410
418
  });
411
419
  }
412
- function cl(e) {
420
+ function hl(e) {
413
421
  h(() => {
414
- ze(e);
422
+ Je(e);
415
423
  });
416
424
  }
417
- function dl() {
425
+ function ml() {
418
426
  h(() => {
419
- Ie();
427
+ He();
420
428
  });
421
429
  }
422
- function pl(e) {
423
- S("focus", e);
430
+ function vl(e) {
431
+ M(), b("focus", e);
424
432
  }
425
- return b(
433
+ return x(
426
434
  () => t.params,
427
435
  () => {
428
- v();
436
+ g();
429
437
  },
430
438
  { deep: !0 }
431
- ), b(
432
- Ae,
439
+ ), x(
440
+ xe,
433
441
  (e) => {
434
442
  var l;
435
- 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);
436
444
  },
437
445
  { immediate: !0 }
438
- ), ml(() => {
439
- t.immediate && v();
440
- }), de({
446
+ ), wl(() => {
447
+ t.immediate && g();
448
+ }), he({
441
449
  /** 重新加载数据源*/
442
- reload: v,
450
+ reload: g,
443
451
  /** 获取当前归一化后的树形选项数据 */
444
- getOptions: () => s(ye),
452
+ getOptions: () => s(ke),
445
453
  /** 获取当前v-model值 */
446
454
  getValue: () => s(r)
447
- }), (e, l) => (w(), R("div", {
455
+ }), (e, l) => (y(), _("div", {
448
456
  ref_key: "selectWrapRef",
449
457
  ref: A,
450
- class: x(s(d))
458
+ class: S(s(d)),
459
+ onPointerdownCapture: M
451
460
  }, [
452
- re(s(he), vl({
461
+ ue(s(ge), Al({
453
462
  ref_key: "selectRef",
454
- ref: q,
455
- modelValue: Z.value,
456
- "onUpdate:modelValue": l[0] || (l[0] = (a) => Z.value = a)
457
- }, s(Me), {
463
+ ref: X,
464
+ modelValue: te.value,
465
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => te.value = a)
466
+ }, Fe.value, {
458
467
  multiple: c.multiple,
459
468
  filterable: !1,
460
- placeholder: ke.value,
469
+ placeholder: be.value,
461
470
  persistent: !1,
462
471
  "fallback-placements": ["bottom-start", "bottom-end", "bottom", "top-start", "top-end", "top", "right", "left"],
463
472
  disabled: c.disabled,
464
473
  "popper-class": `${s(d)}__popper vxe-table--ignore-clear`,
465
- onVisibleChange: tl,
466
- onChange: al,
467
- onFocus: pl
474
+ onVisibleChange: rl,
475
+ onChange: il,
476
+ onFocus: vl
468
477
  }), {
469
- label: ie(({ label: a, value: o }) => [
470
- ue("span", {
471
- class: x(`${s(d)}__trigger-label`)
478
+ label: ce(({ label: a, value: o }) => [
479
+ pe("span", {
480
+ class: S(`${s(d)}__trigger-label`)
472
481
  }, [
473
- ue("span", null, yl(a), 1),
474
- xe(o) ? (w(), R("span", {
482
+ pe("span", null, xl(a), 1),
483
+ Me(o) ? (y(), _("span", {
475
484
  key: 0,
476
- class: x(`${s(d)}__deleted-mark`)
477
- }, "删", 2)) : B("", !0)
485
+ class: S(`${s(d)}__deleted-mark`)
486
+ }, "删", 2)) : T("", !0)
478
487
  ], 2)
479
488
  ]),
480
- empty: ie(() => [
481
- gl((w(), R("div", {
489
+ empty: ce(() => [
490
+ Cl((y(), _("div", {
482
491
  "element-loading-text": "加载中",
483
- class: x(`${s(d)}__panel`),
484
- style: wl({
485
- "--columns": $e.value,
486
- "--panel-min-width": Ne.value,
487
- "--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%"
488
497
  })
489
498
  }, [
490
- t.showNav ? (w(), se(Ll, {
499
+ t.showNav ? (y(), de(Dl, {
491
500
  key: 0,
492
501
  "prefix-cls": s(d),
493
- keyword: y.value,
494
- "tree-data": X.value,
495
- "expanded-keys": Ve.value,
502
+ keyword: w.value,
503
+ "tree-data": ee.value,
504
+ "expanded-keys": $e.value,
496
505
  "left-placeholder": c.leftPlaceholder,
497
- "onUpdate:keyword": Ze,
498
- onSelect: Ye
499
- }, null, 8, ["prefix-cls", "keyword", "tree-data", "expanded-keys", "left-placeholder"])) : B("", !0),
500
- 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, {
501
510
  ref_key: "middleRef",
502
- ref: P,
511
+ ref: N,
503
512
  "allow-create": t.allowCreate,
504
513
  "prefix-cls": s(d),
505
514
  multiple: c.multiple,
506
515
  keyword: p.value,
507
- rows: Le.value,
508
- disabled: z.value,
516
+ rows: Te.value,
517
+ disabled: H.value,
509
518
  "show-all": t.showAll,
510
- "option-per-row": m,
519
+ "option-per-row": v,
511
520
  "row-height": 40,
512
- "selected-value-set": s(Y),
513
- "is-all-checked": s(Be),
514
- "is-indeterminate": s(_e),
515
- "all-checked": qe.value,
516
- "scroll-to-group-value": F.value,
517
- "group-checked-map": He.value,
518
- "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,
519
528
  "paste-search": c.pasteSearch,
520
529
  separator: c.separator,
521
530
  "middle-placeholder": c.middlePlaceholder,
522
531
  "show-multiple": c.showMultiple,
523
- "onUpdate:keyword": el,
524
- onAllCheck: rl,
525
- onCheckAll: il,
526
- onGroupCheck: sl,
527
- onOptionCheck: ul,
528
- onOptionsCheck: ae,
529
- onSelectCreatedOptions: Pe
532
+ "onUpdate:keyword": ol,
533
+ onAllCheck: cl,
534
+ onCheckAll: dl,
535
+ onGroupCheck: pl,
536
+ onOptionCheck: fl,
537
+ onOptionsCheck: re,
538
+ onSelectCreatedOptions: Re
530
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"]),
531
- t.multiple ? (w(), se(Bl, {
540
+ t.multiple ? (y(), de(Kl, {
532
541
  key: 1,
533
542
  "prefix-cls": s(d),
534
543
  multiple: c.multiple,
535
- disabled: z.value,
536
- "selected-options": s(Re),
537
- onClearAll: dl,
538
- onRemove: cl
539
- }, 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)
540
549
  ], 6)), [
541
- [s(fe), s(D)]
550
+ [s(ve), s(W)]
542
551
  ])
543
552
  ]),
544
553
  _: 1
545
554
  }, 16, ["modelValue", "multiple", "placeholder", "disabled", "popper-class"])
546
- ], 2));
555
+ ], 34));
547
556
  }
548
557
  });
549
558
  export {
550
- ht as default
559
+ Ct as default
551
560
  };