@dazhicheng/ui 1.5.258 → 1.5.260

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.
@@ -11,7 +11,7 @@ import "../../../../node_modules/.pnpm/crypto-js@4.2.0/node_modules/crypto-js/pa
11
11
  import "lodash-es";
12
12
  import { useResizeObserver as F } from "@vueuse/core";
13
13
  function J(r) {
14
- const o = A(1), s = ["ElSelect", "ElSelectV2"], u = () => r.value.component, a = () => E(r.value.componentProps), p = () => r.value.selectWrapRef, T = () => r.value.selectRef, f = c(() => {
14
+ const o = A(1), s = ["ElSelect", "ElSelectV2", "TtPanelSelect"], u = () => r.value.component, a = () => E(r.value.componentProps), p = () => r.value.selectWrapRef, T = () => r.value.selectRef, f = c(() => {
15
15
  const e = u();
16
16
  return x(e) && s.includes(e);
17
17
  }), m = c(() => {
@@ -67,11 +67,11 @@ function J(r) {
67
67
  o.value = 1;
68
68
  return;
69
69
  }
70
- let h = 0, S = 0;
70
+ let S = 0, h = 0;
71
71
  e.slice(0).forEach((w) => {
72
72
  const b = L(w, W, i) + 32 + 8;
73
- h + b < g && (h += b, S += 1);
74
- }), o.value = Math.max(1, S);
73
+ S + b < g && (S += b, h += 1);
74
+ }), o.value = Math.max(1, h);
75
75
  }
76
76
  return z(
77
77
  v,
@@ -1,4 +1,4 @@
1
- import { defineComponent as Te, mergeModels as K, useModel as We, computed as u, watch as V, ref as h, useTemplateRef as S, onMounted as De, unref as n, createElementBlock as U, openBlock as w, normalizeClass as z, createVNode as j, mergeProps as Ie, withCtx as Ke, withDirectives as Ue, normalizeStyle as ze, createBlock as q, createCommentVNode as H, nextTick as $ } from "vue";
1
+ import { defineComponent as _e, mergeModels as K, useModel as We, computed as u, watch as V, ref as h, useTemplateRef as S, onMounted as De, unref as n, createElementBlock as U, openBlock as w, normalizeClass as z, createVNode as j, mergeProps as Ie, withCtx as Ke, withDirectives as Ue, normalizeStyle as ze, createBlock as q, createCommentVNode as H, nextTick as $ } 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 je } from "../../../packages/hooks/src/useDesign.js";
4
4
  import "axios";
@@ -22,7 +22,7 @@ import ll from "./components/PanelRight.vue.js";
22
22
  import { usePanelSelectData as tl } from "./hooks/usePanelData.js";
23
23
  import { usePanelSelectSelection as al } from "./hooks/usePanelSelection.js";
24
24
  /* empty css */
25
- const p = 4, Fl = /* @__PURE__ */ Te({
25
+ const p = 4, Fl = /* @__PURE__ */ _e({
26
26
  name: "TtPanelSelect",
27
27
  __name: "index",
28
28
  props: /* @__PURE__ */ K({
@@ -70,17 +70,17 @@ const p = 4, Fl = /* @__PURE__ */ Te({
70
70
  leafNodes: f,
71
71
  isFirstLoaded: ae,
72
72
  buildOptionGroups: oe
73
- } = tl(t), a = We(F, "modelValue"), B = u(() => t.disabled);
73
+ } = tl(t), a = We(F, "modelValue"), P = u(() => t.disabled);
74
74
  function g(e) {
75
75
  if (e === t.showAllField) return { label: "全部", value: t.showAllField };
76
76
  const l = f.value.find((o) => o.value === e);
77
77
  return l ? { label: l.label, value: l.value } : { label: String(e), value: e };
78
78
  }
79
- function E(e) {
79
+ function B(e) {
80
80
  if (e != null)
81
81
  return typeof e == "object" && "value" in e ? e.value : e;
82
82
  }
83
- const P = u({
83
+ const E = u({
84
84
  get() {
85
85
  if (t.multiple)
86
86
  return (Array.isArray(a.value) ? a.value : a.value === void 0 ? [] : [a.value]).map((l) => g(l));
@@ -93,10 +93,10 @@ const p = 4, Fl = /* @__PURE__ */ Te({
93
93
  set(e) {
94
94
  if (t.multiple) {
95
95
  const o = Array.isArray(e) ? e : [];
96
- a.value = o.map((i) => E(i)).filter((i) => i !== void 0);
96
+ a.value = o.map((i) => B(i)).filter((i) => i !== void 0);
97
97
  return;
98
98
  }
99
- const l = E(e);
99
+ const l = B(e);
100
100
  a.value = l;
101
101
  }
102
102
  }), k = u({
@@ -115,22 +115,22 @@ const p = 4, Fl = /* @__PURE__ */ Te({
115
115
  Array.isArray(l) && (a.value = l.at(-1));
116
116
  });
117
117
  const C = h(), A = h(""), b = h(""), x = h(), G = S("middleRef"), v = S("selectWrapRef"), M = S("selectRef"), O = h(0);
118
- function L() {
118
+ function T() {
119
119
  const e = v.value;
120
120
  e && (O.value = e.offsetWidth);
121
121
  }
122
- Qe(v, () => L());
122
+ Qe(v, () => T());
123
123
  const ne = u(() => ({
124
124
  componentProps: {
125
125
  multiple: t.multiple,
126
126
  component: {
127
- name: "ElSelect"
127
+ name: "TtPanelSelect"
128
128
  }
129
129
  },
130
- component: "ElSelect",
130
+ component: "TtPanelSelect",
131
131
  selectWrapRef: v,
132
132
  selectRef: M
133
- })), { selectComponentProps: ie } = Xe(ne), _ = u(() => {
133
+ })), { selectComponentProps: ie } = Xe(ne), L = u(() => {
134
134
  const e = A.value.trim().toLowerCase();
135
135
  if (!e) return N.value;
136
136
  const l = (o) => {
@@ -149,7 +149,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
149
149
  e.push(i.value), (r = i.children) != null && r.length && l(i.children);
150
150
  });
151
151
  };
152
- return l(_.value), e;
152
+ return l(L.value), e;
153
153
  }), y = u(() => oe(f.value, b.value)), ue = u(() => {
154
154
  const e = "minmax(var(--tt-panel-select-middle-width, 450px), 1fr)";
155
155
  return t.showNav && !t.multiple ? `200px ${e}` : !t.showNav && t.multiple ? `${e} 180px` : !t.showNav && !t.multiple ? e : `200px ${e} 180px`;
@@ -182,7 +182,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
182
182
  handleAllOptionCheck: ye,
183
183
  handleOptionCheck: we,
184
184
  handleOptionsCheck: ge,
185
- handleCheckAll: T,
185
+ handleCheckAll: _,
186
186
  removeSelected: ke
187
187
  } = al({
188
188
  multiple: u(() => t.multiple),
@@ -232,7 +232,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
232
232
  o && ve(o, l);
233
233
  }
234
234
  async function Re(e) {
235
- R("visible-change", e), e && (await $(), L(), t.alwaysLoad ? await m() : !t.immediate && !n(ae) && await m());
235
+ R("visible-change", e), e && (await $(), T(), t.alwaysLoad ? await m() : !t.immediate && !n(ae) && await m());
236
236
  }
237
237
  function D(e) {
238
238
  R("change", e, J(n(W)), xe(e));
@@ -247,17 +247,17 @@ const p = 4, Fl = /* @__PURE__ */ Te({
247
247
  const l = J(n(a));
248
248
  e(), Ne(l);
249
249
  }
250
- function Be(e) {
250
+ function Pe(e) {
251
251
  d(() => {
252
252
  ye(e);
253
253
  });
254
254
  }
255
- function Ee(e) {
255
+ function Be(e) {
256
256
  d(() => {
257
- T(e);
257
+ _(e);
258
258
  });
259
259
  }
260
- function Pe(e, l) {
260
+ function Ee(e, l) {
261
261
  d(() => {
262
262
  Fe(e, l);
263
263
  });
@@ -272,14 +272,14 @@ const p = 4, Fl = /* @__PURE__ */ Te({
272
272
  ge(e, l);
273
273
  });
274
274
  }
275
- function Le(e) {
275
+ function Te(e) {
276
276
  d(() => {
277
277
  ke(e);
278
278
  });
279
279
  }
280
- function _e() {
280
+ function Le() {
281
281
  d(() => {
282
- T(!1);
282
+ _(!1);
283
283
  });
284
284
  }
285
285
  return V(
@@ -312,8 +312,8 @@ const p = 4, Fl = /* @__PURE__ */ Te({
312
312
  j(n(Z), Ie({
313
313
  ref_key: "selectRef",
314
314
  ref: M,
315
- modelValue: P.value,
316
- "onUpdate:modelValue": l[0] || (l[0] = (o) => P.value = o)
315
+ modelValue: E.value,
316
+ "onUpdate:modelValue": l[0] || (l[0] = (o) => E.value = o)
317
317
  }, n(ie), {
318
318
  multiple: e.multiple,
319
319
  filterable: !1,
@@ -338,7 +338,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
338
338
  key: 0,
339
339
  "prefix-cls": n(c),
340
340
  keyword: A.value,
341
- "tree-data": _.value,
341
+ "tree-data": L.value,
342
342
  "expanded-keys": re.value,
343
343
  "left-placeholder": e.leftPlaceholder,
344
344
  "onUpdate:keyword": Se,
@@ -351,7 +351,7 @@ const p = 4, Fl = /* @__PURE__ */ Te({
351
351
  multiple: e.multiple,
352
352
  keyword: b.value,
353
353
  rows: de.value,
354
- disabled: B.value,
354
+ disabled: P.value,
355
355
  "show-all": t.showAll,
356
356
  "option-per-row": p,
357
357
  "row-height": 40,
@@ -366,9 +366,9 @@ const p = 4, Fl = /* @__PURE__ */ Te({
366
366
  separator: e.separator,
367
367
  "middle-placeholder": e.middlePlaceholder,
368
368
  "onUpdate:keyword": $e,
369
- onAllCheck: Be,
370
- onCheckAll: Ee,
371
- onGroupCheck: Pe,
369
+ onAllCheck: Pe,
370
+ onCheckAll: Be,
371
+ onGroupCheck: Ee,
372
372
  onOptionCheck: Ge,
373
373
  onOptionsCheck: Me
374
374
  }, 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"]),
@@ -376,10 +376,10 @@ const p = 4, Fl = /* @__PURE__ */ Te({
376
376
  key: 1,
377
377
  "prefix-cls": n(c),
378
378
  multiple: e.multiple,
379
- disabled: B.value,
379
+ disabled: P.value,
380
380
  "selected-options": n(ce),
381
- onClearAll: _e,
382
- onRemove: Le
381
+ onClearAll: Le,
382
+ onRemove: Te
383
383
  }, null, 8, ["prefix-cls", "multiple", "disabled", "selected-options"])) : H("", !0)
384
384
  ], 6)), [
385
385
  [n(Y), n(ee)]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dazhicheng/ui",
3
- "version": "1.5.258",
3
+ "version": "1.5.260",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -67,8 +67,8 @@
67
67
  "vue-router": "^5.0.2",
68
68
  "vxe-pc-ui": "^4.12.36",
69
69
  "vxe-table": "^4.17.48",
70
- "@dazhicheng/hooks": "1.4.49",
71
- "@dazhicheng/utils": "1.3.46"
70
+ "@dazhicheng/hooks": "1.4.50",
71
+ "@dazhicheng/utils": "1.3.47"
72
72
  },
73
73
  "files": [
74
74
  "dist"