@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,11 +1,11 @@
1
- import { defineComponent as ne, useTemplateRef as q, ref as m, computed as v, watch as M, nextTick as U, createElementBlock as p, openBlock as s, normalizeClass as n, createElementVNode as k, createCommentVNode as z, createVNode as h, createBlock as I, unref as i, withKeys as ie, withCtx as d, createTextVNode as S, normalizeStyle as P, Fragment as H, renderList as V, toDisplayString as E } from "vue";
1
+ import { defineComponent as ne, useTemplateRef as U, ref as w, computed as m, watch as M, nextTick as z, createElementBlock as d, openBlock as n, normalizeClass as s, createElementVNode as y, createCommentVNode as I, createVNode as h, createBlock as P, unref as i, withKeys as ie, withCtx as c, createTextVNode as $, normalizeStyle as H, Fragment as V, renderList as E, toDisplayString as F } from "vue";
2
2
  import { TtButton as ue } from "../../../tt-button/index.js";
3
- import { TtText as $ } from "../../../tt-text/index.js";
3
+ import { TtText as S } from "../../../tt-text/index.js";
4
4
  import { Search as de } from "@element-plus/icons-vue";
5
5
  import { useResizeObserver as ce } from "@vueuse/core";
6
- import { ElInput as fe, ElIcon as pe, ElCheckbox as F, ElScrollbar as he } from "element-plus";
6
+ import { ElInput as fe, ElIcon as pe, ElCheckbox as D, ElScrollbar as he } from "element-plus";
7
7
  import { DEFAULT_PANEL_SELECT_SEPARATORS as ve, splitPanelSelectText as me } from "../common.js";
8
- const we = ["data-virtual-index", "data-flash-seed"], Y = 2, $e = /* @__PURE__ */ ne({
8
+ const we = ["data-virtual-index", "data-flash-seed"], Y = 2, Se = /* @__PURE__ */ ne({
9
9
  name: "PanelMiddle",
10
10
  __name: "PanelMiddle",
11
11
  props: {
@@ -31,26 +31,26 @@ const we = ["data-virtual-index", "data-flash-seed"], Y = 2, $e = /* @__PURE__ *
31
31
  middlePlaceholder: {}
32
32
  },
33
33
  emits: ["update:keyword", "checkAll", "allCheck", "groupCheck", "optionCheck", "optionsCheck", "selectCreatedOptions"],
34
- setup(t, { expose: W, emit: j }) {
35
- const l = t, c = j, g = q("scrollbarRef"), x = q("searchInputRef"), J = m(), T = m(0), D = m(0), w = m(""), b = m(), G = m(0), R = m(!1);
34
+ setup(l, { expose: W, emit: j }) {
35
+ const t = l, f = j, g = U("scrollbarRef"), x = U("searchInputRef"), J = w(), T = w(0), G = w(0), C = w(""), b = w(), K = w(0), R = w(!1);
36
36
  let B;
37
- const Q = v(() => l.rows.length * l.rowHeight), X = v(() => Math.max(1, Math.ceil(D.value / l.rowHeight))), y = v(() => Math.max(0, Math.floor(T.value / l.rowHeight) - Y)), Z = v(() => Math.min(l.rows.length, y.value + X.value + Y * 2)), _ = v(() => y.value * l.rowHeight), ee = v(() => l.rows.slice(y.value, Z.value)), le = v(() => {
37
+ const Q = m(() => t.rows.length * t.rowHeight), X = m(() => Math.max(1, Math.ceil(G.value / t.rowHeight))), k = m(() => Math.max(0, Math.floor(T.value / t.rowHeight) - Y)), Z = m(() => Math.min(t.rows.length, k.value + X.value + Y * 2)), _ = m(() => k.value * t.rowHeight), ee = m(() => t.rows.slice(k.value, Z.value)), le = m(() => {
38
38
  var e;
39
- return ((e = l.rows[0]) == null ? void 0 : e.type) === "group";
40
- }), te = v(
41
- () => l.rows.filter((e) => e.type === "options").flatMap((e) => e.options).filter((e) => !e.disabled)
39
+ return ((e = t.rows[0]) == null ? void 0 : e.type) === "group";
40
+ }), te = m(
41
+ () => t.rows.filter((e) => e.type === "options").flatMap((e) => e.options).filter((e) => !e.disabled)
42
42
  );
43
43
  M(
44
- () => l.keyword,
44
+ () => t.keyword,
45
45
  (e) => {
46
- w.value = e;
46
+ C.value = e;
47
47
  },
48
48
  { immediate: !0 }
49
49
  );
50
50
  function A() {
51
51
  var a;
52
52
  const e = (a = g.value) == null ? void 0 : a.wrapRef;
53
- e && (J.value = e, D.value = e.clientHeight, T.value = e.scrollTop);
53
+ e && (J.value = e, G.value = e.clientHeight, T.value = e.scrollTop);
54
54
  }
55
55
  ce(
56
56
  () => {
@@ -59,104 +59,104 @@ const we = ["data-virtual-index", "data-flash-seed"], Y = 2, $e = /* @__PURE__ *
59
59
  },
60
60
  () => A()
61
61
  );
62
- function K() {
62
+ function L() {
63
63
  var a;
64
64
  const e = (a = g.value) == null ? void 0 : a.wrapRef;
65
65
  e && (T.value = e.scrollTop);
66
66
  }
67
67
  function ae(e) {
68
- b.value = void 0, G.value += 1, requestAnimationFrame(() => {
68
+ b.value = void 0, K.value += 1, requestAnimationFrame(() => {
69
69
  b.value = e, B && clearTimeout(B), B = setTimeout(() => {
70
70
  b.value = void 0;
71
71
  }, 1400);
72
72
  });
73
73
  }
74
- async function L(e) {
75
- var f;
76
- await U(), A();
77
- const a = l.rows.findIndex((r) => r.type === "group" && r.group.value === e);
74
+ async function N(e) {
75
+ var p;
76
+ await z(), A();
77
+ const a = t.rows.findIndex((r) => r.type === "group" && r.group.value === e);
78
78
  if (a < 0) return;
79
- const o = a * l.rowHeight;
80
- (f = g.value) == null || f.setScrollTop(o), requestAnimationFrame(() => {
81
- K(), ae(e);
79
+ const o = a * t.rowHeight;
80
+ (p = g.value) == null || p.setScrollTop(o), requestAnimationFrame(() => {
81
+ L(), ae(e);
82
82
  });
83
83
  }
84
84
  function oe(e) {
85
- var N;
86
- if (l.disabled)
85
+ var O;
86
+ if (t.disabled)
87
87
  return;
88
88
  e.preventDefault();
89
- const a = ((N = e.clipboardData) == null ? void 0 : N.getData("text")) || "";
90
- w.value = a.trim(), l.pasteSearch ? c("update:keyword", w.value) : (R.value = !0, requestAnimationFrame(() => {
89
+ const a = ((O = e.clipboardData) == null ? void 0 : O.getData("text")) || "";
90
+ C.value = a.trim(), t.pasteSearch ? f("update:keyword", C.value) : (R.value = !0, requestAnimationFrame(() => {
91
91
  R.value = !1;
92
92
  }));
93
- const o = me(a, l.separator), f = () => {
93
+ const o = me(a, t.separator), p = () => {
94
94
  requestAnimationFrame(() => {
95
- var O;
96
- const u = (O = x.value) == null ? void 0 : O.input;
95
+ var q;
96
+ const u = (q = x.value) == null ? void 0 : q.input;
97
97
  u == null || u.focus(), u == null || u.select();
98
98
  });
99
99
  };
100
100
  if (!o.length) {
101
- f();
101
+ p();
102
102
  return;
103
103
  }
104
- const r = new Set(o), C = te.value.filter((u) => r.has(u.label) || r.has(String(u.value))).map((u) => u.value);
105
- if (!C.length) {
106
- f();
104
+ const r = new Set(o), v = te.value.filter((u) => r.has(u.label) || r.has(String(u.value))).map((u) => u.value);
105
+ if (!v.length) {
106
+ p();
107
107
  return;
108
108
  }
109
- if (l.multiple) {
110
- c("optionsCheck", C, !0), f();
109
+ if (t.multiple) {
110
+ f("optionsCheck", v, !0), p();
111
111
  return;
112
112
  }
113
- c("optionCheck", C.at(-1), !0), f();
113
+ f("optionCheck", v.at(-1), !0), p();
114
114
  }
115
115
  function re(e) {
116
- w.value = e, !R.value && c("update:keyword", e);
116
+ C.value = e, !R.value && f("update:keyword", e);
117
117
  }
118
118
  function se(e) {
119
119
  var a;
120
- !l.allowCreate || l.disabled || e.isComposing || (a = x.value) != null && a.isComposing || (e.preventDefault(), e.stopPropagation(), c("update:keyword", w.value), c("selectCreatedOptions"));
120
+ !t.allowCreate || t.disabled || e.isComposing || (a = x.value) != null && a.isComposing || (e.preventDefault(), e.stopPropagation(), f("update:keyword", C.value), f("selectCreatedOptions"));
121
121
  }
122
122
  return M(
123
- () => l.scrollToGroupValue,
123
+ () => t.scrollToGroupValue,
124
124
  async (e) => {
125
- e !== void 0 && await L(e);
125
+ e !== void 0 && await N(e);
126
126
  },
127
127
  { flush: "post" }
128
128
  ), M(
129
- () => l.rows.length,
129
+ () => t.rows.length,
130
130
  async () => {
131
- await U(), A();
131
+ await z(), A();
132
132
  },
133
133
  { immediate: !0 }
134
134
  ), W({
135
- scrollToGroup: L,
135
+ scrollToGroup: N,
136
136
  inputFocus: () => {
137
137
  var e, a;
138
138
  (a = (e = x.value) == null ? void 0 : e.focus) == null || a.call(e);
139
139
  }
140
- }), (e, a) => (s(), p("div", {
141
- class: n(`${t.prefixCls}__list`)
140
+ }), (e, a) => (n(), d("div", {
141
+ class: s(`${l.prefixCls}__list`)
142
142
  }, [
143
- k("div", {
144
- class: n(`${t.prefixCls}__toolbar`)
143
+ y("div", {
144
+ class: s(`${l.prefixCls}__toolbar`)
145
145
  }, [
146
146
  h(i(fe), {
147
147
  ref_key: "searchInputRef",
148
148
  ref: x,
149
- "model-value": w.value,
150
- class: n(`${t.prefixCls}__search`),
151
- placeholder: l.allowCreate ? `${l.middlePlaceholder}(可创建)` : l.middlePlaceholder,
149
+ "model-value": C.value,
150
+ class: s(`${l.prefixCls}__search`),
151
+ placeholder: t.allowCreate ? `${t.middlePlaceholder}(可创建)` : t.middlePlaceholder,
152
152
  clearable: "",
153
153
  "onUpdate:modelValue": re,
154
154
  onPaste: oe,
155
155
  onKeydown: ie(se, ["enter"])
156
156
  }, {
157
- prefix: d(() => [
157
+ prefix: c(() => [
158
158
  h(i(pe), null, {
159
- default: d(() => [
159
+ default: c(() => [
160
160
  h(i(de))
161
161
  ]),
162
162
  _: 1
@@ -164,122 +164,133 @@ const we = ["data-virtual-index", "data-flash-seed"], Y = 2, $e = /* @__PURE__ *
164
164
  ]),
165
165
  _: 1
166
166
  }, 8, ["model-value", "class", "placeholder"]),
167
- t.multiple && t.showMultiple ? (s(), I(i(ue), {
167
+ l.multiple && l.showMultiple ? (n(), P(i(ue), {
168
168
  key: 0,
169
- disabled: t.disabled,
169
+ disabled: l.disabled,
170
170
  plain: "",
171
- onClick: a[0] || (a[0] = () => c("checkAll", !0))
171
+ onClick: a[0] || (a[0] = () => f("checkAll", !0))
172
172
  }, {
173
- default: d(() => [...a[2] || (a[2] = [
174
- k("span", null, "全选", -1)
173
+ default: c(() => [...a[2] || (a[2] = [
174
+ y("span", null, "全选", -1)
175
175
  ])]),
176
176
  _: 1
177
- }, 8, ["disabled"])) : z("", !0)
177
+ }, 8, ["disabled"])) : I("", !0)
178
178
  ], 2),
179
- l.showAll ? (s(), p("div", {
179
+ t.showAll ? (n(), d("div", {
180
180
  key: 0,
181
- class: n([`${t.prefixCls}__panel-head`, le.value ? "is-standalone" : ""])
181
+ class: s([`${l.prefixCls}__panel-head`, le.value ? "is-standalone" : ""])
182
182
  }, [
183
- h(i(F), {
184
- disabled: t.disabled,
185
- "model-value": l.allChecked,
186
- onChange: a[1] || (a[1] = (o) => c("allCheck", !!o))
183
+ h(i(D), {
184
+ disabled: l.disabled,
185
+ "model-value": t.allChecked,
186
+ onChange: a[1] || (a[1] = (o) => f("allCheck", !!o))
187
187
  }, {
188
- default: d(() => [
189
- h(i($), null, {
190
- default: d(() => [...a[3] || (a[3] = [
191
- S("全部", -1)
188
+ default: c(() => [
189
+ h(i(S), null, {
190
+ default: c(() => [...a[3] || (a[3] = [
191
+ $("全部", -1)
192
192
  ])]),
193
193
  _: 1
194
194
  })
195
195
  ]),
196
196
  _: 1
197
197
  }, 8, ["disabled", "model-value"])
198
- ], 2)) : z("", !0),
199
- k("div", {
200
- class: n(`${t.prefixCls}__checkbox-group`)
198
+ ], 2)) : I("", !0),
199
+ y("div", {
200
+ class: s(`${l.prefixCls}__checkbox-group`)
201
201
  }, [
202
202
  h(i(he), {
203
203
  ref_key: "scrollbarRef",
204
204
  ref: g,
205
- class: n(`${t.prefixCls}__middle-scrollbar`),
206
- onScroll: K
205
+ class: s(`${l.prefixCls}__middle-scrollbar`),
206
+ onScroll: L
207
207
  }, {
208
- default: d(() => [
209
- k("div", {
210
- class: n(`${t.prefixCls}__middle-virtual-host`),
211
- style: P({ height: `${Q.value}px` })
208
+ default: c(() => [
209
+ y("div", {
210
+ class: s(`${l.prefixCls}__middle-virtual-host`),
211
+ style: H({ height: `${Q.value}px` })
212
212
  }, [
213
- k("div", {
214
- style: P({ transform: `translateY(${_.value}px)` })
213
+ y("div", {
214
+ style: H({ transform: `translateY(${_.value}px)` })
215
215
  }, [
216
- (s(!0), p(H, null, V(ee.value, (o, f) => (s(), p("div", {
216
+ (n(!0), d(V, null, E(ee.value, (o, p) => (n(), d("div", {
217
217
  key: o.key,
218
- style: P({ height: `${t.rowHeight}px` }),
219
- class: n([
220
- `${t.prefixCls}__middle-row`,
221
- o.type === "group" ? `${t.prefixCls}__middle-group` : `${t.prefixCls}__middle-options`,
218
+ style: H({ height: `${l.rowHeight}px` }),
219
+ class: s([
220
+ `${l.prefixCls}__middle-row`,
221
+ o.type === "group" ? `${l.prefixCls}__middle-group` : `${l.prefixCls}__middle-options`,
222
222
  o.type === "options" && o.isLast ? "is-last" : "",
223
- o.type === "options" && y.value + f === 0 && !l.showAll ? "is-first" : "",
224
- b.value === o.group.value ? `${t.prefixCls}__group-flash` : ""
223
+ o.type === "options" && k.value + p === 0 && !t.showAll ? "is-first" : "",
224
+ b.value === o.group.value ? `${l.prefixCls}__group-flash` : ""
225
225
  ]),
226
- "data-virtual-index": y.value + f,
227
- "data-flash-seed": G.value
226
+ "data-virtual-index": k.value + p,
227
+ "data-flash-seed": K.value
228
228
  }, [
229
- o.type === "group" ? (s(), p("div", {
229
+ o.type === "group" ? (n(), d("div", {
230
230
  key: 0,
231
- class: n(`${t.prefixCls}__panel-head`)
231
+ class: s(`${l.prefixCls}__panel-head`)
232
232
  }, [
233
- l.multiple ? (s(), I(i(F), {
233
+ t.multiple ? (n(), P(i(D), {
234
234
  key: 0,
235
- "model-value": t.groupCheckedMap[String(o.group.value)],
236
- indeterminate: t.groupIndeterminateMap[String(o.group.value)],
237
- disabled: t.disabled,
238
- onChange: (r) => c("groupCheck", o.group.value, !!r)
235
+ "model-value": l.groupCheckedMap[String(o.group.value)],
236
+ indeterminate: l.groupIndeterminateMap[String(o.group.value)],
237
+ disabled: l.disabled,
238
+ onChange: (r) => f("groupCheck", o.group.value, !!r)
239
239
  }, {
240
- default: d(() => [
241
- h(i($), null, {
242
- default: d(() => [
243
- S(E(o.group.label), 1)
240
+ default: c(() => [
241
+ h(i(S), null, {
242
+ default: c(() => [
243
+ $(F(o.group.label), 1)
244
244
  ]),
245
245
  _: 2
246
246
  }, 1024)
247
247
  ]),
248
248
  _: 2
249
- }, 1032, ["model-value", "indeterminate", "disabled", "onChange"])) : (s(), I(i($), { key: 1 }, {
250
- default: d(() => [
251
- S(E(o.group.label), 1)
249
+ }, 1032, ["model-value", "indeterminate", "disabled", "onChange"])) : (n(), P(i(S), { key: 1 }, {
250
+ default: c(() => [
251
+ $(F(o.group.label), 1)
252
252
  ]),
253
253
  _: 2
254
254
  }, 1024))
255
- ], 2)) : (s(), p("div", {
255
+ ], 2)) : (n(), d("div", {
256
256
  key: 1,
257
- class: n(`${t.prefixCls}__option-row`)
257
+ class: s(`${l.prefixCls}__option-row`)
258
258
  }, [
259
- (s(!0), p(H, null, V(o.options, (r) => (s(), p("div", {
259
+ (n(!0), d(V, null, E(o.options, (r) => (n(), d("div", {
260
260
  key: r.value,
261
- class: n(`${t.prefixCls}__option-cell`)
261
+ class: s(`${l.prefixCls}__option-cell`)
262
262
  }, [
263
- h(i(F), {
264
- "model-value": l.selectedValueSet.has(r.value),
265
- disabled: t.disabled || r.disabled,
266
- class: n(`${t.prefixCls}__option`),
267
- onChange: (C) => c("optionCheck", r.value, !!C)
263
+ h(i(D), {
264
+ "model-value": t.selectedValueSet.has(r.value),
265
+ disabled: l.disabled || r.disabled,
266
+ class: s(`${l.prefixCls}__option`),
267
+ onChange: (v) => f("optionCheck", r.value, !!v)
268
268
  }, {
269
- default: d(() => [
270
- h(i($), { "tool-tip-line": 2 }, {
271
- default: d(() => [
272
- S(E(r.label), 1)
273
- ]),
274
- _: 2
275
- }, 1024)
276
- ]),
269
+ default: c(() => {
270
+ var v;
271
+ return [
272
+ y("span", {
273
+ class: s(`${l.prefixCls}__option-label`)
274
+ }, [
275
+ h(i(S), { "tool-tip-line": 2 }, {
276
+ default: c(() => [
277
+ $(F(r.label), 1)
278
+ ]),
279
+ _: 2
280
+ }, 1024),
281
+ r.deleted === !0 || ((v = r.raw) == null ? void 0 : v.deleted) === !0 ? (n(), d("span", {
282
+ key: 0,
283
+ class: s(`${l.prefixCls}__deleted-mark`)
284
+ }, " 删 ", 2)) : I("", !0)
285
+ ], 2)
286
+ ];
287
+ }),
277
288
  _: 2
278
289
  }, 1032, ["model-value", "disabled", "class", "onChange"])
279
290
  ], 2))), 128)),
280
- (s(!0), p(H, null, V(t.optionPerRow - o.options.length, (r) => (s(), p("div", {
291
+ (n(!0), d(V, null, E(l.optionPerRow - o.options.length, (r) => (n(), d("div", {
281
292
  key: `empty-${o.key}-${r}`,
282
- class: n(`${t.prefixCls}__option-cell`)
293
+ class: s(`${l.prefixCls}__option-cell`)
283
294
  }, null, 2))), 128))
284
295
  ], 2))
285
296
  ], 14, we))), 128))
@@ -293,5 +304,5 @@ const we = ["data-virtual-index", "data-flash-seed"], Y = 2, $e = /* @__PURE__ *
293
304
  }
294
305
  });
295
306
  export {
296
- $e as default
307
+ Se as default
297
308
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as V, ref as p, computed as o, watch as H, nextTick as N, createElementBlock as d, openBlock as m, normalizeClass as n, createElementVNode as x, createVNode as i, unref as s, withCtx as h, createTextVNode as y, normalizeStyle as g, Fragment as I, renderList as A, createCommentVNode as P, toDisplayString as Y } from "vue";
2
- import $ from "../../../../assets/svg/close.svg.js";
3
- import { TtButton as _ } from "../../../tt-button/index.js";
4
- import { TtIcon as k } from "../../../tt-icon/index.js";
5
- import { TtText as D } from "../../../tt-text/index.js";
6
- import { useResizeObserver as F } from "@vueuse/core";
7
- import { ElScrollbar as L } from "element-plus";
8
- const r = 34, R = 8, X = /* @__PURE__ */ V({
1
+ import { defineComponent as N, ref as x, computed as r, watch as I, nextTick as A, createElementBlock as n, openBlock as i, normalizeClass as a, createElementVNode as m, createVNode as c, unref as o, withCtx as h, createTextVNode as $, normalizeStyle as g, Fragment as P, renderList as Y, createCommentVNode as k, toDisplayString as _ } from "vue";
2
+ import R from "../../../../assets/svg/close.svg.js";
3
+ import { TtButton as D } from "../../../tt-button/index.js";
4
+ import { TtIcon as T } from "../../../tt-icon/index.js";
5
+ import { TtText as F } from "../../../tt-text/index.js";
6
+ import { useResizeObserver as L } from "@vueuse/core";
7
+ import { ElScrollbar as j } from "element-plus";
8
+ const u = 34, O = 8, Z = /* @__PURE__ */ N({
9
9
  name: "PanelRight",
10
10
  __name: "PanelRight",
11
11
  props: {
@@ -15,92 +15,103 @@ const r = 34, R = 8, X = /* @__PURE__ */ V({
15
15
  disabled: { type: Boolean }
16
16
  },
17
17
  emits: ["clearAll", "remove"],
18
- setup(t, { emit: T }) {
19
- const c = t, C = T, u = p(), f = p(0), b = p(0), O = o(() => c.selectedOptions.length * r), S = o(() => Math.max(1, Math.ceil(b.value / r))), v = o(() => Math.max(0, Math.floor(f.value / r) - R)), z = o(
20
- () => Math.min(c.selectedOptions.length, v.value + S.value + R * 2)
21
- ), B = o(() => v.value * r), E = o(() => c.selectedOptions.slice(v.value, z.value));
18
+ setup(e, { emit: S }) {
19
+ const d = e, C = S, f = x(), v = x(0), b = x(0), z = r(() => d.selectedOptions.length * u), B = r(() => Math.max(1, Math.ceil(b.value / u))), p = r(() => Math.max(0, Math.floor(v.value / u) - O)), E = r(
20
+ () => Math.min(d.selectedOptions.length, p.value + B.value + O * 2)
21
+ ), M = r(() => p.value * u), V = r(() => d.selectedOptions.slice(p.value, E.value));
22
22
  function w() {
23
- var l;
24
- const e = (l = u.value) == null ? void 0 : l.wrapRef;
25
- e && (b.value = e.clientHeight, f.value = e.scrollTop);
23
+ var t;
24
+ const l = (t = f.value) == null ? void 0 : t.wrapRef;
25
+ l && (b.value = l.clientHeight, v.value = l.scrollTop);
26
26
  }
27
- function M() {
28
- var l;
29
- const e = (l = u.value) == null ? void 0 : l.wrapRef;
30
- e && (f.value = e.scrollTop);
27
+ function H() {
28
+ var t;
29
+ const l = (t = f.value) == null ? void 0 : t.wrapRef;
30
+ l && (v.value = l.scrollTop);
31
31
  }
32
- return H(
33
- () => c.selectedOptions.length,
32
+ return I(
33
+ () => d.selectedOptions.length,
34
34
  async () => {
35
- await N(), w();
35
+ await A(), w();
36
36
  },
37
37
  { immediate: !0 }
38
- ), F(
38
+ ), L(
39
39
  () => {
40
- var e;
41
- return (e = u.value) == null ? void 0 : e.wrapRef;
40
+ var l;
41
+ return (l = f.value) == null ? void 0 : l.wrapRef;
42
42
  },
43
43
  () => w()
44
- ), (e, l) => (m(), d("div", {
45
- class: n(`${t.prefixCls}__right`)
44
+ ), (l, t) => (i(), n("div", {
45
+ class: a(`${e.prefixCls}__right`)
46
46
  }, [
47
- x("div", {
48
- class: n(`${t.prefixCls}__selected-actions`)
47
+ m("div", {
48
+ class: a(`${e.prefixCls}__selected-actions`)
49
49
  }, [
50
- i(s(_), {
51
- disabled: t.disabled,
50
+ c(o(D), {
51
+ disabled: e.disabled,
52
52
  class: "w-full",
53
53
  plain: "",
54
- onClick: l[0] || (l[0] = (a) => C("clearAll"))
54
+ onClick: t[0] || (t[0] = (s) => C("clearAll"))
55
55
  }, {
56
56
  default: h(() => [
57
- i(s(k), {
57
+ c(o(T), {
58
58
  class: "mr-[4px]",
59
59
  size: 14,
60
60
  "is-custom-svg": "",
61
- icon: s($)
61
+ icon: o(R)
62
62
  }, null, 8, ["icon"]),
63
- l[1] || (l[1] = y(" 取消选择 ", -1))
63
+ t[1] || (t[1] = $(" 取消选择 ", -1))
64
64
  ]),
65
65
  _: 1
66
66
  }, 8, ["disabled"])
67
67
  ], 2),
68
- i(s(L), {
68
+ c(o(j), {
69
69
  ref_key: "scrollbarRef",
70
- ref: u,
71
- class: n(`${t.prefixCls}__selected-list ${t.prefixCls}__right-scrollbar`),
72
- onScroll: M
70
+ ref: f,
71
+ class: a(`${e.prefixCls}__selected-list ${e.prefixCls}__right-scrollbar`),
72
+ onScroll: H
73
73
  }, {
74
74
  default: h(() => [
75
- x("div", {
76
- style: g({ height: `${O.value}px` })
75
+ m("div", {
76
+ style: g({ height: `${z.value}px` })
77
77
  }, [
78
- x("div", {
79
- style: g({ transform: `translateY(${B.value}px)` })
78
+ m("div", {
79
+ style: g({ transform: `translateY(${M.value}px)` })
80
80
  }, [
81
- (m(!0), d(I, null, A(E.value, (a) => (m(), d("div", {
82
- key: a.value,
83
- style: g({ height: `${r}px` }),
84
- class: n(`${t.prefixCls}__selected-item`)
85
- }, [
86
- i(s(D), null, {
87
- default: h(() => [
88
- y(Y(a.label), 1)
89
- ]),
90
- _: 2
91
- }, 1024),
92
- !t.disabled && !a.disabled ? (m(), d("span", {
93
- key: 0,
94
- class: n(`${t.prefixCls}__selected-item-close`)
81
+ (i(!0), n(P, null, Y(V.value, (s) => {
82
+ var y;
83
+ return i(), n("div", {
84
+ key: s.value,
85
+ style: g({ height: `${u}px` }),
86
+ class: a(`${e.prefixCls}__selected-item`)
95
87
  }, [
96
- i(s(k), {
97
- size: 14,
98
- "is-custom-svg": "",
99
- icon: s($),
100
- onClick: (j) => C("remove", a.value)
101
- }, null, 8, ["icon", "onClick"])
102
- ], 2)) : P("", !0)
103
- ], 6))), 128))
88
+ m("span", {
89
+ class: a(`${e.prefixCls}__selected-item-label`)
90
+ }, [
91
+ c(o(F), null, {
92
+ default: h(() => [
93
+ $(_(s.label), 1)
94
+ ]),
95
+ _: 2
96
+ }, 1024),
97
+ s.deleted === !0 || ((y = s.raw) == null ? void 0 : y.deleted) === !0 ? (i(), n("span", {
98
+ key: 0,
99
+ class: a(`${e.prefixCls}__deleted-mark`)
100
+ }, " 删 ", 2)) : k("", !0)
101
+ ], 2),
102
+ !e.disabled && !s.disabled ? (i(), n("span", {
103
+ key: 0,
104
+ class: a(`${e.prefixCls}__selected-item-close`)
105
+ }, [
106
+ c(o(T), {
107
+ size: 14,
108
+ "is-custom-svg": "",
109
+ icon: o(R),
110
+ onClick: (q) => C("remove", s.value)
111
+ }, null, 8, ["icon", "onClick"])
112
+ ], 2)) : k("", !0)
113
+ ], 6);
114
+ }), 128))
104
115
  ], 4)
105
116
  ], 4)
106
117
  ]),
@@ -110,5 +121,5 @@ const r = 34, R = 8, X = /* @__PURE__ */ V({
110
121
  }
111
122
  });
112
123
  export {
113
- X as default
124
+ Z as default
114
125
  };
@@ -6,6 +6,8 @@ export type PanelTreeNode = PanelSelectOption & {
6
6
  label: string;
7
7
  value: PanelSelectValue;
8
8
  disabled?: boolean;
9
+ /** 缺码回显:已删除/下线,仅 PanelSelect 画红「删」 */
10
+ deleted?: boolean;
9
11
  children?: PanelTreeNode[];
10
12
  pid?: PanelSelectValue | null;
11
13
  level: number;