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,6 +1,6 @@
1
1
  import { ref as a, defineComponent as n, reactive as l, onMounted as s, createElementBlock as r, openBlock as c, createVNode as o } from "vue";
2
- import { s as u } from "./index-Us9Ktk0Q.js";
3
- import { s as i } from "./index-DMWw9Hxm.js";
2
+ import { s as u } from "./index-B3iQoZwc.js";
3
+ import { s as i } from "./index-smYHb1Ta.js";
4
4
  import { _ as m } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
5
  const b = a([
6
6
  {
@@ -1,11 +1,11 @@
1
1
  import { createElementBlock as r, openBlock as n, Fragment as k, renderList as y, unref as F, createElementVNode as c, createBlock as h, resolveDynamicComponent as $, toDisplayString as C, ref as I, watch as L, resolveComponent as b, createVNode as R, withCtx as g, createCommentVNode as T } from "vue";
2
- import { s as U, g as M } from "./array-BTFJdCPJ.js";
3
- import { p as V } from "./index-DMWw9Hxm.js";
4
- import { E as j } from "./index-BoTaQZEe.js";
2
+ import { s as U, g as M } from "./array-DyxKeexo.js";
3
+ import { p as V } from "./index-smYHb1Ta.js";
4
+ import { E as j } from "./index-BH3F6_ql.js";
5
5
  import { u as w } from "./modelComp-CHWFvhCq.js";
6
6
  import { s as x } from "./menu-BIINB-0Y.js";
7
7
  import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
- import { c as v } from "./cloneDeep-DIp5Djvp.js";
8
+ import { c as v } from "./cloneDeep-BfzU0pBe.js";
9
9
  const q = { class: "type-select" }, z = ["onClick"], A = { class: "list-icon" }, G = {
10
10
  __name: "index",
11
11
  setup(N) {
@@ -0,0 +1,456 @@
1
+ import { ref as k, watch as Be, onMounted as Ze, createElementBlock as W, openBlock as J, createBlock as Ve, createVNode as Fe, createSlots as Me, withCtx as Z, Fragment as we, renderList as Le, createElementVNode as V, normalizeStyle as ea, toDisplayString as M, createCommentVNode as aa } from "vue";
2
+ import { g as la, c as ia, d as Re, s as Se } from "./menu-BIINB-0Y.js";
3
+ import { a as ra, b as sa, s as na } from "./index-B3iQoZwc.js";
4
+ import { c as A } from "./cloneDeep-BfzU0pBe.js";
5
+ import { _ as oa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const He = (o, c) => {
7
+ const e = o.storage || sessionStorage, a = o.key || c.$id;
8
+ if (o.paths) {
9
+ const l = o.paths.reduce((n, t) => (n[t] = c.$state[t], n), {});
10
+ e.setItem(a, JSON.stringify(l));
11
+ } else
12
+ e.setItem(a, JSON.stringify(c.$state));
13
+ };
14
+ var da = ({ options: o, store: c }) => {
15
+ var e, a, l, n;
16
+ if ((e = o.persist) != null && e.enabled) {
17
+ const t = [{
18
+ key: c.$id,
19
+ storage: sessionStorage
20
+ }], T = (l = (a = o.persist) == null ? void 0 : a.strategies) != null && l.length ? (n = o.persist) == null ? void 0 : n.strategies : t;
21
+ T.forEach((m) => {
22
+ const D = m.storage || sessionStorage, $ = m.key || c.$id, j = D.getItem($);
23
+ j && (c.$patch(JSON.parse(j)), He(m, c));
24
+ }), c.$subscribe(() => {
25
+ T.forEach((m) => {
26
+ He(m, c);
27
+ });
28
+ });
29
+ }
30
+ };
31
+ const w = la() || ia();
32
+ w.use(da);
33
+ const fa = Re("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
+ }), ca = Re("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
+ }), ua = (o, c) => {
64
+ const e = c == null ? void 0 : c.split("-");
65
+ return Je(o, e);
66
+ }, Je = (o, c) => {
67
+ var l;
68
+ let e = o, a = c;
69
+ return Array.isArray(e) ? e = e == null ? void 0 : e[parseInt(A(a == null ? void 0 : a[0]))] : Array.isArray(e == null ? void 0 : e.children) && (e = (l = e == null ? void 0 : e.children) == null ? void 0 : l[parseInt(A(a == null ? void 0 : a[0]))]), a == null || a.shift(), (a == null ? void 0 : a.length) > 0 && (e = Je(e, a)), e;
70
+ }, ze = (o, c) => {
71
+ let e = o, a = c;
72
+ return Array.isArray(e) && (e = e == null ? void 0 : e.map((l, n) => {
73
+ if (Array.isArray(l)) {
74
+ let t = {};
75
+ return l = l == null ? void 0 : l.forEach((T, m) => {
76
+ var D;
77
+ (D = a == null ? void 0 : a[m]) != null && D.prop ? t[a[m].prop] = T : Array.isArray(T) && (t.children = ze(T, a));
78
+ }), Object.assign(t, { id: n });
79
+ } else
80
+ return l;
81
+ })), e;
82
+ }, Ke = (o, c, e) => {
83
+ let a = o, l = c;
84
+ return a = a == null ? void 0 : a.map((n, t) => {
85
+ var T, m;
86
+ return !Array.isArray(n) || !((T = l == null ? void 0 : l[t]) != null && T.label) && !e || (n.unshift(((m = l == null ? void 0 : l[t]) == null ? void 0 : m.label) ?? ""), n.some((D) => Array.isArray(D)) && (n = n == null ? void 0 : n.map((D) => {
87
+ var $;
88
+ return Array.isArray(D) && (D = Ke(D, ($ = l == null ? void 0 : l[t]) == null ? void 0 : $.children, e)), D;
89
+ }))), n;
90
+ }), a;
91
+ }, ha = (o, c, e) => {
92
+ if (c === "")
93
+ return o == null ? void 0 : o.filter((a) => (a == null ? void 0 : a.id) !== e);
94
+ {
95
+ const a = c.split("-");
96
+ return pa(o, a, e);
97
+ }
98
+ }, pa = (o, c, e) => {
99
+ let a = o, l = c;
100
+ return (l == null ? void 0 : l.length) === 0 ? a = a == null ? void 0 : a.filter((n) => n.id !== e) : a = a == null ? void 0 : a.map((n) => (n.id.toString() === (l == null ? void 0 : l[0]) && (l == null || l.shift(), n = Ue(n, l, e)), n)), a;
101
+ }, Ue = (o, c, e) => {
102
+ var n, t;
103
+ let a = o, l = c;
104
+ return (l == null ? void 0 : l.length) === 0 ? a.children = (n = a.children) == null ? void 0 : n.filter((T) => T.id !== e) : a.children = (t = a.children) == null ? void 0 : t.map((T) => (T.id.toString() === (l == null ? void 0 : l[0]) && (l == null || l.shift(), T = Ue(T, l, e)), T)), a;
105
+ }, ya = (o, c, e) => {
106
+ if (c === "")
107
+ return e;
108
+ {
109
+ const a = c.split("-");
110
+ return ga(o, a, e);
111
+ }
112
+ }, ga = (o, c, e) => {
113
+ let a = o, l = c;
114
+ return (l == null ? void 0 : l.length) === 0 ? a = e : a = a == null ? void 0 : a.map((n) => (n.id.toString() === (l == null ? void 0 : l[0]) && (l == null || l.shift(), n = We(n, l, e)), n)), a;
115
+ }, We = (o, c, e) => {
116
+ var n;
117
+ let a = o, l = c;
118
+ return (l == null ? void 0 : l.length) === 0 ? a.children = e : a.children = (n = a.children) == null ? void 0 : n.map((t) => (t.id.toString() === (l == null ? void 0 : l[0]) && (l == null || l.shift(), t = We(t, l, e)), t)), a;
119
+ }, H = k(0), G = (o) => (H.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" + H.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) ?? H.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
+ })), ta = (o) => {
137
+ const c = [];
138
+ function e(a) {
139
+ if (Array.isArray(a))
140
+ for (const l of a)
141
+ !l.children || l.children.length === 0 ? c.push(l) : e(l.children);
142
+ }
143
+ return e(o), c;
144
+ }, Pe = (o) => A(o).map((e) => (Array.isArray(e) && (e = e.map((a) => (Array.isArray(a) ? a = G(a) : (a = {
145
+ label: (a == null ? void 0 : a.label) ?? "",
146
+ prop: (a == null ? void 0 : a.label) === "操作" ? "operate" : (a == null ? void 0 : a.prop) ?? "a" + H.value,
147
+ width: a != null && a.width ? parseInt(a.width) : "",
148
+ fixed: (a == null ? void 0 : a.fixed) ?? void 0,
149
+ sortable: (a == null ? void 0 : a.sortable) ?? !1,
150
+ align: (a == null ? void 0 : a.align) ?? "center",
151
+ showOverflowTooltip: (a == null ? void 0 : a.showOverflowTooltip) ?? !0,
152
+ isNotDrag: (a == null ? void 0 : a.isNotDrag) ?? !1,
153
+ isEditCol: (a == null ? void 0 : a.isEditCol) ?? !1,
154
+ isOperate: (a == null ? void 0 : a.isOperate) ?? !1,
155
+ id: (a == null ? void 0 : a.id) ?? H.value,
156
+ type: (a == null ? void 0 : a.label) === "操作" ? "operate" : void 0,
157
+ formType: (a == null ? void 0 : a.formType) ?? "",
158
+ isHidden: a == null ? void 0 : a.isHidden,
159
+ options: (a == null ? void 0 : a.options) ?? [],
160
+ children: G(a.children)
161
+ }, H.value++), a))), e)), L = (o, c) => {
162
+ var l;
163
+ if (c.length === 0) return o;
164
+ let e = o;
165
+ const a = parseInt(c[0]);
166
+ if (isNaN(a) || a < 0 || a >= e.length)
167
+ return null;
168
+ if (e = e[a], c.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]) && (c.shift(), Array.isArray((l = e[e.length - 1]) == null ? void 0 : l[0]) ? e = L(e[e.length - 1], c) : e = L([e[e.length - 1]], c)), e;
175
+ }, Aa = { class: "table-content" }, ba = ["onClick"], va = {
176
+ key: 0,
177
+ class: "dialog-footer"
178
+ }, Ta = {
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: c }) {
198
+ const e = o, a = c, l = k([]), n = k([]), t = k(""), T = k(), m = k(!0), D = k(0), $ = k(!1), j = k(""), B = k(!1), z = k([]), q = k(!1), I = k([]), Q = k([]), ee = k(), K = k(), Ge = fa(w), P = k(), U = ca(w), { selectIndex: ae, selectMenu: x, selectTitle: X } = Se(U), { selectString: F } = Se(Ge), qe = k(720), Ie = () => {
199
+ B.value = !1;
200
+ }, Qe = (r) => {
201
+ var f, y, i, h, g, v;
202
+ if (ie(r), r != null && r.children && Array.isArray(r == null ? void 0 : r.children)) {
203
+ const p = !Array.isArray(X.value) && ((f = X.value) == null ? void 0 : f.key) !== "main" ? [] : X.value;
204
+ p.push({
205
+ key: x.value === "" ? (y = r == null ? void 0 : r.id) == null ? void 0 : y.toString() : x.value + "-" + ((i = r == null ? void 0 : r.id) == null ? void 0 : i.toString()),
206
+ value: r[(h = Object.keys(r)) == null ? void 0 : h.filter((b) => b !== "index" && b !== "id")[0]]
207
+ }), U.setSelectMenu(x.value === "" ? (g = r == null ? void 0 : r.id) == null ? void 0 : g.toString() : x.value + "-" + ((v = r == null ? void 0 : r.id) == null ? void 0 : v.toString())), U.setSelectTitle(p), U.setSelectIndex(e != null && e.index || (e == null ? void 0 : e.index) === 0 ? e == null ? void 0 : e.index.toString() : "");
208
+ }
209
+ }, le = (r) => {
210
+ var y;
211
+ const f = (y = A(e.itemData)) == null ? void 0 : y.map((i) => ((i == null ? void 0 : i.key) === "tableContents" && (i.contents = r), i));
212
+ a("contentChange", {
213
+ contents: f,
214
+ index: e.index
215
+ });
216
+ };
217
+ Be(
218
+ () => e.changedContent,
219
+ (r) => {
220
+ var i, h;
221
+ if (!e.changedContent) return;
222
+ let f = (i = n.value) == null ? void 0 : i.map((g) => {
223
+ var v;
224
+ return g.id === ((v = e.changedContent) == null ? void 0 : v.id) && (g = {
225
+ ...e.changedContent,
226
+ id: e.changedContent.newId
227
+ }, delete g.newId), g;
228
+ });
229
+ const y = (h = e.itemData) == null ? void 0 : h.map((g) => ((g == null ? void 0 : g.key) === "tableContents" && (g.contents = f), g));
230
+ n.value = f, a("contentChange", {
231
+ contents: y,
232
+ index: e.index
233
+ }), a("change", {
234
+ content: f,
235
+ index: e == null ? void 0 : e.index,
236
+ buttonName: ""
237
+ });
238
+ },
239
+ { deep: !0, immediate: !0 }
240
+ );
241
+ const ie = (r) => {
242
+ var f;
243
+ if (r != null && r.children && Array.isArray(r == null ? void 0 : r.children)) {
244
+ let y = [];
245
+ const i = A(ee.value);
246
+ (f = r == null ? void 0 : r.children) == null || f.forEach((h, g) => {
247
+ if (!Array.isArray(h))
248
+ y.push(h);
249
+ else {
250
+ let v = {};
251
+ h == null || h.forEach((p, b) => {
252
+ var R;
253
+ (R = i == null ? void 0 : i[b]) != null && R.prop ? v[i[b].prop] = p : Array.isArray(p) && (v.children = p);
254
+ }), y.push(Object.assign(v, { id: g }));
255
+ }
256
+ }), n.value = y;
257
+ }
258
+ }, re = (r, f) => {
259
+ var y;
260
+ if (t.value = "", q.value = !0, m.value = !0, a("onButtonClick", r, f), r === "删除") {
261
+ console.log("删除1", n.value, f), n.value = (y = A(n.value)) == null ? void 0 : y.filter((h) => (h == null ? void 0 : h.id) !== (f == null ? void 0 : f.id)), console.log("删除2", n.value, f);
262
+ const i = ha(P.value, x.value, f == null ? void 0 : f.id);
263
+ console.log("删除3", i, f), console.log("删除31", P.value, x.value, f == null ? void 0 : f.id), le(i), a("change", {
264
+ content: i,
265
+ singleContent: f,
266
+ index: e == null ? void 0 : e.index,
267
+ buttonName: r
268
+ });
269
+ } else r === "新增" ? (j.value = "新增", Y(""), B.value = !0) : r === "编辑" ? (j.value = "编辑", Y(f), B.value = !0) : r === "详情" && (j.value = "详情", Y(f), q.value = !1, m.value = !1, B.value = !0);
270
+ }, Y = (r) => {
271
+ var y;
272
+ const f = [];
273
+ (y = A(l.value)) == null || y.forEach((i, h) => {
274
+ i.label !== "" && (i == null ? void 0 : i.label) !== "操作" && f.push({
275
+ label: (i == null ? void 0 : i.label) ?? "",
276
+ name: (i == null ? void 0 : i.prop) ?? "t" + h,
277
+ type: !(i != null && i.formType) || (i == null ? void 0 : i.formType) === "" ? "Input" : i == null ? void 0 : i.formType,
278
+ value: (r == null ? void 0 : r[i == null ? void 0 : i.prop]) ?? "",
279
+ id: (i == null ? void 0 : i.id) ?? h,
280
+ contents: (i == null ? void 0 : i.options) ?? [],
281
+ width: 1,
282
+ isHidden: i == null ? void 0 : i.isHidden
283
+ });
284
+ }), r === "" || !r || (t.value = r == null ? void 0 : r.id), Q.value = f, console.log(111, Q.value);
285
+ };
286
+ Ze(() => {
287
+ });
288
+ const Xe = () => {
289
+ let r, f = A(n.value);
290
+ t.value === "" ? (D.value++, f.push(Object.assign(K.value, { id: D.value })), r = Object.assign(K.value, { id: D.value })) : f = f == null ? void 0 : f.map((i) => ((i == null ? void 0 : i.id) === t.value && (i = Object.assign(i, K.value), r = i), i)), n.value = f;
291
+ const y = ya(P.value, x.value, f);
292
+ le(y), B.value = !1, a("change", {
293
+ content: y,
294
+ singleContent: r,
295
+ index: e == null ? void 0 : e.index,
296
+ buttonName: j.value
297
+ });
298
+ }, Ye = (r) => {
299
+ K.value = r;
300
+ };
301
+ return Be(
302
+ () => [e.itemData, F.value, ae.value, x.value],
303
+ () => {
304
+ var R, se, ne, oe, de, fe, ce, ue, he, pe, ye, ge, te, Ae, be, ve, Te, ke, De, Oe, me, Ee, xe, Ne, _e;
305
+ console.log(666, e.itemData);
306
+ const r = (R = A(e.itemData)) == null ? void 0 : R.filter((d) => (d == null ? void 0 : d.key) === "header"), f = (se = A(e.itemData)) == null ? void 0 : se.filter((d) => (d == null ? void 0 : d.key) === "tableIndexColumn")[0], y = (ne = A(e.itemData)) == null ? void 0 : ne.find((d) => (d == null ? void 0 : d.key) === "page"), i = (oe = A(e.itemData)) == null ? void 0 : oe.find((d) => (d == null ? void 0 : d.key) === "rowButton"), h = (de = A(e.itemData)) == null ? void 0 : de.find((d) => (d == null ? void 0 : d.key) === "extraButton"), g = (fe = A(e.itemData)) == null ? void 0 : fe.filter((d) => (d == null ? void 0 : d.key) === "tableContents"), v = (ce = A(e.itemData)) == null ? void 0 : ce.filter((d) => (d == null ? void 0 : d.key) === "tableIndex");
307
+ $.value = (y == null ? void 0 : y.contents) ?? !0;
308
+ let p = [];
309
+ F.value === "" ? p = r == null ? void 0 : r[0] : p = (r == null ? void 0 : r.find((d) => (d == null ? void 0 : d.selectLabel) === "(" + F.value + ")")) ?? (r == null ? void 0 : r.find((d) => !(d != null && d.selectLabel)));
310
+ let b = [];
311
+ if (F.value === "" ? b = v == null ? void 0 : v[0] : b = (v == null ? void 0 : v.find((d) => (d == null ? void 0 : d.selectLabel) === "(" + F.value + ")")) ?? (v == null ? void 0 : v.find((d) => !(d != null && d.selectLabel))), ((ue = p == null ? void 0 : p.contents) == null ? void 0 : ue.length) > 0) {
312
+ let d = [];
313
+ if (b != null && b.contents && ((he = b == null ? void 0 : b.contents) == null ? void 0 : he.length) !== 0 && d.push({
314
+ label: (f == null ? void 0 : f.contents) ?? "",
315
+ prop: "index",
316
+ sortable: !1
317
+ }), p != null && p.contents.some((u) => Array.isArray(u) && (u == null ? void 0 : u.find((s) => s.children)))) {
318
+ if (x.value === "")
319
+ d = (pe = Pe(A(p == null ? void 0 : p.contents))[0]) == null ? void 0 : pe.filter((u) => !Array.isArray(u));
320
+ else {
321
+ const u = x.value.split("-");
322
+ d = (ye = L(Pe(A(p == null ? void 0 : p.contents)), u)) == null ? void 0 : ye.filter((s) => !Array.isArray(s));
323
+ }
324
+ d.unshift({
325
+ label: (f == null ? void 0 : f.contents) ?? "",
326
+ prop: "index",
327
+ sortable: !1
328
+ });
329
+ } else {
330
+ const u = p != null && p.contents.some((s) => Array.isArray(s)) ? (ge = p == null ? void 0 : p.contents) == null ? void 0 : ge[0] : p == null ? void 0 : p.contents;
331
+ u == null || u.forEach((s, C) => {
332
+ (s == null ? void 0 : s.label) !== "" && d.push({
333
+ label: (s == null ? void 0 : s.label) ?? "",
334
+ prop: (s == null ? void 0 : s.label) === "操作" ? "operate" : (s == null ? void 0 : s.prop) ?? "a" + C,
335
+ width: s != null && s.width ? parseInt(s.width) : "",
336
+ fixed: (s == null ? void 0 : s.fixed) ?? void 0,
337
+ sortable: (s == null ? void 0 : s.sortable) ?? !1,
338
+ align: (s == null ? void 0 : s.align) ?? "center",
339
+ showOverflowTooltip: (s == null ? void 0 : s.showOverflowTooltip) ?? !0,
340
+ isNotDrag: (s == null ? void 0 : s.isNotDrag) ?? !1,
341
+ isEditCol: (s == null ? void 0 : s.isEditCol) ?? !1,
342
+ isOperate: (s == null ? void 0 : s.isOperate) ?? !1,
343
+ id: (s == null ? void 0 : s.id) ?? C,
344
+ type: (s == null ? void 0 : s.label) === "操作" ? "operate" : void 0,
345
+ formType: (s == null ? void 0 : s.formType) ?? "",
346
+ isHidden: s == null ? void 0 : s.isHidden,
347
+ options: (s == null ? void 0 : s.options) ?? []
348
+ });
349
+ });
350
+ }
351
+ l.value = d;
352
+ let S = (Ae = (te = ta(A(l.value))) == null ? void 0 : te.filter((u) => (u == null ? void 0 : u.type) !== "operate")) == null ? void 0 : Ae.map((u, s) => ({
353
+ prop: (u == null ? void 0 : u.prop) ?? "a" + s
354
+ }));
355
+ ee.value = S;
356
+ let O = [];
357
+ if (F.value === "" ? O = g == null ? void 0 : g[0] : O = (g == null ? void 0 : g.find((u) => (u == null ? void 0 : u.selectLabel) === "(" + F.value + ")")) ?? (g == null ? void 0 : g.find((u) => !(u != null && u.selectLabel))), ((be = O == null ? void 0 : O.contents) == null ? void 0 : be.length) !== 0) {
358
+ let u = Array.isArray((ve = O == null ? void 0 : O.contents) == null ? void 0 : ve[0]) && ((Te = O == null ? void 0 : O.contents) != null && Te[0].every((E) => Array.isArray(E))) ? (ke = A(O == null ? void 0 : O.contents)) == null ? void 0 : ke[0] : A(O == null ? void 0 : O.contents);
359
+ b != null && b.contents && ((De = b == null ? void 0 : b.contents) == null ? void 0 : De.length) !== 0 && (u = (Oe = A(u)) == null ? void 0 : Oe.map((E, je) => {
360
+ if (!Array.isArray(E)) {
361
+ let N = {};
362
+ for (let _ in E)
363
+ _ !== "id" && _ !== "index" && (N[_] = E[_]);
364
+ E = Object.values(N);
365
+ }
366
+ return E;
367
+ }));
368
+ const s = !!((me = l.value) != null && me.find((E) => E.prop === "index"));
369
+ u = Ke(A(u), b == null ? void 0 : b.contents, s);
370
+ const C = [];
371
+ u == null || u.forEach((E, je) => {
372
+ let N = {};
373
+ Array.isArray(E) ? E == null || E.forEach((_, Ce) => {
374
+ var $e;
375
+ ($e = S == null ? void 0 : S[Ce]) != null && $e.prop && !Array.isArray(_) ? N[S[Ce].prop] = _ : Array.isArray(_) && (N.children = ze(_, S));
376
+ }) : N = E, N.id ? C.push(N) : C.push(Object.assign(N, { id: je }));
377
+ }), n.value = C;
378
+ } else {
379
+ let u = (Ee = A(S)) == null ? void 0 : Ee.reduce((s, C) => (s[C.prop] = "测试数据", s), {});
380
+ T.value = u, n.value = [Object.assign({}, T.value, { id: D.value })];
381
+ }
382
+ } else
383
+ l.value = [], n.value = [];
384
+ if (((xe = i == null ? void 0 : i.contents) == null ? void 0 : xe.length) > 0 ? z.value = i == null ? void 0 : i.contents : z.value = [], ((Ne = h == null ? void 0 : h.contents) == null ? void 0 : Ne.length) > 0 ? I.value = h == null ? void 0 : h.contents : I.value = [], D.value = ((_e = n == null ? void 0 : n.value) == null ? void 0 : _e.length) ?? 0, ae.value !== "") {
385
+ const d = ua(A(n.value), x.value);
386
+ P.value = n.value, ie(d);
387
+ } else
388
+ P.value = n.value;
389
+ },
390
+ { deep: !0, immediate: !0 }
391
+ ), (r, f) => {
392
+ var y;
393
+ return J(), W("div", Aa, [
394
+ (J(), Ve(ra, {
395
+ columns: l.value,
396
+ key: l.value,
397
+ tableData: n.value,
398
+ isShowPagination: $.value,
399
+ isShowEdit: !1,
400
+ isShowDelete: !1,
401
+ onDbClickRow: Qe,
402
+ extraButton: I.value,
403
+ onButtonClick: f[0] || (f[0] = (i) => re(i, ""))
404
+ }, Me({ _: 2 }, [
405
+ ((y = z.value) == null ? void 0 : y.length) > 0 ? {
406
+ name: "actions",
407
+ fn: Z(({ item: i }) => [
408
+ (J(!0), W(we, null, Le(z.value, (h, g) => (J(), W("div", { key: g }, [
409
+ V("div", {
410
+ style: ea({ color: h == null ? void 0 : h.textColor }),
411
+ class: "extra-button-label",
412
+ onClick: (v) => re(h == null ? void 0 : h.label, i)
413
+ }, M(h == null ? void 0 : h.label), 13, ba)
414
+ ]))), 128))
415
+ ]),
416
+ key: "0"
417
+ } : void 0
418
+ ]), 1032, ["columns", "tableData", "isShowPagination", "extraButton"])),
419
+ Fe(sa, {
420
+ title: j.value,
421
+ visible: B.value,
422
+ width: qe.value,
423
+ onBeforeDestroy: Ie
424
+ }, {
425
+ default: Z(() => [
426
+ Fe(na, {
427
+ rowContents: Q.value,
428
+ isEnableWrap: !1,
429
+ onChange: Ye,
430
+ isEdit: m.value
431
+ }, null, 8, ["rowContents", "isEdit"])
432
+ ]),
433
+ footer: Z(() => [
434
+ q.value ? (J(), W("div", va, [
435
+ V("div", {
436
+ onClick: f[1] || (f[1] = (i) => B.value = !1),
437
+ class: "cancel-button"
438
+ }, M("取消")),
439
+ V("div", {
440
+ class: "ok-button",
441
+ onClick: Xe
442
+ }, M("确认"))
443
+ ])) : aa("", !0)
444
+ ]),
445
+ _: 1
446
+ }, 8, ["title", "visible", "width"])
447
+ ]);
448
+ };
449
+ }
450
+ }, xa = /* @__PURE__ */ oa(Ta, [["__scopeId", "data-v-408ff7f8"]]);
451
+ export {
452
+ ca as a,
453
+ w as p,
454
+ xa as s,
455
+ fa as u
456
+ };