ss-component-new 1.1.111 → 1.1.113

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 (47) hide show
  1. package/dist/{array-MOqJRqj_.cjs → array-BYRvPg11.cjs} +2 -2
  2. package/dist/{array-BTFJdCPJ.js → array-DyxKeexo.js} +100 -97
  3. package/dist/{cloneDeep-DIp5Djvp.js → cloneDeep-BfzU0pBe.js} +1 -1
  4. package/dist/{cloneDeep-BBTgEPs_.cjs → cloneDeep-WwDap0fL.cjs} +1 -1
  5. package/dist/{index-Cga4eqxB.cjs → index-5dGTUAu_.cjs} +1 -1
  6. package/dist/{index-Us9Ktk0Q.js → index-B3iQoZwc.js} +469 -461
  7. package/dist/{index-CGwybNPv.cjs → index-B4WYIlOz.cjs} +1 -1
  8. package/dist/{index-BoTaQZEe.js → index-BH3F6_ql.js} +5 -5
  9. package/dist/index-BIRKKGuW.cjs +1 -0
  10. package/dist/{index-M3zXDy9L.cjs → index-BTt24r3U.cjs} +1 -1
  11. package/dist/{index-CxN0M9fQ.cjs → index-BUxzwz5l.cjs} +1 -1
  12. package/dist/{index-CslNKS_G.js → index-BpJeYb4X.js} +1 -1
  13. package/dist/{index-6-mEl2PZ.cjs → index-CBHJLZo4.cjs} +1 -1
  14. package/dist/{index-Bo0ZGJXk.js → index-COPrDtid.js} +1 -1
  15. package/dist/index-CVBCwf2F.cjs +6 -0
  16. package/dist/{index-BXC130YR.cjs → index-CbphQpiC.cjs} +1 -1
  17. package/dist/{index-s4Vmrqq6.js → index-CdEEK8I0.js} +1 -1
  18. package/dist/{index-BlZCBhoV.cjs → index-ChXKNVG8.cjs} +1 -1
  19. package/dist/{index-CXEcGiRI.cjs → index-CqJa9o1o.cjs} +1 -1
  20. package/dist/{index-BkT-XiOy.cjs → index-CumtOgAw.cjs} +1 -1
  21. package/dist/{index-DgkvmuCO.js → index-CyQkKXnK.js} +2 -2
  22. package/dist/{index-DhAWSBik.js → index-DLartnmY.js} +1 -1
  23. package/dist/{index-D1P-7PDN.cjs → index-DVEWSdUo.cjs} +1 -1
  24. package/dist/{index-DRe0xZFb.js → index-DWiZqfBA.js} +3 -3
  25. package/dist/{index-D2YaYhA8.js → index-DmoecEm1.js} +5 -5
  26. package/dist/{index-BpyGVTxP.js → index-DxyREQkR.js} +24 -24
  27. package/dist/{index-C2ILbsGr.js → index-EIbm0jBZ.js} +7 -7
  28. package/dist/{index-xFvUGDWt.cjs → index-EQOXj03f.cjs} +1 -1
  29. package/dist/{index-iFmFROWN.js → index-QWm4yJ7u.js} +2 -2
  30. package/dist/{index-DMXOKEu9.js → index-b_11tfuG.js} +4 -4
  31. package/dist/index-smYHb1Ta.js +456 -0
  32. package/dist/{index-XmWX5yOU.cjs → index-uMboxmjq.cjs} +1 -1
  33. package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-B5ZzVN6N.cjs → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CgrtbAG0.cjs} +1 -1
  34. package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-ClvYugd-.js → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CqiRIG3B.js} +2 -2
  35. package/dist/{main-BIEa95EI.js → main-DAPxADXM.js} +4 -4
  36. package/dist/{main-GNd3rC4M.cjs → main-DS-YP1Wn.cjs} +1 -1
  37. package/dist/{request-DXZzznPD.js → request-BK6KCyS9.js} +1 -1
  38. package/dist/{request-D1wShRmC.cjs → request-BrHEv9dn.cjs} +1 -1
  39. package/dist/ss-component.cjs +1 -1
  40. package/dist/ss-component.css +1 -1
  41. package/dist/ss-component.js +6 -6
  42. package/dist/ss-component2.cjs +1 -1
  43. package/dist/ss-component2.js +1 -1
  44. package/package.json +1 -1
  45. package/dist/index-C6JoteVx.cjs +0 -1
  46. package/dist/index-Ciz4VEwQ.cjs +0 -6
  47. package/dist/index-DMWw9Hxm.js +0 -454
@@ -1,454 +0,0 @@
1
- import { ref as T, watch as Se, onMounted as Qe, createElementBlock as W, openBlock as J, createBlock as Ve, createVNode as _e, createSlots as Xe, withCtx as Y, Fragment as Ye, renderList as Ze, createElementVNode as Z, normalizeStyle as Me, toDisplayString as M, createCommentVNode as we } from "vue";
2
- import { g as Le, c as el, d as Fe, s as je } from "./menu-BIINB-0Y.js";
3
- import { a as ll, b as al, s as il } from "./index-Us9Ktk0Q.js";
4
- import { c as A } from "./cloneDeep-DIp5Djvp.js";
5
- import { _ as rl } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- const $e = (o, f) => {
7
- const e = o.storage || sessionStorage, l = o.key || f.$id;
8
- if (o.paths) {
9
- const i = o.paths.reduce((n, t) => (n[t] = f.$state[t], n), {});
10
- e.setItem(l, JSON.stringify(i));
11
- } else
12
- e.setItem(l, JSON.stringify(f.$state));
13
- };
14
- var sl = ({ options: o, store: f }) => {
15
- var e, l, i, n;
16
- if ((e = o.persist) != null && e.enabled) {
17
- const t = [{
18
- key: f.$id,
19
- storage: sessionStorage
20
- }], v = (i = (l = o.persist) == null ? void 0 : l.strategies) != null && i.length ? (n = o.persist) == null ? void 0 : n.strategies : t;
21
- v.forEach((D) => {
22
- const k = D.storage || sessionStorage, _ = D.key || f.$id, N = k.getItem(_);
23
- N && (f.$patch(JSON.parse(N)), $e(D, f));
24
- }), f.$subscribe(() => {
25
- v.forEach((D) => {
26
- $e(D, f);
27
- });
28
- });
29
- }
30
- };
31
- const w = Le() || el();
32
- w.use(sl);
33
- const nl = Fe("formToTableComp", {
34
- state: () => ({
35
- selectArray: [],
36
- selectString: ""
37
- }),
38
- actions: {
39
- setSelectArray(o) {
40
- this.selectArray = o;
41
- },
42
- setSelectString(o) {
43
- this.selectString = o;
44
- }
45
- }
46
- }), ol = Fe("unit", {
47
- state: () => ({
48
- selectIndex: "",
49
- selectMenu: "",
50
- selectTitle: []
51
- }),
52
- actions: {
53
- setSelectIndex(o) {
54
- this.selectIndex = o;
55
- },
56
- setSelectMenu(o) {
57
- this.selectMenu = o;
58
- },
59
- setSelectTitle(o) {
60
- this.selectTitle = o;
61
- }
62
- }
63
- }), dl = (o, f) => {
64
- const e = f == null ? void 0 : f.split("-");
65
- return He(o, e);
66
- }, He = (o, f) => {
67
- var i;
68
- let e = o, l = f;
69
- return Array.isArray(e) ? e = e == null ? void 0 : e[parseInt(A(l == null ? void 0 : l[0]))] : Array.isArray(e == null ? void 0 : e.children) && (e = (i = e == null ? void 0 : e.children) == null ? void 0 : i[parseInt(A(l == null ? void 0 : l[0]))]), l == null || l.shift(), (l == null ? void 0 : l.length) > 0 && (e = He(e, l)), e;
70
- }, Pe = (o, f) => {
71
- let e = o, l = f;
72
- return Array.isArray(e) && (e = e == null ? void 0 : e.map((i, n) => {
73
- if (Array.isArray(i)) {
74
- let t = {};
75
- return i = i == null ? void 0 : i.forEach((v, D) => {
76
- var k;
77
- (k = l == null ? void 0 : l[D]) != null && k.prop ? t[l[D].prop] = v : Array.isArray(v) && (t.children = Pe(v, l));
78
- }), Object.assign(t, { id: n });
79
- } else
80
- return i;
81
- })), e;
82
- }, Re = (o, f, e) => {
83
- let l = o, i = f;
84
- return l = l == null ? void 0 : l.map((n, t) => {
85
- var v, D;
86
- return !Array.isArray(n) || !((v = i == null ? void 0 : i[t]) != null && v.label) && !e || (n.unshift(((D = i == null ? void 0 : i[t]) == null ? void 0 : D.label) ?? ""), n.some((k) => Array.isArray(k)) && (n = n == null ? void 0 : n.map((k) => {
87
- var _;
88
- return Array.isArray(k) && (k = Re(k, (_ = i == null ? void 0 : i[t]) == null ? void 0 : _.children, e)), k;
89
- }))), n;
90
- }), l;
91
- }, cl = (o, f, e) => {
92
- if (f === "")
93
- return o == null ? void 0 : o.filter((l) => (l == null ? void 0 : l.id) !== e);
94
- {
95
- const l = f.split("-");
96
- return fl(o, l, e);
97
- }
98
- }, fl = (o, f, e) => {
99
- let l = o, i = f;
100
- return (i == null ? void 0 : i.length) === 0 ? l = l == null ? void 0 : l.filter((n) => n.id !== e) : l = l == null ? void 0 : l.map((n) => (n.id.toString() === (i == null ? void 0 : i[0]) && (i == null || i.shift(), n = Je(n, i, e)), n)), l;
101
- }, Je = (o, f, e) => {
102
- var n, t;
103
- let l = o, i = f;
104
- return (i == null ? void 0 : i.length) === 0 ? l.children = (n = l.children) == null ? void 0 : n.filter((v) => v.id !== e) : l.children = (t = l.children) == null ? void 0 : t.map((v) => (v.id.toString() === (i == null ? void 0 : i[0]) && (i == null || i.shift(), v = Je(v, i, e)), v)), l;
105
- }, ul = (o, f, e) => {
106
- if (f === "")
107
- return e;
108
- {
109
- const l = f.split("-");
110
- return hl(o, l, e);
111
- }
112
- }, hl = (o, f, e) => {
113
- let l = o, i = f;
114
- return (i == null ? void 0 : i.length) === 0 ? l = e : l = l == null ? void 0 : l.map((n) => (n.id.toString() === (i == null ? void 0 : i[0]) && (i == null || i.shift(), n = ze(n, i, e)), n)), l;
115
- }, ze = (o, f, e) => {
116
- var n;
117
- let l = o, i = f;
118
- return (i == null ? void 0 : i.length) === 0 ? l.children = e : l.children = (n = l.children) == null ? void 0 : n.map((t) => (t.id.toString() === (i == null ? void 0 : i[0]) && (i == null || i.shift(), t = ze(t, i, e)), t)), l;
119
- }, F = T(0), G = (o) => (F.value++, o == null ? void 0 : o.map((e) => Array.isArray(e) ? G(e) : {
120
- label: (e == null ? void 0 : e.label) ?? "",
121
- prop: (e == null ? void 0 : e.label) === "操作" ? "operate" : (e == null ? void 0 : e.prop) ?? "a" + F.value,
122
- width: e != null && e.width ? parseInt(e.width) : "",
123
- fixed: (e == null ? void 0 : e.fixed) ?? void 0,
124
- sortable: (e == null ? void 0 : e.sortable) ?? !1,
125
- align: (e == null ? void 0 : e.align) ?? "center",
126
- showOverflowTooltip: (e == null ? void 0 : e.showOverflowTooltip) ?? !0,
127
- isNotDrag: (e == null ? void 0 : e.isNotDrag) ?? !1,
128
- isEditCol: (e == null ? void 0 : e.isEditCol) ?? !1,
129
- isOperate: (e == null ? void 0 : e.isOperate) ?? !1,
130
- id: (e == null ? void 0 : e.id) ?? F.value,
131
- type: (e == null ? void 0 : e.label) === "操作" ? "operate" : void 0,
132
- formType: (e == null ? void 0 : e.formType) ?? "",
133
- isHidden: e == null ? void 0 : e.isHidden,
134
- options: (e == null ? void 0 : e.options) ?? [],
135
- children: G(e.children) ?? void 0
136
- })), pl = (o) => {
137
- const f = [];
138
- function e(l) {
139
- if (Array.isArray(l))
140
- for (const i of l)
141
- !i.children || i.children.length === 0 ? f.push(i) : e(i.children);
142
- }
143
- return e(o), f;
144
- }, Be = (o) => A(o).map((e) => (Array.isArray(e) && (e = e.map((l) => (Array.isArray(l) ? l = G(l) : (l = {
145
- label: (l == null ? void 0 : l.label) ?? "",
146
- prop: (l == null ? void 0 : l.label) === "操作" ? "operate" : (l == null ? void 0 : l.prop) ?? "a" + F.value,
147
- width: l != null && l.width ? parseInt(l.width) : "",
148
- fixed: (l == null ? void 0 : l.fixed) ?? void 0,
149
- sortable: (l == null ? void 0 : l.sortable) ?? !1,
150
- align: (l == null ? void 0 : l.align) ?? "center",
151
- showOverflowTooltip: (l == null ? void 0 : l.showOverflowTooltip) ?? !0,
152
- isNotDrag: (l == null ? void 0 : l.isNotDrag) ?? !1,
153
- isEditCol: (l == null ? void 0 : l.isEditCol) ?? !1,
154
- isOperate: (l == null ? void 0 : l.isOperate) ?? !1,
155
- id: (l == null ? void 0 : l.id) ?? F.value,
156
- type: (l == null ? void 0 : l.label) === "操作" ? "operate" : void 0,
157
- formType: (l == null ? void 0 : l.formType) ?? "",
158
- isHidden: l == null ? void 0 : l.isHidden,
159
- options: (l == null ? void 0 : l.options) ?? [],
160
- children: G(l.children)
161
- }, F.value++), l))), e)), L = (o, f) => {
162
- var i;
163
- if (f.length === 0) return o;
164
- let e = o;
165
- const l = parseInt(f[0]);
166
- if (isNaN(l) || l < 0 || l >= e.length)
167
- return null;
168
- if (e = e[l], f.length - 1 === 0) {
169
- if (e && Array.isArray(e[e.length - 1]))
170
- return e[e.length - 1];
171
- if (Array.isArray(e))
172
- return e;
173
- }
174
- return e && Array.isArray(e[e.length - 1]) && (f.shift(), Array.isArray((i = e[e.length - 1]) == null ? void 0 : i[0]) ? e = L(e[e.length - 1], f) : e = L([e[e.length - 1]], f)), e;
175
- }, tl = { class: "table-content" }, gl = ["onClick"], yl = {
176
- key: 0,
177
- class: "dialog-footer"
178
- }, Al = {
179
- __name: "index",
180
- props: {
181
- itemData: {
182
- type: Array,
183
- default: () => []
184
- },
185
- childItemData: {
186
- type: Array,
187
- default: () => []
188
- },
189
- index: Number,
190
- changedContent: {
191
- type: Object,
192
- default: () => {
193
- }
194
- }
195
- },
196
- emits: ["change", "contentChange", "onButtonClick"],
197
- setup(o, { emit: f }) {
198
- const e = o, l = f, i = T([]), n = T([]), t = T(""), v = T(), D = T(!0), k = T(0), _ = T(!1), N = T(""), j = T(!1), z = T([]), q = T(!1), I = T([]), Q = T([]), ee = T(), K = T(), Ke = nl(w), H = T(), U = ol(w), { selectIndex: le, selectMenu: C, selectTitle: V } = je(U), { selectString: $ } = je(Ke), Ue = T(720), We = () => {
199
- j.value = !1;
200
- }, Ge = (s) => {
201
- var c, h, r, u, p, b;
202
- if (ie(s), s != null && s.children && Array.isArray(s == null ? void 0 : s.children)) {
203
- const g = !Array.isArray(V.value) && ((c = V.value) == null ? void 0 : c.key) !== "main" ? [] : V.value;
204
- g.push({
205
- key: C.value === "" ? (h = s == null ? void 0 : s.id) == null ? void 0 : h.toString() : C.value + "-" + ((r = s == null ? void 0 : s.id) == null ? void 0 : r.toString()),
206
- value: s[(u = Object.keys(s)) == null ? void 0 : u.filter((y) => y !== "index" && y !== "id")[0]]
207
- }), U.setSelectMenu(C.value === "" ? (p = s == null ? void 0 : s.id) == null ? void 0 : p.toString() : C.value + "-" + ((b = s == null ? void 0 : s.id) == null ? void 0 : b.toString())), U.setSelectTitle(g), U.setSelectIndex(e != null && e.index || (e == null ? void 0 : e.index) === 0 ? e == null ? void 0 : e.index.toString() : "");
208
- }
209
- }, ae = (s) => {
210
- var h;
211
- const c = (h = A(e.itemData)) == null ? void 0 : h.map((r) => ((r == null ? void 0 : r.key) === "tableContents" && (r.contents = s), r));
212
- l("contentChange", {
213
- contents: c,
214
- index: e.index
215
- });
216
- };
217
- Se(
218
- () => e.changedContent,
219
- (s) => {
220
- var r, u;
221
- if (!e.changedContent) return;
222
- let c = (r = n.value) == null ? void 0 : r.map((p) => {
223
- var b;
224
- return p.id === ((b = e.changedContent) == null ? void 0 : b.id) && (p = {
225
- ...e.changedContent,
226
- id: e.changedContent.newId
227
- }, delete p.newId), p;
228
- });
229
- const h = (u = e.itemData) == null ? void 0 : u.map((p) => ((p == null ? void 0 : p.key) === "tableContents" && (p.contents = c), p));
230
- n.value = c, l("contentChange", {
231
- contents: h,
232
- index: e.index
233
- }), l("change", {
234
- content: c,
235
- index: e == null ? void 0 : e.index,
236
- buttonName: ""
237
- });
238
- },
239
- { deep: !0, immediate: !0 }
240
- );
241
- const ie = (s) => {
242
- var c;
243
- if (s != null && s.children && Array.isArray(s == null ? void 0 : s.children)) {
244
- let h = [];
245
- const r = A(ee.value);
246
- (c = s == null ? void 0 : s.children) == null || c.forEach((u, p) => {
247
- if (!Array.isArray(u))
248
- h.push(u);
249
- else {
250
- let b = {};
251
- u == null || u.forEach((g, y) => {
252
- var P;
253
- (P = r == null ? void 0 : r[y]) != null && P.prop ? b[r[y].prop] = g : Array.isArray(g) && (b.children = g);
254
- }), h.push(Object.assign(b, { id: p }));
255
- }
256
- }), n.value = h;
257
- }
258
- }, re = (s, c) => {
259
- var h;
260
- if (t.value = "", q.value = !0, D.value = !0, l("onButtonClick", s, c), s === "删除") {
261
- console.log("删除1", n.value, c), n.value = (h = A(n.value)) == null ? void 0 : h.filter((u) => (u == null ? void 0 : u.id) !== (c == null ? void 0 : c.id)), console.log("删除2", n.value, c);
262
- const r = cl(H.value, C.value, c == null ? void 0 : c.id);
263
- console.log("删除3", r, c), console.log("删除31", H.value, C.value, c == null ? void 0 : c.id), ae(r), l("change", {
264
- content: r,
265
- singleContent: c,
266
- index: e == null ? void 0 : e.index,
267
- buttonName: s
268
- });
269
- } else s === "新增" ? (N.value = "新增", X(""), j.value = !0) : s === "编辑" ? (N.value = "编辑", X(c), j.value = !0) : s === "详情" && (N.value = "详情", X(c), q.value = !1, D.value = !1, j.value = !0);
270
- }, X = (s) => {
271
- var h;
272
- const c = [];
273
- (h = A(i.value)) == null || h.forEach((r, u) => {
274
- r.label !== "" && (r == null ? void 0 : r.label) !== "操作" && c.push({
275
- label: (r == null ? void 0 : r.label) ?? "",
276
- name: (r == null ? void 0 : r.prop) ?? "t" + u,
277
- type: !(r != null && r.formType) || (r == null ? void 0 : r.formType) === "" ? "Input" : r == null ? void 0 : r.formType,
278
- value: (s == null ? void 0 : s[r == null ? void 0 : r.prop]) ?? "",
279
- id: (r == null ? void 0 : r.id) ?? u,
280
- contents: (r == null ? void 0 : r.options) ?? [],
281
- width: 1,
282
- isHidden: r == null ? void 0 : r.isHidden
283
- });
284
- }), s === "" || !s || (t.value = s == null ? void 0 : s.id), Q.value = c, console.log(111, Q.value);
285
- };
286
- Qe(() => {
287
- });
288
- const qe = () => {
289
- let s, c = A(n.value);
290
- t.value === "" ? (k.value++, c.push(Object.assign(K.value, { id: k.value })), s = Object.assign(K.value, { id: k.value })) : c = c == null ? void 0 : c.map((r) => ((r == null ? void 0 : r.id) === t.value && (r = Object.assign(r, K.value), s = r), r)), n.value = c;
291
- const h = ul(H.value, C.value, c);
292
- ae(h), j.value = !1, l("change", {
293
- content: h,
294
- singleContent: s,
295
- index: e == null ? void 0 : e.index,
296
- buttonName: N.value
297
- });
298
- }, Ie = (s) => {
299
- K.value = s;
300
- };
301
- return Se(
302
- () => [e.itemData, $.value, le.value, C.value],
303
- () => {
304
- var P, se, ne, oe, de, ce, fe, ue, he, pe, te, ge, ye, Ae, be, ve, Te, ke, De, Oe, me, Ce;
305
- console.log(666, e.itemData);
306
- const s = (P = A(e.itemData)) == null ? void 0 : P.filter((d) => (d == null ? void 0 : d.key) === "header"), c = (se = A(e.itemData)) == null ? void 0 : se.filter((d) => (d == null ? void 0 : d.key) === "tableIndexColumn")[0], h = (ne = A(e.itemData)) == null ? void 0 : ne.find((d) => (d == null ? void 0 : d.key) === "page"), r = (oe = A(e.itemData)) == null ? void 0 : oe.find((d) => (d == null ? void 0 : d.key) === "rowButton"), u = (de = A(e.itemData)) == null ? void 0 : de.find((d) => (d == null ? void 0 : d.key) === "extraButton"), p = (ce = A(e.itemData)) == null ? void 0 : ce.filter((d) => (d == null ? void 0 : d.key) === "tableContents"), b = (fe = A(e.itemData)) == null ? void 0 : fe.filter((d) => (d == null ? void 0 : d.key) === "tableIndex");
307
- _.value = (h == null ? void 0 : h.contents) ?? !0;
308
- let g = [];
309
- $.value === "" ? g = s == null ? void 0 : s[0] : g = (s == null ? void 0 : s.find((d) => (d == null ? void 0 : d.selectLabel) === "(" + $.value + ")")) ?? (s == null ? void 0 : s.find((d) => !(d != null && d.selectLabel)));
310
- let y = [];
311
- if ($.value === "" ? y = b == null ? void 0 : b[0] : y = (b == null ? void 0 : b.find((d) => (d == null ? void 0 : d.selectLabel) === "(" + $.value + ")")) ?? (b == null ? void 0 : b.find((d) => !(d != null && d.selectLabel))), ((ue = g == null ? void 0 : g.contents) == null ? void 0 : ue.length) > 0) {
312
- let d = [];
313
- if (y != null && y.contents && ((he = y == null ? void 0 : y.contents) == null ? void 0 : he.length) !== 0 && d.push({
314
- label: (c == null ? void 0 : c.contents) ?? "",
315
- prop: "index",
316
- sortable: !1
317
- }), g != null && g.contents.some((a) => Array.isArray(a) && (a == null ? void 0 : a.find((O) => O.children)))) {
318
- if (C.value === "")
319
- d = (pe = Be(A(g == null ? void 0 : g.contents))[0]) == null ? void 0 : pe.filter((a) => !Array.isArray(a));
320
- else {
321
- const a = C.value.split("-");
322
- d = (te = L(Be(A(g == null ? void 0 : g.contents)), a)) == null ? void 0 : te.filter((O) => !Array.isArray(O));
323
- }
324
- d.unshift({
325
- label: (c == null ? void 0 : c.contents) ?? "",
326
- prop: "index",
327
- sortable: !1
328
- });
329
- } else
330
- (ge = g == null ? void 0 : g.contents) == null || ge.forEach((a, O) => {
331
- (a == null ? void 0 : a.label) !== "" && d.push({
332
- label: (a == null ? void 0 : a.label) ?? "",
333
- prop: (a == null ? void 0 : a.label) === "操作" ? "operate" : (a == null ? void 0 : a.prop) ?? "a" + O,
334
- width: a != null && a.width ? parseInt(a.width) : "",
335
- fixed: (a == null ? void 0 : a.fixed) ?? void 0,
336
- sortable: (a == null ? void 0 : a.sortable) ?? !1,
337
- align: (a == null ? void 0 : a.align) ?? "center",
338
- showOverflowTooltip: (a == null ? void 0 : a.showOverflowTooltip) ?? !0,
339
- isNotDrag: (a == null ? void 0 : a.isNotDrag) ?? !1,
340
- isEditCol: (a == null ? void 0 : a.isEditCol) ?? !1,
341
- isOperate: (a == null ? void 0 : a.isOperate) ?? !1,
342
- id: (a == null ? void 0 : a.id) ?? O,
343
- type: (a == null ? void 0 : a.label) === "操作" ? "operate" : void 0,
344
- formType: (a == null ? void 0 : a.formType) ?? "",
345
- isHidden: a == null ? void 0 : a.isHidden,
346
- options: (a == null ? void 0 : a.options) ?? []
347
- });
348
- });
349
- i.value = d;
350
- let B = (Ae = (ye = pl(A(i.value))) == null ? void 0 : ye.filter((a) => (a == null ? void 0 : a.type) !== "operate")) == null ? void 0 : Ae.map((a, O) => ({
351
- prop: (a == null ? void 0 : a.prop) ?? "a" + O
352
- }));
353
- ee.value = B;
354
- let S = [];
355
- if ($.value === "" ? S = p == null ? void 0 : p[0] : S = (p == null ? void 0 : p.find((a) => (a == null ? void 0 : a.selectLabel) === "(" + $.value + ")")) ?? (p == null ? void 0 : p.find((a) => !(a != null && a.selectLabel))), ((be = S == null ? void 0 : S.contents) == null ? void 0 : be.length) !== 0) {
356
- let a = A(S == null ? void 0 : S.contents);
357
- y != null && y.contents && ((ve = y == null ? void 0 : y.contents) == null ? void 0 : ve.length) !== 0 && (a = (Te = A(a)) == null ? void 0 : Te.map((m, Ee) => {
358
- if (!Array.isArray(m)) {
359
- let E = {};
360
- for (let x in m)
361
- x !== "id" && x !== "index" && (E[x] = m[x]);
362
- m = Object.values(E);
363
- }
364
- return m;
365
- }));
366
- const O = !!((ke = i.value) != null && ke.find((m) => m.prop === "index"));
367
- a = Re(A(a), y == null ? void 0 : y.contents, O);
368
- const R = [];
369
- a == null || a.forEach((m, Ee) => {
370
- let E = {};
371
- Array.isArray(m) ? m == null || m.forEach((x, xe) => {
372
- var Ne;
373
- (Ne = B == null ? void 0 : B[xe]) != null && Ne.prop && !Array.isArray(x) ? E[B[xe].prop] = x : Array.isArray(x) && (E.children = Pe(x, B));
374
- }) : E = m, E.id ? R.push(E) : R.push(Object.assign(E, { id: Ee }));
375
- }), n.value = R;
376
- } else {
377
- let a = (De = A(B)) == null ? void 0 : De.reduce((O, R) => (O[R.prop] = "测试数据", O), {});
378
- v.value = a, n.value = [Object.assign({}, v.value, { id: k.value })];
379
- }
380
- } else
381
- i.value = [], n.value = [];
382
- if (((Oe = r == null ? void 0 : r.contents) == null ? void 0 : Oe.length) > 0 ? z.value = r == null ? void 0 : r.contents : z.value = [], ((me = u == null ? void 0 : u.contents) == null ? void 0 : me.length) > 0 ? I.value = u == null ? void 0 : u.contents : I.value = [], k.value = ((Ce = n == null ? void 0 : n.value) == null ? void 0 : Ce.length) ?? 0, le.value !== "") {
383
- const d = dl(A(n.value), C.value);
384
- H.value = n.value, ie(d);
385
- } else
386
- H.value = n.value;
387
- },
388
- { deep: !0, immediate: !0 }
389
- ), (s, c) => {
390
- var h;
391
- return J(), W("div", tl, [
392
- (J(), Ve(ll, {
393
- columns: i.value,
394
- key: i.value,
395
- tableData: n.value,
396
- isShowPagination: _.value,
397
- isShowEdit: !1,
398
- isShowDelete: !1,
399
- onDbClickRow: Ge,
400
- extraButton: I.value,
401
- onButtonClick: c[0] || (c[0] = (r) => re(r, ""))
402
- }, Xe({ _: 2 }, [
403
- ((h = z.value) == null ? void 0 : h.length) > 0 ? {
404
- name: "actions",
405
- fn: Y(({ item: r }) => [
406
- (J(!0), W(Ye, null, Ze(z.value, (u, p) => (J(), W("div", { key: p }, [
407
- Z("div", {
408
- style: Me({ color: u == null ? void 0 : u.textColor }),
409
- class: "extra-button-label",
410
- onClick: (b) => re(u == null ? void 0 : u.label, r)
411
- }, M(u == null ? void 0 : u.label), 13, gl)
412
- ]))), 128))
413
- ]),
414
- key: "0"
415
- } : void 0
416
- ]), 1032, ["columns", "tableData", "isShowPagination", "extraButton"])),
417
- _e(al, {
418
- title: N.value,
419
- visible: j.value,
420
- width: Ue.value,
421
- onBeforeDestroy: We
422
- }, {
423
- default: Y(() => [
424
- _e(il, {
425
- rowContents: Q.value,
426
- isEnableWrap: !1,
427
- onChange: Ie,
428
- isEdit: D.value
429
- }, null, 8, ["rowContents", "isEdit"])
430
- ]),
431
- footer: Y(() => [
432
- q.value ? (J(), W("div", yl, [
433
- Z("div", {
434
- onClick: c[1] || (c[1] = (r) => j.value = !1),
435
- class: "cancel-button"
436
- }, M("取消")),
437
- Z("div", {
438
- class: "ok-button",
439
- onClick: qe
440
- }, M("确认"))
441
- ])) : we("", !0)
442
- ]),
443
- _: 1
444
- }, 8, ["title", "visible", "width"])
445
- ]);
446
- };
447
- }
448
- }, Ol = /* @__PURE__ */ rl(Al, [["__scopeId", "data-v-9b95f8c6"]]);
449
- export {
450
- ol as a,
451
- w as p,
452
- Ol as s,
453
- nl as u
454
- };