ss-component-new 1.1.112 → 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.
- package/dist/{array-DDbulFhm.cjs → array-BYRvPg11.cjs} +2 -2
- package/dist/{array-r-3zzaCz.js → array-DyxKeexo.js} +98 -95
- package/dist/{cloneDeep-B5NdV18l.js → cloneDeep-BfzU0pBe.js} +1 -1
- package/dist/{cloneDeep-_g-S2Mck.cjs → cloneDeep-WwDap0fL.cjs} +1 -1
- package/dist/{index-DD2e9du_.cjs → index-5dGTUAu_.cjs} +1 -1
- package/dist/{index-BK1KwYhe.js → index-B3iQoZwc.js} +469 -461
- package/dist/{index-DkTmhYif.cjs → index-B4WYIlOz.cjs} +1 -1
- package/dist/{index-4wnUfQut.js → index-BH3F6_ql.js} +5 -5
- package/dist/index-BIRKKGuW.cjs +1 -0
- package/dist/{index-C7z6Nknz.cjs → index-BTt24r3U.cjs} +1 -1
- package/dist/{index-PCZs_buK.cjs → index-BUxzwz5l.cjs} +1 -1
- package/dist/{index-ZfmF7NRS.js → index-BpJeYb4X.js} +1 -1
- package/dist/{index-Hl4jHcdx.cjs → index-CBHJLZo4.cjs} +1 -1
- package/dist/{index-CxYp0SX-.js → index-COPrDtid.js} +1 -1
- package/dist/index-CVBCwf2F.cjs +6 -0
- package/dist/{index-S4VNvRUf.cjs → index-CbphQpiC.cjs} +1 -1
- package/dist/{index-D-vLfoki.js → index-CdEEK8I0.js} +1 -1
- package/dist/{index-KwU7aUzZ.cjs → index-ChXKNVG8.cjs} +1 -1
- package/dist/{index-1aLaqVXO.cjs → index-CqJa9o1o.cjs} +1 -1
- package/dist/{index-DsvTsDUx.cjs → index-CumtOgAw.cjs} +1 -1
- package/dist/{index-DzPlnzff.js → index-CyQkKXnK.js} +2 -2
- package/dist/{index-D0oXay6F.js → index-DLartnmY.js} +1 -1
- package/dist/{index-CqEcYupP.cjs → index-DVEWSdUo.cjs} +1 -1
- package/dist/{index-BGKrZFr8.js → index-DWiZqfBA.js} +3 -3
- package/dist/{index-Dlr47z1k.js → index-DmoecEm1.js} +5 -5
- package/dist/{index-Bu25M4KE.js → index-DxyREQkR.js} +5 -5
- package/dist/{index-n2QU5Ht8.js → index-EIbm0jBZ.js} +7 -7
- package/dist/{index-umHSQ-iv.cjs → index-EQOXj03f.cjs} +1 -1
- package/dist/{index-B7QDZnsI.js → index-QWm4yJ7u.js} +2 -2
- package/dist/{index-DFsdlgzo.js → index-b_11tfuG.js} +4 -4
- package/dist/{index-DtKpPw6N.js → index-smYHb1Ta.js} +180 -180
- package/dist/{index-6XTKeDE8.cjs → index-uMboxmjq.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-Dbr2PMMl.cjs → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CgrtbAG0.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-lBl-SmuD.js → index.vue_vue_type_style_index_0_scoped_bbb8ace9_lang-CqiRIG3B.js} +2 -2
- package/dist/{main-9EPFfW86.js → main-DAPxADXM.js} +4 -4
- package/dist/{main-DjYsizhD.cjs → main-DS-YP1Wn.cjs} +1 -1
- package/dist/{request-CgWld6Ls.js → request-BK6KCyS9.js} +1 -1
- package/dist/{request-BGJRjm5F.cjs → request-BrHEv9dn.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/package.json +1 -1
- package/dist/index-CsP9AIPx.cjs +0 -1
- package/dist/index-oJOjtktc.cjs +0 -6
|
@@ -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-
|
|
3
|
-
import { s as i } from "./index-
|
|
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-
|
|
3
|
-
import { p as V } from "./index-
|
|
4
|
-
import { E as j } from "./index-
|
|
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-
|
|
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) {
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { ref as k, watch as
|
|
2
|
-
import { g as
|
|
3
|
-
import { a as
|
|
4
|
-
import { c as A } from "./cloneDeep-
|
|
5
|
-
import { _ as
|
|
6
|
-
const
|
|
7
|
-
const e = o.storage || sessionStorage, a = o.key ||
|
|
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
8
|
if (o.paths) {
|
|
9
|
-
const l = o.paths.reduce((n, t) => (n[t] =
|
|
9
|
+
const l = o.paths.reduce((n, t) => (n[t] = c.$state[t], n), {});
|
|
10
10
|
e.setItem(a, JSON.stringify(l));
|
|
11
11
|
} else
|
|
12
|
-
e.setItem(a, JSON.stringify(
|
|
12
|
+
e.setItem(a, JSON.stringify(c.$state));
|
|
13
13
|
};
|
|
14
|
-
var
|
|
14
|
+
var da = ({ options: o, store: c }) => {
|
|
15
15
|
var e, a, l, n;
|
|
16
16
|
if ((e = o.persist) != null && e.enabled) {
|
|
17
17
|
const t = [{
|
|
18
|
-
key:
|
|
18
|
+
key: c.$id,
|
|
19
19
|
storage: sessionStorage
|
|
20
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((
|
|
22
|
-
const D =
|
|
23
|
-
|
|
24
|
-
}),
|
|
25
|
-
T.forEach((
|
|
26
|
-
|
|
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
27
|
});
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
const w =
|
|
32
|
-
w.use(
|
|
33
|
-
const
|
|
31
|
+
const w = la() || ia();
|
|
32
|
+
w.use(da);
|
|
33
|
+
const fa = Re("formToTableComp", {
|
|
34
34
|
state: () => ({
|
|
35
35
|
selectArray: [],
|
|
36
36
|
selectString: ""
|
|
@@ -43,7 +43,7 @@ const da = Pe("formToTableComp", {
|
|
|
43
43
|
this.selectString = o;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
}), ca =
|
|
46
|
+
}), ca = Re("unit", {
|
|
47
47
|
state: () => ({
|
|
48
48
|
selectIndex: "",
|
|
49
49
|
selectMenu: "",
|
|
@@ -60,62 +60,62 @@ const da = Pe("formToTableComp", {
|
|
|
60
60
|
this.selectTitle = o;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
}),
|
|
64
|
-
const e =
|
|
65
|
-
return
|
|
66
|
-
},
|
|
63
|
+
}), ua = (o, c) => {
|
|
64
|
+
const e = c == null ? void 0 : c.split("-");
|
|
65
|
+
return Je(o, e);
|
|
66
|
+
}, Je = (o, c) => {
|
|
67
67
|
var l;
|
|
68
|
-
let e = o, a =
|
|
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 =
|
|
70
|
-
},
|
|
71
|
-
let e = o, a =
|
|
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
72
|
return Array.isArray(e) && (e = e == null ? void 0 : e.map((l, n) => {
|
|
73
73
|
if (Array.isArray(l)) {
|
|
74
74
|
let t = {};
|
|
75
|
-
return l = l == null ? void 0 : l.forEach((T,
|
|
75
|
+
return l = l == null ? void 0 : l.forEach((T, m) => {
|
|
76
76
|
var D;
|
|
77
|
-
(D = a == null ? void 0 : a[
|
|
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
78
|
}), Object.assign(t, { id: n });
|
|
79
79
|
} else
|
|
80
80
|
return l;
|
|
81
81
|
})), e;
|
|
82
|
-
},
|
|
83
|
-
let a = o, l =
|
|
82
|
+
}, Ke = (o, c, e) => {
|
|
83
|
+
let a = o, l = c;
|
|
84
84
|
return a = a == null ? void 0 : a.map((n, t) => {
|
|
85
|
-
var T,
|
|
86
|
-
return !Array.isArray(n) || !((T = l == null ? void 0 : l[t]) != null && T.label) && !e || (n.unshift(((
|
|
87
|
-
var
|
|
88
|
-
return Array.isArray(D) && (D =
|
|
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
89
|
}))), n;
|
|
90
90
|
}), a;
|
|
91
|
-
},
|
|
92
|
-
if (
|
|
91
|
+
}, ha = (o, c, e) => {
|
|
92
|
+
if (c === "")
|
|
93
93
|
return o == null ? void 0 : o.filter((a) => (a == null ? void 0 : a.id) !== e);
|
|
94
94
|
{
|
|
95
|
-
const a =
|
|
96
|
-
return
|
|
95
|
+
const a = c.split("-");
|
|
96
|
+
return pa(o, a, e);
|
|
97
97
|
}
|
|
98
|
-
},
|
|
99
|
-
let a = o, l =
|
|
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 =
|
|
101
|
-
},
|
|
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
102
|
var n, t;
|
|
103
|
-
let a = o, l =
|
|
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 =
|
|
105
|
-
},
|
|
106
|
-
if (
|
|
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
107
|
return e;
|
|
108
108
|
{
|
|
109
|
-
const a =
|
|
109
|
+
const a = c.split("-");
|
|
110
110
|
return ga(o, a, e);
|
|
111
111
|
}
|
|
112
|
-
}, ga = (o,
|
|
113
|
-
let a = o, l =
|
|
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 =
|
|
115
|
-
},
|
|
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
116
|
var n;
|
|
117
|
-
let a = o, l =
|
|
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 =
|
|
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
119
|
}, H = k(0), G = (o) => (H.value++, o == null ? void 0 : o.map((e) => Array.isArray(e) ? G(e) : {
|
|
120
120
|
label: (e == null ? void 0 : e.label) ?? "",
|
|
121
121
|
prop: (e == null ? void 0 : e.label) === "操作" ? "operate" : (e == null ? void 0 : e.prop) ?? "a" + H.value,
|
|
@@ -133,15 +133,15 @@ const da = Pe("formToTableComp", {
|
|
|
133
133
|
isHidden: e == null ? void 0 : e.isHidden,
|
|
134
134
|
options: (e == null ? void 0 : e.options) ?? [],
|
|
135
135
|
children: G(e.children) ?? void 0
|
|
136
|
-
})),
|
|
137
|
-
const
|
|
136
|
+
})), ta = (o) => {
|
|
137
|
+
const c = [];
|
|
138
138
|
function e(a) {
|
|
139
139
|
if (Array.isArray(a))
|
|
140
140
|
for (const l of a)
|
|
141
|
-
!l.children || l.children.length === 0 ?
|
|
141
|
+
!l.children || l.children.length === 0 ? c.push(l) : e(l.children);
|
|
142
142
|
}
|
|
143
|
-
return e(o),
|
|
144
|
-
},
|
|
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
145
|
label: (a == null ? void 0 : a.label) ?? "",
|
|
146
146
|
prop: (a == null ? void 0 : a.label) === "操作" ? "operate" : (a == null ? void 0 : a.prop) ?? "a" + H.value,
|
|
147
147
|
width: a != null && a.width ? parseInt(a.width) : "",
|
|
@@ -158,24 +158,24 @@ const da = Pe("formToTableComp", {
|
|
|
158
158
|
isHidden: a == null ? void 0 : a.isHidden,
|
|
159
159
|
options: (a == null ? void 0 : a.options) ?? [],
|
|
160
160
|
children: G(a.children)
|
|
161
|
-
}, H.value++), a))), e)), L = (o,
|
|
161
|
+
}, H.value++), a))), e)), L = (o, c) => {
|
|
162
162
|
var l;
|
|
163
|
-
if (
|
|
163
|
+
if (c.length === 0) return o;
|
|
164
164
|
let e = o;
|
|
165
|
-
const a = parseInt(
|
|
165
|
+
const a = parseInt(c[0]);
|
|
166
166
|
if (isNaN(a) || a < 0 || a >= e.length)
|
|
167
167
|
return null;
|
|
168
|
-
if (e = e[a],
|
|
168
|
+
if (e = e[a], c.length - 1 === 0) {
|
|
169
169
|
if (e && Array.isArray(e[e.length - 1]))
|
|
170
170
|
return e[e.length - 1];
|
|
171
171
|
if (Array.isArray(e))
|
|
172
172
|
return e;
|
|
173
173
|
}
|
|
174
|
-
return e && Array.isArray(e[e.length - 1]) && (
|
|
175
|
-
},
|
|
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
176
|
key: 0,
|
|
177
177
|
class: "dialog-footer"
|
|
178
|
-
},
|
|
178
|
+
}, Ta = {
|
|
179
179
|
__name: "index",
|
|
180
180
|
props: {
|
|
181
181
|
itemData: {
|
|
@@ -194,44 +194,44 @@ const da = Pe("formToTableComp", {
|
|
|
194
194
|
}
|
|
195
195
|
},
|
|
196
196
|
emits: ["change", "contentChange", "onButtonClick"],
|
|
197
|
-
setup(o, { emit:
|
|
198
|
-
const e = o, a =
|
|
199
|
-
|
|
200
|
-
},
|
|
201
|
-
var
|
|
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
202
|
if (ie(r), r != null && r.children && Array.isArray(r == null ? void 0 : r.children)) {
|
|
203
|
-
const p = !Array.isArray(X.value) && ((
|
|
203
|
+
const p = !Array.isArray(X.value) && ((f = X.value) == null ? void 0 : f.key) !== "main" ? [] : X.value;
|
|
204
204
|
p.push({
|
|
205
|
-
key: x.value === "" ? (
|
|
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
206
|
value: r[(h = Object.keys(r)) == null ? void 0 : h.filter((b) => b !== "index" && b !== "id")[0]]
|
|
207
|
-
}), U.setSelectMenu(x.value === "" ? (
|
|
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
208
|
}
|
|
209
209
|
}, le = (r) => {
|
|
210
|
-
var
|
|
211
|
-
const
|
|
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
212
|
a("contentChange", {
|
|
213
|
-
contents:
|
|
213
|
+
contents: f,
|
|
214
214
|
index: e.index
|
|
215
215
|
});
|
|
216
216
|
};
|
|
217
|
-
|
|
217
|
+
Be(
|
|
218
218
|
() => e.changedContent,
|
|
219
219
|
(r) => {
|
|
220
220
|
var i, h;
|
|
221
221
|
if (!e.changedContent) return;
|
|
222
|
-
let
|
|
222
|
+
let f = (i = n.value) == null ? void 0 : i.map((g) => {
|
|
223
223
|
var v;
|
|
224
|
-
return
|
|
224
|
+
return g.id === ((v = e.changedContent) == null ? void 0 : v.id) && (g = {
|
|
225
225
|
...e.changedContent,
|
|
226
226
|
id: e.changedContent.newId
|
|
227
|
-
}, delete
|
|
227
|
+
}, delete g.newId), g;
|
|
228
228
|
});
|
|
229
|
-
const
|
|
230
|
-
n.value =
|
|
231
|
-
contents:
|
|
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
232
|
index: e.index
|
|
233
233
|
}), a("change", {
|
|
234
|
-
content:
|
|
234
|
+
content: f,
|
|
235
235
|
index: e == null ? void 0 : e.index,
|
|
236
236
|
buttonName: ""
|
|
237
237
|
});
|
|
@@ -239,39 +239,39 @@ const da = Pe("formToTableComp", {
|
|
|
239
239
|
{ deep: !0, immediate: !0 }
|
|
240
240
|
);
|
|
241
241
|
const ie = (r) => {
|
|
242
|
-
var
|
|
242
|
+
var f;
|
|
243
243
|
if (r != null && r.children && Array.isArray(r == null ? void 0 : r.children)) {
|
|
244
|
-
let
|
|
244
|
+
let y = [];
|
|
245
245
|
const i = A(ee.value);
|
|
246
|
-
(
|
|
246
|
+
(f = r == null ? void 0 : r.children) == null || f.forEach((h, g) => {
|
|
247
247
|
if (!Array.isArray(h))
|
|
248
|
-
|
|
248
|
+
y.push(h);
|
|
249
249
|
else {
|
|
250
250
|
let v = {};
|
|
251
251
|
h == null || h.forEach((p, b) => {
|
|
252
252
|
var R;
|
|
253
253
|
(R = i == null ? void 0 : i[b]) != null && R.prop ? v[i[b].prop] = p : Array.isArray(p) && (v.children = p);
|
|
254
|
-
}),
|
|
254
|
+
}), y.push(Object.assign(v, { id: g }));
|
|
255
255
|
}
|
|
256
|
-
}), n.value =
|
|
256
|
+
}), n.value = y;
|
|
257
257
|
}
|
|
258
|
-
}, re = (r,
|
|
259
|
-
var
|
|
260
|
-
if (t.value = "", q.value = !0,
|
|
261
|
-
console.log("删除1", n.value,
|
|
262
|
-
const i =
|
|
263
|
-
console.log("删除3", i,
|
|
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
264
|
content: i,
|
|
265
|
-
singleContent:
|
|
265
|
+
singleContent: f,
|
|
266
266
|
index: e == null ? void 0 : e.index,
|
|
267
267
|
buttonName: r
|
|
268
268
|
});
|
|
269
|
-
} else r === "新增" ? (
|
|
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
270
|
}, Y = (r) => {
|
|
271
|
-
var
|
|
272
|
-
const
|
|
273
|
-
(
|
|
274
|
-
i.label !== "" && (i == null ? void 0 : i.label) !== "操作" &&
|
|
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
275
|
label: (i == null ? void 0 : i.label) ?? "",
|
|
276
276
|
name: (i == null ? void 0 : i.prop) ?? "t" + h,
|
|
277
277
|
type: !(i != null && i.formType) || (i == null ? void 0 : i.formType) === "" ? "Input" : i == null ? void 0 : i.formType,
|
|
@@ -281,57 +281,57 @@ const da = Pe("formToTableComp", {
|
|
|
281
281
|
width: 1,
|
|
282
282
|
isHidden: i == null ? void 0 : i.isHidden
|
|
283
283
|
});
|
|
284
|
-
}), r === "" || !r || (t.value = r == null ? void 0 : r.id), Q.value =
|
|
284
|
+
}), r === "" || !r || (t.value = r == null ? void 0 : r.id), Q.value = f, console.log(111, Q.value);
|
|
285
285
|
};
|
|
286
|
-
|
|
286
|
+
Ze(() => {
|
|
287
287
|
});
|
|
288
|
-
const
|
|
289
|
-
let r,
|
|
290
|
-
t.value === "" ? (D.value++,
|
|
291
|
-
const
|
|
292
|
-
le(
|
|
293
|
-
content:
|
|
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
294
|
singleContent: r,
|
|
295
295
|
index: e == null ? void 0 : e.index,
|
|
296
|
-
buttonName:
|
|
296
|
+
buttonName: j.value
|
|
297
297
|
});
|
|
298
|
-
},
|
|
298
|
+
}, Ye = (r) => {
|
|
299
299
|
K.value = r;
|
|
300
300
|
};
|
|
301
|
-
return
|
|
302
|
-
() => [e.itemData,
|
|
301
|
+
return Be(
|
|
302
|
+
() => [e.itemData, F.value, ae.value, x.value],
|
|
303
303
|
() => {
|
|
304
|
-
var R, se, ne, oe, de,
|
|
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
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"),
|
|
307
|
-
|
|
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
308
|
let p = [];
|
|
309
|
-
|
|
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
310
|
let b = [];
|
|
311
|
-
if (
|
|
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
312
|
let d = [];
|
|
313
313
|
if (b != null && b.contents && ((he = b == null ? void 0 : b.contents) == null ? void 0 : he.length) !== 0 && d.push({
|
|
314
|
-
label: (
|
|
314
|
+
label: (f == null ? void 0 : f.contents) ?? "",
|
|
315
315
|
prop: "index",
|
|
316
316
|
sortable: !1
|
|
317
317
|
}), p != null && p.contents.some((u) => Array.isArray(u) && (u == null ? void 0 : u.find((s) => s.children)))) {
|
|
318
318
|
if (x.value === "")
|
|
319
|
-
d = (pe =
|
|
319
|
+
d = (pe = Pe(A(p == null ? void 0 : p.contents))[0]) == null ? void 0 : pe.filter((u) => !Array.isArray(u));
|
|
320
320
|
else {
|
|
321
321
|
const u = x.value.split("-");
|
|
322
|
-
d = (
|
|
322
|
+
d = (ye = L(Pe(A(p == null ? void 0 : p.contents)), u)) == null ? void 0 : ye.filter((s) => !Array.isArray(s));
|
|
323
323
|
}
|
|
324
324
|
d.unshift({
|
|
325
|
-
label: (
|
|
325
|
+
label: (f == null ? void 0 : f.contents) ?? "",
|
|
326
326
|
prop: "index",
|
|
327
327
|
sortable: !1
|
|
328
328
|
});
|
|
329
329
|
} else {
|
|
330
|
-
const u = p != null && p.contents.some((s) => Array.isArray(s)) ? (
|
|
331
|
-
u == null || u.forEach((s,
|
|
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
332
|
(s == null ? void 0 : s.label) !== "" && d.push({
|
|
333
333
|
label: (s == null ? void 0 : s.label) ?? "",
|
|
334
|
-
prop: (s == null ? void 0 : s.label) === "操作" ? "operate" : (s == null ? void 0 : s.prop) ?? "a" +
|
|
334
|
+
prop: (s == null ? void 0 : s.label) === "操作" ? "operate" : (s == null ? void 0 : s.prop) ?? "a" + C,
|
|
335
335
|
width: s != null && s.width ? parseInt(s.width) : "",
|
|
336
336
|
fixed: (s == null ? void 0 : s.fixed) ?? void 0,
|
|
337
337
|
sortable: (s == null ? void 0 : s.sortable) ?? !1,
|
|
@@ -340,7 +340,7 @@ const da = Pe("formToTableComp", {
|
|
|
340
340
|
isNotDrag: (s == null ? void 0 : s.isNotDrag) ?? !1,
|
|
341
341
|
isEditCol: (s == null ? void 0 : s.isEditCol) ?? !1,
|
|
342
342
|
isOperate: (s == null ? void 0 : s.isOperate) ?? !1,
|
|
343
|
-
id: (s == null ? void 0 : s.id) ??
|
|
343
|
+
id: (s == null ? void 0 : s.id) ?? C,
|
|
344
344
|
type: (s == null ? void 0 : s.label) === "操作" ? "operate" : void 0,
|
|
345
345
|
formType: (s == null ? void 0 : s.formType) ?? "",
|
|
346
346
|
isHidden: s == null ? void 0 : s.isHidden,
|
|
@@ -349,108 +349,108 @@ const da = Pe("formToTableComp", {
|
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
351
|
l.value = d;
|
|
352
|
-
let
|
|
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
353
|
prop: (u == null ? void 0 : u.prop) ?? "a" + s
|
|
354
354
|
}));
|
|
355
|
-
ee.value =
|
|
356
|
-
let
|
|
357
|
-
if (
|
|
358
|
-
let u = (ve =
|
|
359
|
-
b != null && b.contents && ((
|
|
360
|
-
if (!Array.isArray(
|
|
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
361
|
let N = {};
|
|
362
|
-
for (let _ in
|
|
363
|
-
_ !== "id" && _ !== "index" && (N[_] =
|
|
364
|
-
|
|
362
|
+
for (let _ in E)
|
|
363
|
+
_ !== "id" && _ !== "index" && (N[_] = E[_]);
|
|
364
|
+
E = Object.values(N);
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return E;
|
|
367
367
|
}));
|
|
368
|
-
const s = !!((
|
|
369
|
-
u =
|
|
370
|
-
const
|
|
371
|
-
u == null || u.forEach((
|
|
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
372
|
let N = {};
|
|
373
|
-
Array.isArray(
|
|
374
|
-
var
|
|
375
|
-
(
|
|
376
|
-
}) : N =
|
|
377
|
-
}), n.value =
|
|
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
378
|
} else {
|
|
379
|
-
let u = (
|
|
379
|
+
let u = (Ee = A(S)) == null ? void 0 : Ee.reduce((s, C) => (s[C.prop] = "测试数据", s), {});
|
|
380
380
|
T.value = u, n.value = [Object.assign({}, T.value, { id: D.value })];
|
|
381
381
|
}
|
|
382
382
|
} else
|
|
383
383
|
l.value = [], n.value = [];
|
|
384
|
-
if (((
|
|
385
|
-
const d =
|
|
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
386
|
P.value = n.value, ie(d);
|
|
387
387
|
} else
|
|
388
388
|
P.value = n.value;
|
|
389
389
|
},
|
|
390
390
|
{ deep: !0, immediate: !0 }
|
|
391
|
-
), (r,
|
|
392
|
-
var
|
|
393
|
-
return J(), W("div",
|
|
394
|
-
(J(),
|
|
391
|
+
), (r, f) => {
|
|
392
|
+
var y;
|
|
393
|
+
return J(), W("div", Aa, [
|
|
394
|
+
(J(), Ve(ra, {
|
|
395
395
|
columns: l.value,
|
|
396
396
|
key: l.value,
|
|
397
397
|
tableData: n.value,
|
|
398
|
-
isShowPagination:
|
|
398
|
+
isShowPagination: $.value,
|
|
399
399
|
isShowEdit: !1,
|
|
400
400
|
isShowDelete: !1,
|
|
401
|
-
onDbClickRow:
|
|
401
|
+
onDbClickRow: Qe,
|
|
402
402
|
extraButton: I.value,
|
|
403
|
-
onButtonClick:
|
|
404
|
-
},
|
|
405
|
-
((
|
|
403
|
+
onButtonClick: f[0] || (f[0] = (i) => re(i, ""))
|
|
404
|
+
}, Me({ _: 2 }, [
|
|
405
|
+
((y = z.value) == null ? void 0 : y.length) > 0 ? {
|
|
406
406
|
name: "actions",
|
|
407
407
|
fn: Z(({ item: i }) => [
|
|
408
|
-
(J(!0), W(
|
|
408
|
+
(J(!0), W(we, null, Le(z.value, (h, g) => (J(), W("div", { key: g }, [
|
|
409
409
|
V("div", {
|
|
410
|
-
style:
|
|
410
|
+
style: ea({ color: h == null ? void 0 : h.textColor }),
|
|
411
411
|
class: "extra-button-label",
|
|
412
412
|
onClick: (v) => re(h == null ? void 0 : h.label, i)
|
|
413
|
-
}, M(h == null ? void 0 : h.label), 13,
|
|
413
|
+
}, M(h == null ? void 0 : h.label), 13, ba)
|
|
414
414
|
]))), 128))
|
|
415
415
|
]),
|
|
416
416
|
key: "0"
|
|
417
417
|
} : void 0
|
|
418
418
|
]), 1032, ["columns", "tableData", "isShowPagination", "extraButton"])),
|
|
419
|
-
|
|
420
|
-
title:
|
|
421
|
-
visible:
|
|
422
|
-
width:
|
|
423
|
-
onBeforeDestroy:
|
|
419
|
+
Fe(sa, {
|
|
420
|
+
title: j.value,
|
|
421
|
+
visible: B.value,
|
|
422
|
+
width: qe.value,
|
|
423
|
+
onBeforeDestroy: Ie
|
|
424
424
|
}, {
|
|
425
425
|
default: Z(() => [
|
|
426
|
-
|
|
426
|
+
Fe(na, {
|
|
427
427
|
rowContents: Q.value,
|
|
428
428
|
isEnableWrap: !1,
|
|
429
|
-
onChange:
|
|
430
|
-
isEdit:
|
|
429
|
+
onChange: Ye,
|
|
430
|
+
isEdit: m.value
|
|
431
431
|
}, null, 8, ["rowContents", "isEdit"])
|
|
432
432
|
]),
|
|
433
433
|
footer: Z(() => [
|
|
434
|
-
q.value ? (J(), W("div",
|
|
434
|
+
q.value ? (J(), W("div", va, [
|
|
435
435
|
V("div", {
|
|
436
|
-
onClick:
|
|
436
|
+
onClick: f[1] || (f[1] = (i) => B.value = !1),
|
|
437
437
|
class: "cancel-button"
|
|
438
438
|
}, M("取消")),
|
|
439
439
|
V("div", {
|
|
440
440
|
class: "ok-button",
|
|
441
|
-
onClick:
|
|
441
|
+
onClick: Xe
|
|
442
442
|
}, M("确认"))
|
|
443
|
-
])) :
|
|
443
|
+
])) : aa("", !0)
|
|
444
444
|
]),
|
|
445
445
|
_: 1
|
|
446
446
|
}, 8, ["title", "visible", "width"])
|
|
447
447
|
]);
|
|
448
448
|
};
|
|
449
449
|
}
|
|
450
|
-
},
|
|
450
|
+
}, xa = /* @__PURE__ */ oa(Ta, [["__scopeId", "data-v-408ff7f8"]]);
|
|
451
451
|
export {
|
|
452
452
|
ca as a,
|
|
453
453
|
w as p,
|
|
454
|
-
|
|
455
|
-
|
|
454
|
+
xa as s,
|
|
455
|
+
fa as u
|
|
456
456
|
};
|