@dazhicheng/ui 1.6.79 → 1.6.81

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