@dazhicheng/ui 1.6.9 → 1.6.10

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,4 +1,4 @@
1
- import { defineComponent as ze, mergeModels as K, useModel as je, computed as s, watch as S, ref as h, useTemplateRef as V, unref as r, onMounted as qe, createElementBlock as U, openBlock as k, normalizeClass as z, createVNode as j, mergeProps as He, withCtx as Je, withDirectives as Qe, normalizeStyle as Xe, createBlock as q, createCommentVNode as H, nextTick as O } from "vue";
1
+ import { defineComponent as ze, mergeModels as I, useModel as je, computed as s, watch as V, ref as h, useTemplateRef as O, unref as i, onMounted as qe, createElementBlock as z, openBlock as g, normalizeClass as j, createVNode as q, mergeProps as He, withCtx as Je, withDirectives as Qe, normalizeStyle as Xe, createBlock as H, createCommentVNode as J, nextTick as M } from "vue";
2
2
  import "../../../node_modules/.pnpm/vue-types@5.1.3_vue@3.5.21_typescript@5.9.3_/node_modules/vue-types/shim/index.modern.js";
3
3
  import { useDesign as Ye } from "../../../packages/hooks/src/useDesign.js";
4
4
  import "axios";
@@ -17,17 +17,17 @@ import "lodash-es";
17
17
  import "vue-router";
18
18
  import { useResizeObserver as ll } from "@vueuse/core";
19
19
  import { useSelectCollapseOptions as tl } from "../../tt-form/src/hooks/useSelectCollapse.js";
20
- import { ALL as al } from "./common.js";
21
- import ol from "./components/PanelLeft.vue.js";
22
- import nl from "./components/PanelMiddle.vue.js";
23
- import rl from "./components/PanelRight.vue.js";
24
- import { usePanelSelectData as il } from "./hooks/usePanelData.js";
25
- import { usePanelSelectSelection as sl } from "./hooks/usePanelSelection.js";
20
+ import { ALL as al, DEFAULT_PANEL_SELECT_SEPARATORS as ol } from "./common.js";
21
+ import nl from "./components/PanelLeft.vue.js";
22
+ import rl from "./components/PanelMiddle.vue.js";
23
+ import il from "./components/PanelRight.vue.js";
24
+ import { usePanelSelectData as sl } from "./hooks/usePanelData.js";
25
+ import { usePanelSelectSelection as ul } from "./hooks/usePanelSelection.js";
26
26
  /* empty css */
27
- const p = 4, El = /* @__PURE__ */ ze({
27
+ const p = 4, Tl = /* @__PURE__ */ ze({
28
28
  name: "TtPanelSelect",
29
29
  __name: "index",
30
- props: /* @__PURE__ */ K({
30
+ props: /* @__PURE__ */ I({
31
31
  disabled: { type: Boolean, default: !1 },
32
32
  showNav: { type: Boolean, default: !0 },
33
33
  multiple: { type: Boolean, default: !0 },
@@ -47,7 +47,7 @@ const p = 4, El = /* @__PURE__ */ ze({
47
47
  immediate: { type: Boolean, default: !0 },
48
48
  beforeFetch: { type: Function, default: void 0 },
49
49
  afterFetch: { type: Function, default: void 0 },
50
- separator: { default: "," },
50
+ separator: { default: () => [...ol] },
51
51
  pasteSearch: { type: Boolean, default: !0 },
52
52
  alwaysLoad: { type: Boolean, default: !1 },
53
53
  showAll: { type: Boolean, default: !0 },
@@ -61,52 +61,52 @@ const p = 4, El = /* @__PURE__ */ ze({
61
61
  modelValue: {},
62
62
  modelModifiers: {}
63
63
  }),
64
- emits: /* @__PURE__ */ K(["visible-change", "change"], ["update:modelValue"]),
65
- setup(M, { expose: J, emit: Q }) {
66
- const X = el, Y = Ze, t = M, $ = Q, { prefixCls: c } = Ye("panel-select"), {
67
- loading: Z,
64
+ emits: /* @__PURE__ */ I(["visible-change", "change"], ["update:modelValue"]),
65
+ setup(E, { expose: Q, emit: X }) {
66
+ const Y = el, Z = Ze, t = E, F = X, { prefixCls: c } = Ye("panel-select"), {
67
+ loading: ee,
68
68
  fetchApi: m,
69
- treeOptions: ee,
70
- navTreeOptions: F,
71
- navNodes: le,
69
+ treeOptions: le,
70
+ navTreeOptions: R,
71
+ navNodes: te,
72
72
  leafNodes: f,
73
- isFirstLoaded: te,
74
- buildOptionGroups: ae
75
- } = il(t), a = je(M, "modelValue");
76
- let R;
77
- const B = s(() => t.disabled), oe = s(() => {
73
+ isFirstLoaded: ae,
74
+ buildOptionGroups: oe
75
+ } = sl(t), r = je(E, "modelValue");
76
+ let L;
77
+ const P = s(() => t.disabled), ne = s(() => {
78
78
  const e = /* @__PURE__ */ new Map();
79
79
  return f.value.forEach((l) => e.set(l.value, l.label)), e;
80
80
  });
81
- function A(e) {
82
- return e === t.showAllField ? { label: "全部", value: t.showAllField } : { label: oe.value.get(e) ?? String(e), value: e };
81
+ function k(e) {
82
+ return e === t.showAllField ? { label: "全部", value: t.showAllField } : { label: ne.value.get(e) ?? String(e), value: e };
83
83
  }
84
- function N(e) {
84
+ function $(e) {
85
85
  if (e != null)
86
86
  return typeof e == "object" && "value" in e ? e.value : e;
87
87
  }
88
- const P = s({
88
+ const re = s({
89
89
  get() {
90
- return Array.isArray(a.value) ? t.multiple ? a.value : a.value.slice(-1) : a.value === void 0 ? [] : [a.value];
90
+ return Array.isArray(r.value) ? t.multiple ? r.value : r.value.slice(-1) : r.value === void 0 ? [] : [r.value];
91
91
  },
92
92
  set(e) {
93
- a.value = t.multiple ? [...e] : e.at(-1);
93
+ r.value = t.multiple ? [...e] : e.at(-1);
94
94
  }
95
95
  });
96
- S([() => t.multiple, () => a.value], ([e, l]) => {
96
+ V([() => t.multiple, () => r.value], ([e, l]) => {
97
97
  if (e) {
98
- Array.isArray(l) || (a.value = l === void 0 ? [] : [l]);
98
+ Array.isArray(l) || (r.value = l === void 0 ? [] : [l]);
99
99
  return;
100
100
  }
101
- Array.isArray(l) && (a.value = l.at(-1));
101
+ Array.isArray(l) && (r.value = l.at(-1));
102
102
  });
103
- const C = h(), v = h(""), y = h(""), b = h(), L = V("middleRef"), w = V("selectWrapRef"), E = V("selectRef"), x = h(0);
104
- function G() {
103
+ const A = h(), v = h(""), y = h(""), C = h(), b = O("middleRef"), w = O("selectWrapRef"), N = O("selectRef"), S = h(0);
104
+ function B() {
105
105
  const e = w.value;
106
- e && (x.value = e.offsetWidth);
106
+ e && (S.value = e.offsetWidth);
107
107
  }
108
- ll(w, () => G());
109
- const ne = s(() => ({
108
+ ll(w, () => B());
109
+ const ie = s(() => ({
110
110
  componentProps: {
111
111
  multiple: t.multiple,
112
112
  component: {
@@ -115,56 +115,55 @@ const p = 4, El = /* @__PURE__ */ ze({
115
115
  },
116
116
  component: "TtPanelSelect",
117
117
  selectWrapRef: w,
118
- selectRef: E
119
- })), { selectComponentProps: re } = tl(ne), T = s(() => {
118
+ selectRef: N
119
+ })), { selectComponentProps: se } = tl(ie), T = s(() => {
120
120
  const e = v.value.trim().toLowerCase();
121
- if (!e) return F.value;
122
- const l = (o) => {
123
- const i = [];
124
- return o.forEach((n) => {
125
- var I;
126
- const u = (I = n.children) != null && I.length ? l(n.children) : void 0;
127
- (String(n.label).toLowerCase().includes(e) || u && u.length) && i.push({ ...n, children: u != null && u.length ? u : void 0 });
128
- }), i;
121
+ if (!e) return R.value;
122
+ const l = (a) => {
123
+ const n = [];
124
+ return a.forEach((o) => {
125
+ var U;
126
+ const u = (U = o.children) != null && U.length ? l(o.children) : void 0;
127
+ (String(o.label).toLowerCase().includes(e) || u && u.length) && n.push({ ...o, children: u != null && u.length ? u : void 0 });
128
+ }), n;
129
129
  };
130
- return l(F.value);
131
- }), ie = s(() => {
132
- const e = [], l = (o) => {
133
- o.forEach((i) => {
134
- var n;
135
- e.push(i.value), (n = i.children) != null && n.length && l(i.children);
130
+ return l(R.value);
131
+ }), ue = s(() => {
132
+ const e = [], l = (a) => {
133
+ a.forEach((n) => {
134
+ var o;
135
+ e.push(n.value), (o = n.children) != null && o.length && l(n.children);
136
136
  });
137
137
  };
138
138
  return l(T.value), e;
139
- }), g = s(() => ae(f.value, y.value)), se = s(() => {
139
+ }), x = s(() => oe(f.value, y.value)), de = s(() => {
140
140
  const e = "minmax(var(--tt-panel-select-middle-width, 450px), 1fr)";
141
141
  return t.showNav && !t.multiple ? `200px ${e}` : !t.showNav && t.multiple ? `${e} 180px` : !t.showNav && !t.multiple ? e : `200px ${e} 180px`;
142
- }), ue = s(() => {
142
+ }), ce = s(() => {
143
143
  const e = "var(--tt-panel-select-middle-width, 450px)";
144
144
  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)`;
145
- }), de = s(() => {
145
+ }), pe = s(() => {
146
146
  const e = [];
147
- return g.value.forEach((l) => {
147
+ return x.value.forEach((l) => {
148
148
  !(t.showOriginMode && l.value === "__origin__") && e.push({ key: `group-${String(l.value)}`, type: "group", group: l });
149
- const i = Math.ceil(l.options.length / p);
150
- for (let n = 0; n < l.options.length; n += p) {
151
- const u = n / p;
149
+ const n = Math.ceil(l.options.length / p);
150
+ for (let o = 0; o < l.options.length; o += p) {
151
+ const u = o / p;
152
152
  e.push({
153
- key: `options-${String(l.value)}-${n / p}`,
153
+ key: `options-${String(l.value)}-${o / p}`,
154
154
  type: "options",
155
155
  group: l,
156
- options: l.options.slice(n, n + p),
157
- isLast: u === i - 1
156
+ options: l.options.slice(o, o + p),
157
+ isLast: u === n - 1
158
158
  });
159
159
  }
160
160
  }), e;
161
161
  }), {
162
- selectedOptions: ce,
163
- selectedValueSet: pe,
164
- isAllChecked: me,
165
- isIndeterminate: fe,
166
- isGroupChecked: he,
167
- isGroupIndeterminate: ve,
162
+ selectedOptions: me,
163
+ selectedValueSet: _,
164
+ isAllChecked: fe,
165
+ isIndeterminate: he,
166
+ getGroupCheckCount: ve,
168
167
  handleGroupCheck: ye,
169
168
  handleAllOptionCheck: we,
170
169
  handleOptionCheck: ge,
@@ -172,110 +171,113 @@ const p = 4, El = /* @__PURE__ */ ze({
172
171
  handleCheckAll: Ae,
173
172
  clearSelected: Ce,
174
173
  removeSelected: be,
175
- withLockedSelectedValues: xe
176
- } = sl({
174
+ withLockedSelectedValues: Se
175
+ } = ul({
177
176
  multiple: s(() => t.multiple),
178
- modelValue: a,
179
- selectedValues: P,
177
+ modelValue: r,
178
+ selectedValues: re,
180
179
  leafNodes: f,
181
180
  allValue: s(() => t.showAllField)
182
- }), _ = s({
181
+ }), G = s({
183
182
  get() {
184
183
  if (t.multiple)
185
- return (Array.isArray(a.value) ? a.value : a.value === void 0 ? [] : [a.value]).map((l) => A(l));
186
- if (Array.isArray(a.value)) {
187
- const e = a.value.at(-1);
188
- return e === void 0 ? void 0 : A(e);
184
+ return (Array.isArray(r.value) ? r.value : r.value === void 0 ? [] : [r.value]).map((l) => k(l));
185
+ if (Array.isArray(r.value)) {
186
+ const e = r.value.at(-1);
187
+ return e === void 0 ? void 0 : k(e);
189
188
  }
190
- return a.value === void 0 ? void 0 : A(a.value);
189
+ return r.value === void 0 ? void 0 : k(r.value);
191
190
  },
192
191
  set(e) {
193
- const l = r(a);
194
- if (R = Array.isArray(l) ? [...l] : l, t.multiple) {
195
- const i = (Array.isArray(e) ? e : []).map((n) => N(n)).filter((n) => n !== void 0);
196
- a.value = xe(i);
192
+ const l = i(r);
193
+ if (L = Array.isArray(l) ? [...l] : l, t.multiple) {
194
+ const n = (Array.isArray(e) ? e : []).map((o) => $(o)).filter((o) => o !== void 0);
195
+ r.value = Se(n);
197
196
  return;
198
197
  }
199
- a.value = N(e);
198
+ r.value = $(e);
200
199
  }
201
- }), Se = s(() => g.value.reduce(
202
- (e, l) => (e[String(l.value)] = he(l), e),
203
- {}
204
- )), Ve = s(() => g.value.reduce(
205
- (e, l) => (e[String(l.value)] = ve(l), e),
206
- {}
207
- )), Oe = s(() => pe.value.has(t.showAllField)), W = s(() => [...t.showAll ? [{ label: "全部", value: t.showAllField }] : [], ...f.value.map((l) => ({ ...l }))]);
200
+ }), W = s(
201
+ () => {
202
+ const e = {}, l = {};
203
+ return x.value.forEach((a) => {
204
+ const { enabledCount: n, checkedCount: o } = ve(a), u = String(a.value);
205
+ e[u] = n > 0 && o === n, l[u] = n > 0 && o > 0 && o < n;
206
+ }), { checkedMap: e, indeterminateMap: l };
207
+ }
208
+ ), xe = s(() => W.value.checkedMap), Ve = s(() => W.value.indeterminateMap), Oe = s(() => _.value.has(t.showAllField)), D = s(() => [...t.showAll ? [{ label: "全部", value: t.showAllField }] : [], ...f.value.map((l) => ({ ...l }))]);
208
209
  function Me(e) {
209
- const l = r(W);
210
+ const l = i(D);
210
211
  if (Array.isArray(e)) {
211
- const o = new Set(e);
212
- return l.filter((i) => i.value !== void 0 && o.has(i.value));
212
+ const a = new Set(e);
213
+ return l.filter((n) => n.value !== void 0 && a.has(n.value));
213
214
  }
214
215
  if (e !== void 0)
215
- return l.find((o) => o.value === e);
216
+ return l.find((a) => a.value === e);
216
217
  }
217
- function $e(e) {
218
- var o, i;
219
- if (t.showPinyinMode || (o = e.children) != null && o.some((n) => {
218
+ function Ee(e) {
219
+ var a, n;
220
+ if (t.showPinyinMode || (a = e.children) != null && a.some((o) => {
220
221
  var u;
221
- return !((u = n.children) != null && u.length);
222
+ return !((u = o.children) != null && u.length);
222
223
  })) return e.value;
223
- const l = f.value.find((n) => n.path.some((u) => u.value === e.value));
224
- return (i = l == null ? void 0 : l.path.at(-2)) == null ? void 0 : i.value;
224
+ const l = f.value.find((o) => o.path.some((u) => u.value === e.value));
225
+ return (n = l == null ? void 0 : l.path.at(-2)) == null ? void 0 : n.value;
225
226
  }
226
227
  function Fe(e) {
227
- C.value = e.value;
228
- const l = $e(e);
229
- b.value = void 0, O(() => {
230
- var o;
231
- b.value = l, l !== void 0 && ((o = L.value) == null || o.scrollToGroup(l));
228
+ A.value = e.value;
229
+ const l = Ee(e);
230
+ C.value = void 0, M(() => {
231
+ var a;
232
+ C.value = l, l !== void 0 && ((a = b.value) == null || a.scrollToGroup(l));
232
233
  });
233
234
  }
234
235
  function Re(e) {
235
236
  v.value = e;
236
237
  }
237
- function Be(e) {
238
+ function Le(e) {
238
239
  y.value = e;
239
240
  }
240
- function Ne(e, l) {
241
- const o = g.value.find((i) => i.value === e);
242
- o && ye(o, l);
241
+ function Pe(e, l) {
242
+ const a = x.value.find((n) => n.value === e);
243
+ a && ye(a, l);
243
244
  }
244
- async function Pe(e) {
245
- $("visible-change", e), e && (y.value = "", v.value = "", await O(), G(), t.alwaysLoad ? await m() : !t.immediate && !r(te) && await m());
245
+ async function $e(e) {
246
+ var l;
247
+ F("visible-change", e), e && (y.value = "", v.value = "", await M(), (l = b.value) == null || l.inputFocus(), B(), t.alwaysLoad ? await m() : !t.immediate && !i(ae) && await m());
246
248
  }
247
- function Le() {
248
- D(R);
249
+ function Ne() {
250
+ K(L);
249
251
  }
250
- function Ee(e) {
251
- $("change", e, [...r(W)], Me(e));
252
+ function Be(e) {
253
+ F("change", e, [...i(D)], Me(e));
252
254
  }
253
- function Ge(e, l) {
254
- return Array.isArray(e) && Array.isArray(l) ? e.length === l.length && e.every((o, i) => o === l[i]) : e === l;
255
+ function Te(e, l) {
256
+ return Array.isArray(e) && Array.isArray(l) ? e.length === l.length && e.every((a, n) => a === l[n]) : e === l;
255
257
  }
256
- function D(e) {
257
- O(() => {
258
- const l = r(a);
259
- Ge(l, e) || Ee(l);
258
+ function K(e) {
259
+ M(() => {
260
+ const l = i(r);
261
+ Te(l, e) || Be(l);
260
262
  });
261
263
  }
262
264
  function d(e) {
263
- const l = r(a), o = Array.isArray(l) ? [...l] : l;
264
- e(), D(o);
265
+ const l = i(r), a = Array.isArray(l) ? [...l] : l;
266
+ e(), K(a);
265
267
  }
266
- function Te(e) {
268
+ function _e(e) {
267
269
  d(() => {
268
270
  we(e);
269
271
  });
270
272
  }
271
- function _e(e) {
273
+ function Ge(e) {
272
274
  d(() => {
273
275
  Ae(e);
274
276
  });
275
277
  }
276
278
  function We(e, l) {
277
279
  d(() => {
278
- Ne(e, l);
280
+ Pe(e, l);
279
281
  });
280
282
  }
281
283
  function De(e, l) {
@@ -283,123 +285,123 @@ const p = 4, El = /* @__PURE__ */ ze({
283
285
  ge(e, l);
284
286
  });
285
287
  }
286
- function Ie(e, l) {
288
+ function Ke(e, l) {
287
289
  d(() => {
288
290
  ke(e, l);
289
291
  });
290
292
  }
291
- function Ke(e) {
293
+ function Ue(e) {
292
294
  d(() => {
293
295
  be(e);
294
296
  });
295
297
  }
296
- function Ue() {
298
+ function Ie() {
297
299
  d(() => {
298
300
  Ce();
299
301
  });
300
302
  }
301
- return S(
303
+ return V(
302
304
  () => t.params,
303
305
  () => {
304
306
  m();
305
307
  },
306
308
  { deep: !0 }
307
- ), S(
308
- le,
309
+ ), V(
310
+ te,
309
311
  (e) => {
310
312
  var l;
311
- C.value !== void 0 || !e.length || (C.value = (l = e[0]) == null ? void 0 : l.value);
313
+ A.value !== void 0 || !e.length || (A.value = (l = e[0]) == null ? void 0 : l.value);
312
314
  },
313
315
  { immediate: !0 }
314
316
  ), qe(() => {
315
317
  t.immediate && m();
316
- }), J({
318
+ }), Q({
317
319
  /** 重新加载数据源*/
318
320
  reload: m,
319
321
  /** 获取当前归一化后的树形选项数据 */
320
- getOptions: () => r(ee),
322
+ getOptions: () => i(le),
321
323
  /** 获取当前v-model值 */
322
- getValue: () => r(a)
323
- }), (e, l) => (k(), U("div", {
324
+ getValue: () => i(r)
325
+ }), (e, l) => (g(), z("div", {
324
326
  ref_key: "selectWrapRef",
325
327
  ref: w,
326
- class: z(r(c))
328
+ class: j(i(c))
327
329
  }, [
328
- j(r(Y), He({
330
+ q(i(Z), He({
329
331
  ref_key: "selectRef",
330
- ref: E,
331
- modelValue: _.value,
332
- "onUpdate:modelValue": l[0] || (l[0] = (o) => _.value = o)
333
- }, r(re), {
332
+ ref: N,
333
+ modelValue: G.value,
334
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => G.value = a)
335
+ }, i(se), {
334
336
  multiple: e.multiple,
335
337
  filterable: !1,
336
338
  placeholder: e.placeholder,
337
339
  persistent: !1,
338
340
  "fallback-placements": ["bottom-start", "bottom-end", "bottom", "top-start", "top-end", "top", "right", "left"],
339
341
  disabled: e.disabled,
340
- "popper-class": `${r(c)}__popper vxe-table--ignore-clear`,
341
- onVisibleChange: Pe,
342
- onChange: Le
342
+ "popper-class": `${i(c)}__popper vxe-table--ignore-clear`,
343
+ onVisibleChange: $e,
344
+ onChange: Ne
343
345
  }), {
344
346
  empty: Je(() => [
345
- Qe((k(), U("div", {
347
+ Qe((g(), z("div", {
346
348
  "element-loading-text": "加载中",
347
- class: z(`${r(c)}__panel`),
349
+ class: j(`${i(c)}__panel`),
348
350
  style: Xe({
349
- "--columns": se.value,
350
- "--panel-min-width": ue.value,
351
- "--panel-width": x.value ? `${x.value}px` : "100%"
351
+ "--columns": de.value,
352
+ "--panel-min-width": ce.value,
353
+ "--panel-width": S.value ? `${S.value}px` : "100%"
352
354
  })
353
355
  }, [
354
- t.showNav ? (k(), q(ol, {
356
+ t.showNav ? (g(), H(nl, {
355
357
  key: 0,
356
- "prefix-cls": r(c),
358
+ "prefix-cls": i(c),
357
359
  keyword: v.value,
358
360
  "tree-data": T.value,
359
- "expanded-keys": ie.value,
361
+ "expanded-keys": ue.value,
360
362
  "left-placeholder": e.leftPlaceholder,
361
363
  "onUpdate:keyword": Re,
362
364
  onSelect: Fe
363
- }, null, 8, ["prefix-cls", "keyword", "tree-data", "expanded-keys", "left-placeholder"])) : H("", !0),
364
- j(nl, {
365
+ }, null, 8, ["prefix-cls", "keyword", "tree-data", "expanded-keys", "left-placeholder"])) : J("", !0),
366
+ q(rl, {
365
367
  ref_key: "middleRef",
366
- ref: L,
367
- "prefix-cls": r(c),
368
+ ref: b,
369
+ "prefix-cls": i(c),
368
370
  multiple: e.multiple,
369
371
  keyword: y.value,
370
- rows: de.value,
371
- disabled: B.value,
372
+ rows: pe.value,
373
+ disabled: P.value,
372
374
  "show-all": t.showAll,
373
375
  "option-per-row": p,
374
376
  "row-height": 40,
375
- "selected-values": P.value,
376
- "is-all-checked": r(me),
377
- "is-indeterminate": r(fe),
377
+ "selected-value-set": i(_),
378
+ "is-all-checked": i(fe),
379
+ "is-indeterminate": i(he),
378
380
  "all-checked": Oe.value,
379
- "scroll-to-group-value": b.value,
380
- "group-checked-map": Se.value,
381
+ "scroll-to-group-value": C.value,
382
+ "group-checked-map": xe.value,
381
383
  "group-indeterminate-map": Ve.value,
382
384
  "paste-search": e.pasteSearch,
383
385
  separator: e.separator,
384
386
  "middle-placeholder": e.middlePlaceholder,
385
- "onUpdate:keyword": Be,
386
- onAllCheck: Te,
387
- onCheckAll: _e,
387
+ "onUpdate:keyword": Le,
388
+ onAllCheck: _e,
389
+ onCheckAll: Ge,
388
390
  onGroupCheck: We,
389
391
  onOptionCheck: De,
390
- onOptionsCheck: Ie
391
- }, null, 8, ["prefix-cls", "multiple", "keyword", "rows", "disabled", "show-all", "selected-values", "is-all-checked", "is-indeterminate", "all-checked", "scroll-to-group-value", "group-checked-map", "group-indeterminate-map", "paste-search", "separator", "middle-placeholder"]),
392
- t.multiple ? (k(), q(rl, {
392
+ onOptionsCheck: Ke
393
+ }, null, 8, ["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"]),
394
+ t.multiple ? (g(), H(il, {
393
395
  key: 1,
394
- "prefix-cls": r(c),
396
+ "prefix-cls": i(c),
395
397
  multiple: e.multiple,
396
- disabled: B.value,
397
- "selected-options": r(ce),
398
- onClearAll: Ue,
399
- onRemove: Ke
400
- }, null, 8, ["prefix-cls", "multiple", "disabled", "selected-options"])) : H("", !0)
398
+ disabled: P.value,
399
+ "selected-options": i(me),
400
+ onClearAll: Ie,
401
+ onRemove: Ue
402
+ }, null, 8, ["prefix-cls", "multiple", "disabled", "selected-options"])) : J("", !0)
401
403
  ], 6)), [
402
- [r(X), r(Z)]
404
+ [i(Y), i(ee)]
403
405
  ])
404
406
  ]),
405
407
  _: 1
@@ -408,5 +410,5 @@ const p = 4, El = /* @__PURE__ */ ze({
408
410
  }
409
411
  });
410
412
  export {
411
- El as default
413
+ Tl as default
412
414
  };
@@ -1,6 +1,7 @@
1
1
  import { AnyPromiseFunction, Recordable } from '../../../../../utils/src';
2
2
  import { MiddleRow } from './components/panel.types';
3
3
  export type PanelSelectValue = string | number;
4
+ export type PanelSelectSeparator = string | string[];
4
5
  export type PanelSelectModelValue = PanelSelectValue | PanelSelectValue[] | undefined;
5
6
  export interface PanelSelectOption extends Recordable {
6
7
  label?: string;
@@ -23,8 +24,8 @@ export interface PanelMiddleProps {
23
24
  optionPerRow: number;
24
25
  /** 行高 */
25
26
  rowHeight: number;
26
- /** 选中值VModel */
27
- selectedValues: PanelSelectValue[];
27
+ /** 已选值集合,由容器统一构建后下传,避免在中间列表再建一份同规模集合 */
28
+ selectedValueSet: ReadonlySet<PanelSelectValue>;
28
29
  /** 全部选项是否选中 */
29
30
  isAllChecked: boolean;
30
31
  /** 是否初始化就选中 */
@@ -34,8 +35,10 @@ export interface PanelMiddleProps {
34
35
  groupCheckedMap: Record<string, boolean>;
35
36
  groupIndeterminateMap: Record<string, boolean>;
36
37
  scrollToGroupValue?: PanelSelectValue;
38
+ /** 黏贴后是否触发搜索 */
37
39
  pasteSearch?: boolean;
38
- separator?: string;
40
+ /** 搜索与黏贴拆分分隔符;字符串表示一个分隔符,数组表示多个分隔符 */
41
+ separator?: PanelSelectSeparator;
39
42
  showAll: boolean;
40
43
  middlePlaceholder?: string;
41
44
  }
@@ -78,8 +81,8 @@ export interface PanelContainerProps {
78
81
  beforeFetch?: AnyPromiseFunction<any, any>;
79
82
  /** 请求后钩子 */
80
83
  afterFetch?: AnyPromiseFunction<any, any>;
81
- /** 粘贴拆分分隔符 */
82
- separator?: string;
84
+ /** 搜索与黏贴拆分分隔符;字符串表示一个分隔符,数组表示多个分隔符 */
85
+ separator?: PanelSelectSeparator;
83
86
  /** 粘贴后是否触发搜索 */
84
87
  pasteSearch?: boolean;
85
88
  /** 打开下拉框时是否总是请求接口加载数据源 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dazhicheng/ui",
3
- "version": "1.6.9",
3
+ "version": "1.6.10",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",