@dazhicheng/ui 1.6.80 → 1.6.82

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