ss-component-new 1.1.8 → 1.1.10
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-0PzArXAH.js +3278 -0
- package/dist/config.js +10 -0
- package/dist/{index-DixPKGKu.js → index-B6eq-MSC.js} +3 -2
- package/dist/index-C2Y-VOs_.js +239 -0
- package/dist/{index-CgQCR4W5.js → index-hjkvqVVf.js} +2 -2
- package/dist/index-vyAHI5uV.js +110 -0
- package/dist/main-u6Z66hys.js +285 -0
- package/dist/{menu-qSnszHpf.js → menu-3a4UTvU1.js} +69 -65
- package/dist/{modelComp-DJ7SRqQv.js → modelComp-BLx5jS0f.js} +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +4 -4
- package/dist/ss-component.umd.cjs +15 -10
- package/package.json +4 -1
- package/dist/calculator-CsPcsxBA.js +0 -1366
- package/dist/index-Br7oZmYc.js +0 -226
- package/dist/index-eTMU2pmA.js +0 -109
- package/dist/main-k1gppu55.js +0 -275
|
@@ -1,1366 +0,0 @@
|
|
|
1
|
-
import { ref as N, watch as Q, resolveComponent as pe, createBlock as ne, openBlock as V, withCtx as M, renderSlot as we, createElementVNode as j, toDisplayString as W, onMounted as Ge, createElementBlock as L, createVNode as G, Fragment as de, renderList as fe, normalizeStyle as je, createSlots as Ze, createCommentVNode as Ue, createTextVNode as ie, unref as Pe, resolveDynamicComponent as Ce } from "vue";
|
|
2
|
-
import { g as Ke, a as Me, _ as ee, d as qe, s as ke, c as s, E as He } from "./menu-qSnszHpf.js";
|
|
3
|
-
import { u as De } from "./modelComp-DJ7SRqQv.js";
|
|
4
|
-
import { s as oe, a as ge } from "./index-DixPKGKu.js";
|
|
5
|
-
const Re = (b, D) => {
|
|
6
|
-
const l = b.storage || sessionStorage, u = b.key || D.$id;
|
|
7
|
-
if (b.paths) {
|
|
8
|
-
const t = b.paths.reduce((m, x) => (m[x] = D.$state[x], m), {});
|
|
9
|
-
l.setItem(u, JSON.stringify(t));
|
|
10
|
-
} else
|
|
11
|
-
l.setItem(u, JSON.stringify(D.$state));
|
|
12
|
-
};
|
|
13
|
-
var Qe = ({ options: b, store: D }) => {
|
|
14
|
-
var l, u, t, m;
|
|
15
|
-
if ((l = b.persist) != null && l.enabled) {
|
|
16
|
-
const x = [{
|
|
17
|
-
key: D.$id,
|
|
18
|
-
storage: sessionStorage
|
|
19
|
-
}], O = (t = (u = b.persist) == null ? void 0 : u.strategies) != null && t.length ? (m = b.persist) == null ? void 0 : m.strategies : x;
|
|
20
|
-
O.forEach((g) => {
|
|
21
|
-
const A = g.storage || sessionStorage, P = g.key || D.$id, c = A.getItem(P);
|
|
22
|
-
c && (D.$patch(JSON.parse(c)), Re(g, D));
|
|
23
|
-
}), D.$subscribe(() => {
|
|
24
|
-
O.forEach((g) => {
|
|
25
|
-
Re(g, D);
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
const se = Ke() || Me();
|
|
31
|
-
se.use(Qe);
|
|
32
|
-
const Xe = { class: "dialog-title" }, Ye = {
|
|
33
|
-
__name: "index",
|
|
34
|
-
props: {
|
|
35
|
-
title: {
|
|
36
|
-
type: String,
|
|
37
|
-
default: ""
|
|
38
|
-
},
|
|
39
|
-
dialogWidth: {
|
|
40
|
-
type: Number,
|
|
41
|
-
default: 600
|
|
42
|
-
},
|
|
43
|
-
visible: {
|
|
44
|
-
type: Boolean,
|
|
45
|
-
default: !1
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
emits: ["beforeDestroy"],
|
|
49
|
-
setup(b, { emit: D }) {
|
|
50
|
-
const l = b, u = D, t = N(!1), m = () => {
|
|
51
|
-
u("beforeDestroy");
|
|
52
|
-
};
|
|
53
|
-
return Q(
|
|
54
|
-
() => l == null ? void 0 : l.visible,
|
|
55
|
-
() => {
|
|
56
|
-
t.value = l == null ? void 0 : l.visible;
|
|
57
|
-
},
|
|
58
|
-
{ deep: !0, immediate: !0 }
|
|
59
|
-
), (x, O) => {
|
|
60
|
-
const g = pe("el-dialog");
|
|
61
|
-
return V(), ne(g, {
|
|
62
|
-
modelValue: t.value,
|
|
63
|
-
"onUpdate:modelValue": O[0] || (O[0] = (A) => t.value = A),
|
|
64
|
-
width: l == null ? void 0 : l.dialogWidth,
|
|
65
|
-
"before-close": m
|
|
66
|
-
}, {
|
|
67
|
-
default: M(() => [
|
|
68
|
-
we(x.$slots, "default", {}, void 0, !0)
|
|
69
|
-
]),
|
|
70
|
-
header: M(() => [
|
|
71
|
-
j("div", Xe, W(l == null ? void 0 : l.title), 1)
|
|
72
|
-
]),
|
|
73
|
-
footer: M(() => [
|
|
74
|
-
we(x.$slots, "footer", {}, void 0, !0)
|
|
75
|
-
]),
|
|
76
|
-
_: 3
|
|
77
|
-
}, 8, ["modelValue", "width"]);
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
}, Ie = /* @__PURE__ */ ee(Ye, [["__scopeId", "data-v-c7bb41bc"]]), Ve = qe("formToTableComp", {
|
|
81
|
-
state: () => ({
|
|
82
|
-
selectArray: [],
|
|
83
|
-
selectString: ""
|
|
84
|
-
}),
|
|
85
|
-
actions: {
|
|
86
|
-
setSelectArray(b) {
|
|
87
|
-
this.selectArray = b;
|
|
88
|
-
},
|
|
89
|
-
setSelectString(b) {
|
|
90
|
-
this.selectString = b;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}), el = { class: "table-content" }, ll = { class: "extra-header" }, al = ["onClick"], ol = ["onClick"], nl = {
|
|
94
|
-
key: 0,
|
|
95
|
-
class: "dialog-footer"
|
|
96
|
-
}, sl = {
|
|
97
|
-
__name: "index",
|
|
98
|
-
props: {
|
|
99
|
-
itemData: {
|
|
100
|
-
type: Array,
|
|
101
|
-
default: () => []
|
|
102
|
-
},
|
|
103
|
-
childItemData: {
|
|
104
|
-
type: Array,
|
|
105
|
-
default: () => []
|
|
106
|
-
},
|
|
107
|
-
index: Number
|
|
108
|
-
},
|
|
109
|
-
emits: ["change", "contentChange"],
|
|
110
|
-
setup(b, { emit: D }) {
|
|
111
|
-
const l = b, u = D, t = N([]), m = N([]), x = N(""), O = N(), g = N(!0), A = N(0), P = N(!1), c = N(""), T = N(!1), C = N([]), F = N(!1), U = N([]), i = N([]), o = N(), r = Ve(se), { selectString: f } = ke(r), e = N(720), n = () => {
|
|
112
|
-
T.value = !1;
|
|
113
|
-
}, p = (E, _) => {
|
|
114
|
-
var w;
|
|
115
|
-
x.value = "", F.value = !0, g.value = !0, E === "删除" ? (m.value = (w = s(m.value)) == null ? void 0 : w.filter((v) => (v == null ? void 0 : v.id) !== (_ == null ? void 0 : _.id)), u("change")) : E === "新增" ? (c.value = "新增", d(""), T.value = !0) : E === "编辑" ? (c.value = "编辑", d(_), T.value = !0) : E === "详情" && (c.value = "详情", d(_), F.value = !1, g.value = !1, T.value = !0), k();
|
|
116
|
-
}, d = (E) => {
|
|
117
|
-
var w;
|
|
118
|
-
const _ = [];
|
|
119
|
-
(w = s(t.value)) == null || w.forEach((v, B) => {
|
|
120
|
-
v.label !== "" && (v == null ? void 0 : v.label) !== "操作" && _.push({
|
|
121
|
-
label: (v == null ? void 0 : v.label) ?? "",
|
|
122
|
-
name: (v == null ? void 0 : v.prop) ?? "t" + B,
|
|
123
|
-
type: !(v != null && v.type) || (v == null ? void 0 : v.type) === "" ? "Input" : v == null ? void 0 : v.type,
|
|
124
|
-
value: (E == null ? void 0 : E[v == null ? void 0 : v.prop]) ?? "",
|
|
125
|
-
id: (v == null ? void 0 : v.id) ?? B,
|
|
126
|
-
contents: (v == null ? void 0 : v.options) ?? [],
|
|
127
|
-
width: 1
|
|
128
|
-
});
|
|
129
|
-
}), E === "" || !E || (x.value = E == null ? void 0 : E.id), i.value = _;
|
|
130
|
-
};
|
|
131
|
-
Ge(() => {
|
|
132
|
-
window.addEventListener("resize", () => {
|
|
133
|
-
y();
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
const y = () => {
|
|
137
|
-
const E = window.innerWidth - 240;
|
|
138
|
-
e.value = E > 320 ? E : 320;
|
|
139
|
-
}, S = () => {
|
|
140
|
-
let E = s(m.value);
|
|
141
|
-
x.value === "" ? (A.value++, E.push(Object.assign(o.value, { id: A.value }))) : E = E == null ? void 0 : E.map((_) => ((_ == null ? void 0 : _.id) === x.value && (_ = Object.assign(_, o.value)), _)), m.value = E, k(), T.value = !1, u("change");
|
|
142
|
-
}, k = () => {
|
|
143
|
-
let E = s(l.itemData);
|
|
144
|
-
E = E == null ? void 0 : E.map((_) => ((_ == null ? void 0 : _.key) === "tableContents" && (_.contents = m.value), _)), u("contentChange", {
|
|
145
|
-
contents: E,
|
|
146
|
-
index: l.index
|
|
147
|
-
});
|
|
148
|
-
}, $ = (E) => {
|
|
149
|
-
o.value = E;
|
|
150
|
-
};
|
|
151
|
-
return Q(
|
|
152
|
-
() => [l.itemData, f.value],
|
|
153
|
-
() => {
|
|
154
|
-
var te, re, ue, le, q, ve, X, Y, $e, xe, Oe, Fe, Te, Ee, Ae, Be, Ne, Se;
|
|
155
|
-
const E = (te = s(l.itemData)) == null ? void 0 : te.filter((R) => (R == null ? void 0 : R.key) === "header"), _ = (re = s(l.itemData)) == null ? void 0 : re.find((R) => (R == null ? void 0 : R.key) === "page"), w = (ue = s(l.itemData)) == null ? void 0 : ue.find((R) => (R == null ? void 0 : R.key) === "rowButton"), v = (le = s(l.itemData)) == null ? void 0 : le.find((R) => (R == null ? void 0 : R.key) === "extraButton"), B = (q = s(l.itemData)) == null ? void 0 : q.filter((R) => (R == null ? void 0 : R.key) === "tableContents"), a = (ve = s(l.itemData)) == null ? void 0 : ve.filter((R) => (R == null ? void 0 : R.key) === "tableIndex");
|
|
156
|
-
P.value = (_ == null ? void 0 : _.contents) ?? !0;
|
|
157
|
-
let z = [];
|
|
158
|
-
f.value === "" ? z = E == null ? void 0 : E[0] : z = E == null ? void 0 : E.find((R) => (R == null ? void 0 : R.selectLabel) === "(" + f.value + ")");
|
|
159
|
-
let J = [];
|
|
160
|
-
if (f.value === "" ? J = a == null ? void 0 : a[0] : J = a == null ? void 0 : a.find((R) => (R == null ? void 0 : R.selectLabel) === "(" + f.value + ")"), ((X = z == null ? void 0 : z.contents) == null ? void 0 : X.length) > 0) {
|
|
161
|
-
const R = [];
|
|
162
|
-
J != null && J.contents && ((Y = J == null ? void 0 : J.contents) == null ? void 0 : Y.length) !== 0 && R.push({
|
|
163
|
-
label: "",
|
|
164
|
-
prop: "index",
|
|
165
|
-
sortable: !1
|
|
166
|
-
}), ($e = z == null ? void 0 : z.contents) == null || $e.forEach((h, H) => {
|
|
167
|
-
(h == null ? void 0 : h.label) !== "" && R.push({
|
|
168
|
-
label: (h == null ? void 0 : h.label) ?? "",
|
|
169
|
-
prop: (h == null ? void 0 : h.label) === "操作" ? "operate" : (h == null ? void 0 : h.prop) ?? "a" + H,
|
|
170
|
-
width: h != null && h.width ? parseInt(h.width) : "",
|
|
171
|
-
fixed: (h == null ? void 0 : h.fixed) ?? void 0,
|
|
172
|
-
sortable: (h == null ? void 0 : h.sortable) ?? !1,
|
|
173
|
-
align: (h == null ? void 0 : h.align) ?? "center",
|
|
174
|
-
showOverflowTooltip: (h == null ? void 0 : h.showOverflowTooltip) ?? !0,
|
|
175
|
-
isNotDrag: (h == null ? void 0 : h.isNotDrag) ?? !1,
|
|
176
|
-
isEditCol: (h == null ? void 0 : h.isEditCol) ?? !1,
|
|
177
|
-
isOperate: (h == null ? void 0 : h.isOperate) ?? !1,
|
|
178
|
-
id: (h == null ? void 0 : h.id) ?? H,
|
|
179
|
-
type: (h == null ? void 0 : h.label) === "操作" ? "operate" : void 0
|
|
180
|
-
});
|
|
181
|
-
}), t.value = R;
|
|
182
|
-
let ye = (Oe = (xe = s(t.value)) == null ? void 0 : xe.filter((h) => (h == null ? void 0 : h.type) !== "operate")) == null ? void 0 : Oe.map((h, H) => ({
|
|
183
|
-
prop: (h == null ? void 0 : h.prop) ?? "a" + H
|
|
184
|
-
})), I = [];
|
|
185
|
-
if (f.value === "" ? I = B == null ? void 0 : B[0] : I = B == null ? void 0 : B.find((h) => (h == null ? void 0 : h.selectLabel) === "(" + f.value + ")"), ((Fe = I == null ? void 0 : I.contents) == null ? void 0 : Fe.length) !== 0) {
|
|
186
|
-
let h = s(I == null ? void 0 : I.contents);
|
|
187
|
-
J != null && J.contents && ((Te = J == null ? void 0 : J.contents) == null ? void 0 : Te.length) !== 0 && (h = (Ee = s(h)) == null ? void 0 : Ee.map((ae, _e) => {
|
|
188
|
-
var ce, me;
|
|
189
|
-
return ae.unshift(((me = (ce = J == null ? void 0 : J.contents) == null ? void 0 : ce[_e]) == null ? void 0 : me.label) ?? ""), ae;
|
|
190
|
-
}));
|
|
191
|
-
const H = [];
|
|
192
|
-
h == null || h.forEach((ae, _e) => {
|
|
193
|
-
let ce = {};
|
|
194
|
-
ye == null || ye.forEach((me, Le) => {
|
|
195
|
-
ce[me.prop] = ae[Le];
|
|
196
|
-
}), H.push(Object.assign(ce, { id: _e }));
|
|
197
|
-
}), m.value = H;
|
|
198
|
-
} else {
|
|
199
|
-
let h = (Ae = s(ye)) == null ? void 0 : Ae.reduce((H, ae) => (H[ae.prop] = "测试数据", H), {});
|
|
200
|
-
O.value = h, m.value = [Object.assign({}, O.value, { id: A.value })];
|
|
201
|
-
}
|
|
202
|
-
} else
|
|
203
|
-
t.value = [], m.value = [];
|
|
204
|
-
((Be = w == null ? void 0 : w.contents) == null ? void 0 : Be.length) > 0 ? C.value = w == null ? void 0 : w.contents : C.value = [], ((Ne = v == null ? void 0 : v.contents) == null ? void 0 : Ne.length) > 0 ? U.value = v == null ? void 0 : v.contents : U.value = [], A.value = ((Se = m == null ? void 0 : m.value) == null ? void 0 : Se.length) ?? 0;
|
|
205
|
-
},
|
|
206
|
-
{ deep: !0, immediate: !0 }
|
|
207
|
-
), (E, _) => {
|
|
208
|
-
var w;
|
|
209
|
-
return V(), L("div", el, [
|
|
210
|
-
j("div", ll, [
|
|
211
|
-
(V(!0), L(de, null, fe(U.value, (v, B) => (V(), L("div", {
|
|
212
|
-
class: "extra-contents",
|
|
213
|
-
key: B
|
|
214
|
-
}, [
|
|
215
|
-
j("div", {
|
|
216
|
-
class: "extra-content",
|
|
217
|
-
style: je({ background: v == null ? void 0 : v.background }),
|
|
218
|
-
onClick: (a) => p(v == null ? void 0 : v.label, "")
|
|
219
|
-
}, W(v == null ? void 0 : v.label), 13, al)
|
|
220
|
-
]))), 128))
|
|
221
|
-
]),
|
|
222
|
-
(V(), ne(oe, {
|
|
223
|
-
columns: t.value,
|
|
224
|
-
key: t.value,
|
|
225
|
-
tableData: m.value,
|
|
226
|
-
isShowPagination: P.value,
|
|
227
|
-
isShowEdit: !1,
|
|
228
|
-
isShowDelete: !1
|
|
229
|
-
}, Ze({ _: 2 }, [
|
|
230
|
-
((w = C.value) == null ? void 0 : w.length) > 0 ? {
|
|
231
|
-
name: "actions",
|
|
232
|
-
fn: M(({ item: v }) => [
|
|
233
|
-
(V(!0), L(de, null, fe(C.value, (B, a) => (V(), L("div", { key: a }, [
|
|
234
|
-
j("div", {
|
|
235
|
-
style: je({ color: B == null ? void 0 : B.textColor }),
|
|
236
|
-
class: "extra-button-label",
|
|
237
|
-
onClick: (z) => p(B == null ? void 0 : B.label, v)
|
|
238
|
-
}, W(B == null ? void 0 : B.label), 13, ol)
|
|
239
|
-
]))), 128))
|
|
240
|
-
]),
|
|
241
|
-
key: "0"
|
|
242
|
-
} : void 0
|
|
243
|
-
]), 1032, ["columns", "tableData", "isShowPagination"])),
|
|
244
|
-
G(Ie, {
|
|
245
|
-
title: c.value,
|
|
246
|
-
visible: T.value,
|
|
247
|
-
width: e.value,
|
|
248
|
-
onBeforeDestroy: n
|
|
249
|
-
}, {
|
|
250
|
-
default: M(() => [
|
|
251
|
-
G(ge, {
|
|
252
|
-
rowContents: i.value,
|
|
253
|
-
isEnableWrap: !1,
|
|
254
|
-
onChange: $,
|
|
255
|
-
isEdit: g.value
|
|
256
|
-
}, null, 8, ["rowContents", "isEdit"])
|
|
257
|
-
]),
|
|
258
|
-
footer: M(() => [
|
|
259
|
-
F.value ? (V(), L("div", nl, [
|
|
260
|
-
j("div", {
|
|
261
|
-
onClick: _[0] || (_[0] = (v) => T.value = !1),
|
|
262
|
-
class: "cancel-button"
|
|
263
|
-
}, W("取消")),
|
|
264
|
-
j("div", {
|
|
265
|
-
class: "ok-button",
|
|
266
|
-
onClick: S
|
|
267
|
-
}, W("确认"))
|
|
268
|
-
])) : Ue("", !0)
|
|
269
|
-
]),
|
|
270
|
-
_: 1
|
|
271
|
-
}, 8, ["title", "visible", "width"])
|
|
272
|
-
]);
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
}, tl = /* @__PURE__ */ ee(sl, [["__scopeId", "data-v-d7ccd160"]]), rl = [
|
|
276
|
-
{
|
|
277
|
-
key: "单选",
|
|
278
|
-
value: "Select"
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
key: "日期",
|
|
282
|
-
value: "Date"
|
|
283
|
-
}
|
|
284
|
-
], ul = { class: "form-content" }, cl = {
|
|
285
|
-
__name: "index",
|
|
286
|
-
props: {
|
|
287
|
-
itemData: {
|
|
288
|
-
type: Array,
|
|
289
|
-
default: () => []
|
|
290
|
-
},
|
|
291
|
-
childItemData: {
|
|
292
|
-
type: Array,
|
|
293
|
-
default: () => []
|
|
294
|
-
},
|
|
295
|
-
index: Number
|
|
296
|
-
},
|
|
297
|
-
emits: ["change", "contentChange"],
|
|
298
|
-
setup(b, { emit: D }) {
|
|
299
|
-
const l = b, u = D, t = N([]), m = N(!1), x = N([]), O = Ve(se), g = N(), A = (c) => {
|
|
300
|
-
var i, o, r, f;
|
|
301
|
-
const T = (o = (i = s(l.itemData)) == null ? void 0 : i.find((e) => (e == null ? void 0 : e.key) === "formContent")) == null ? void 0 : o.contents, C = s(c.content);
|
|
302
|
-
let F = {};
|
|
303
|
-
((r = Object.values(C)) == null ? void 0 : r.length) > 0 && ((f = Object.values(C)) == null || f.forEach((e, n) => {
|
|
304
|
-
F[T[n].label] = e;
|
|
305
|
-
}));
|
|
306
|
-
const U = {
|
|
307
|
-
content: F,
|
|
308
|
-
index: l == null ? void 0 : l.index,
|
|
309
|
-
buttonName: c == null ? void 0 : c.buttonName
|
|
310
|
-
};
|
|
311
|
-
u("change", U);
|
|
312
|
-
}, P = (c) => {
|
|
313
|
-
var F, U;
|
|
314
|
-
if (((F = Object.values(s(c))) == null ? void 0 : F.length) > 0) {
|
|
315
|
-
const i = (U = Object.values(s(c))) == null ? void 0 : U.map((r) => r);
|
|
316
|
-
let o = "";
|
|
317
|
-
i == null || i.forEach((r) => {
|
|
318
|
-
r !== "" && r !== void 0 && (o = o === "" ? r : o + "/" + r);
|
|
319
|
-
}), O.setSelectArray(i), O.setSelectString(o);
|
|
320
|
-
}
|
|
321
|
-
const T = s(l.itemData), C = T == null ? void 0 : T.map((i) => {
|
|
322
|
-
var o;
|
|
323
|
-
return (i == null ? void 0 : i.key) === "formContent" && ((o = i.contents) == null || o.map((r, f) => {
|
|
324
|
-
var e;
|
|
325
|
-
return r.key = (e = Object.values(c)) == null ? void 0 : e[f], r;
|
|
326
|
-
})), i;
|
|
327
|
-
});
|
|
328
|
-
u("contentChange", {
|
|
329
|
-
contents: C,
|
|
330
|
-
index: l.index
|
|
331
|
-
});
|
|
332
|
-
};
|
|
333
|
-
return Q(
|
|
334
|
-
() => l.itemData,
|
|
335
|
-
() => {
|
|
336
|
-
var U, i, o, r, f, e, n, p, d;
|
|
337
|
-
const c = (U = s(l.itemData)) == null ? void 0 : U.find((y) => (y == null ? void 0 : y.key) === "formContent"), T = (i = s(l.itemData)) == null ? void 0 : i.find((y) => (y == null ? void 0 : y.key) === "formButton"), C = (o = s(l.itemData)) == null ? void 0 : o.find((y) => (y == null ? void 0 : y.key) === "formFlex"), F = (r = s(l.itemData)) == null ? void 0 : r.find((y) => (y == null ? void 0 : y.key) === "formWrap");
|
|
338
|
-
if ((F == null ? void 0 : F.contents) === "横向" ? m.value = !0 : m.value = !1, g.value = (C == null ? void 0 : C.contents) ?? !0, ((f = c == null ? void 0 : c.contents) == null ? void 0 : f.length) > 0) {
|
|
339
|
-
const y = [];
|
|
340
|
-
(e = c == null ? void 0 : c.contents) == null || e.forEach(($, E) => {
|
|
341
|
-
var _, w, v, B, a, z, J, te, re;
|
|
342
|
-
if (($ == null ? void 0 : $.label) !== "") {
|
|
343
|
-
let ue = ($ == null ? void 0 : $.label) ?? "", le = ($ == null ? void 0 : $.type) ?? "", q = ($ == null ? void 0 : $.options) ?? [];
|
|
344
|
-
if ($ != null && $.label.includes("$") && (ue = (_ = s($ == null ? void 0 : $.label).split("$")) == null ? void 0 : _[0], ((v = (w = s($ == null ? void 0 : $.label).split("$")) == null ? void 0 : w[1]) == null ? void 0 : v.length) > 0)) {
|
|
345
|
-
const [ve, X] = (a = (B = s($ == null ? void 0 : $.label).split("$")) == null ? void 0 : B[1]) == null ? void 0 : a.split(/[()]/);
|
|
346
|
-
le = ((z = rl.find((Y) => (Y == null ? void 0 : Y.key) === ve)) == null ? void 0 : z.value) ?? "", ((J = X == null ? void 0 : X.split(",")) == null ? void 0 : J.length) > 0 && (q = (te = X == null ? void 0 : X.split(",")) == null ? void 0 : te.map((Y) => ({
|
|
347
|
-
label: Y,
|
|
348
|
-
value: Y
|
|
349
|
-
})));
|
|
350
|
-
}
|
|
351
|
-
y.push({
|
|
352
|
-
label: ue ?? "",
|
|
353
|
-
name: "t" + E,
|
|
354
|
-
type: le === "" ? "Input" : le,
|
|
355
|
-
value: (q == null ? void 0 : q.length) > 0 ? (re = q == null ? void 0 : q[0]) == null ? void 0 : re.value : ($ == null ? void 0 : $.key) ?? "",
|
|
356
|
-
id: ($ == null ? void 0 : $.id) ?? E,
|
|
357
|
-
contents: q ?? [],
|
|
358
|
-
width: ($ == null ? void 0 : $.width) ?? 1
|
|
359
|
-
});
|
|
360
|
-
}
|
|
361
|
-
});
|
|
362
|
-
const S = (n = s(y)) == null ? void 0 : n.map(($) => $.value);
|
|
363
|
-
let k = "";
|
|
364
|
-
S == null || S.forEach(($) => {
|
|
365
|
-
$ !== "" && $ !== void 0 && (k = k === "" ? $ : k + "/" + $);
|
|
366
|
-
}), O.setSelectArray(S), O.setSelectString(k), t.value = y;
|
|
367
|
-
} else
|
|
368
|
-
t.value = [];
|
|
369
|
-
if (((p = T == null ? void 0 : T.contents) == null ? void 0 : p.length) > 0) {
|
|
370
|
-
const y = [];
|
|
371
|
-
(d = T == null ? void 0 : T.contents) == null || d.forEach((S, k) => {
|
|
372
|
-
(S == null ? void 0 : S.label) !== "" && y.push({
|
|
373
|
-
label: (S == null ? void 0 : S.label) ?? "",
|
|
374
|
-
id: (S == null ? void 0 : S.id) ?? k,
|
|
375
|
-
type: (S == null ? void 0 : S.type) ?? "",
|
|
376
|
-
background: S == null ? void 0 : S.background
|
|
377
|
-
});
|
|
378
|
-
}), x.value = y;
|
|
379
|
-
} else
|
|
380
|
-
x.value = [];
|
|
381
|
-
},
|
|
382
|
-
{ deep: !0, immediate: !0 }
|
|
383
|
-
), (c, T) => (V(), L("div", ul, [
|
|
384
|
-
G(ge, {
|
|
385
|
-
rowContents: t.value,
|
|
386
|
-
buttonValue: x.value,
|
|
387
|
-
isRowFlex: g.value,
|
|
388
|
-
isEnableWrap: !0,
|
|
389
|
-
onOnButtonClick: A,
|
|
390
|
-
onChange: P,
|
|
391
|
-
isButtonRow: m.value
|
|
392
|
-
}, null, 8, ["rowContents", "buttonValue", "isRowFlex", "isButtonRow"])
|
|
393
|
-
]));
|
|
394
|
-
}
|
|
395
|
-
}, il = /* @__PURE__ */ ee(cl, [["__scopeId", "data-v-44fe27b0"]]), pl = { class: "table-operate-content" }, dl = { class: "table-operate-item" }, fl = { class: "operate-title" }, vl = { class: "operate-content" }, yl = { class: "operate-title" }, ml = { class: "operate-content" }, bl = { class: "operate-title" }, hl = { class: "operate-content" }, kl = { class: "operate-content" }, gl = {
|
|
396
|
-
__name: "operate",
|
|
397
|
-
props: {
|
|
398
|
-
itemContents: {
|
|
399
|
-
type: Array,
|
|
400
|
-
default: () => []
|
|
401
|
-
},
|
|
402
|
-
originalItemContents: {
|
|
403
|
-
type: Array,
|
|
404
|
-
default: () => []
|
|
405
|
-
}
|
|
406
|
-
},
|
|
407
|
-
emits: ["change"],
|
|
408
|
-
setup(b, { emit: D }) {
|
|
409
|
-
const l = b, u = D, t = N([]), m = N([]), x = N([]), O = N([{
|
|
410
|
-
label: "按钮名称",
|
|
411
|
-
prop: "label",
|
|
412
|
-
type: "edit"
|
|
413
|
-
}, {
|
|
414
|
-
label: "按钮类型",
|
|
415
|
-
prop: "type",
|
|
416
|
-
type: "edit"
|
|
417
|
-
}, {
|
|
418
|
-
label: "按钮背景颜色",
|
|
419
|
-
prop: "background",
|
|
420
|
-
type: "edit",
|
|
421
|
-
columnType: "Color"
|
|
422
|
-
}, {
|
|
423
|
-
label: "操作",
|
|
424
|
-
prop: "operate",
|
|
425
|
-
type: "operate",
|
|
426
|
-
sortable: !1
|
|
427
|
-
}]), g = N([{
|
|
428
|
-
label: "标签名称",
|
|
429
|
-
prop: "label",
|
|
430
|
-
type: "edit"
|
|
431
|
-
}, {
|
|
432
|
-
label: "标签类型",
|
|
433
|
-
prop: "type",
|
|
434
|
-
type: "edit"
|
|
435
|
-
}, {
|
|
436
|
-
label: "按钮文字颜色",
|
|
437
|
-
prop: "textColor",
|
|
438
|
-
type: "edit",
|
|
439
|
-
columnType: "Color"
|
|
440
|
-
}, {
|
|
441
|
-
label: "操作",
|
|
442
|
-
prop: "operate",
|
|
443
|
-
type: "operate",
|
|
444
|
-
sortable: !1
|
|
445
|
-
}]), A = N([]), P = N(0), c = N([{
|
|
446
|
-
name: "isPagination",
|
|
447
|
-
label: "是否显示分页",
|
|
448
|
-
type: "Switch",
|
|
449
|
-
value: !0
|
|
450
|
-
}]), T = [{
|
|
451
|
-
label: "标签名",
|
|
452
|
-
prop: "label",
|
|
453
|
-
type: "edit"
|
|
454
|
-
}, {
|
|
455
|
-
label: "属性名",
|
|
456
|
-
prop: "prop",
|
|
457
|
-
type: "edit"
|
|
458
|
-
}, {
|
|
459
|
-
label: "宽度",
|
|
460
|
-
prop: "width",
|
|
461
|
-
type: "edit",
|
|
462
|
-
columnType: "Number"
|
|
463
|
-
}, {
|
|
464
|
-
label: "是否固定列",
|
|
465
|
-
prop: "fixed",
|
|
466
|
-
type: "edit",
|
|
467
|
-
columnType: "Radio",
|
|
468
|
-
contents: [{
|
|
469
|
-
label: "left",
|
|
470
|
-
value: "左"
|
|
471
|
-
}, {
|
|
472
|
-
label: "right",
|
|
473
|
-
value: "右"
|
|
474
|
-
}]
|
|
475
|
-
}, {
|
|
476
|
-
label: "是否支持排序",
|
|
477
|
-
prop: "sortable",
|
|
478
|
-
type: "edit",
|
|
479
|
-
columnType: "Switch"
|
|
480
|
-
}, {
|
|
481
|
-
label: "文本所在位置",
|
|
482
|
-
prop: "align",
|
|
483
|
-
type: "edit",
|
|
484
|
-
columnType: "Radio",
|
|
485
|
-
contents: [{
|
|
486
|
-
label: "left",
|
|
487
|
-
value: "左"
|
|
488
|
-
}, {
|
|
489
|
-
label: "center",
|
|
490
|
-
value: "中"
|
|
491
|
-
}, {
|
|
492
|
-
label: "right",
|
|
493
|
-
value: "右"
|
|
494
|
-
}]
|
|
495
|
-
}, {
|
|
496
|
-
label: "溢出悬浮文字",
|
|
497
|
-
prop: "showOverflowTooltip",
|
|
498
|
-
type: "edit",
|
|
499
|
-
columnType: "Switch"
|
|
500
|
-
}, {
|
|
501
|
-
label: "是否不可拖动",
|
|
502
|
-
prop: "isNotDrag",
|
|
503
|
-
type: "edit",
|
|
504
|
-
columnType: "Switch"
|
|
505
|
-
}, {
|
|
506
|
-
label: "是否可编辑列名",
|
|
507
|
-
//暂不支持
|
|
508
|
-
prop: "isEditCol",
|
|
509
|
-
type: "edit",
|
|
510
|
-
columnType: "Switch"
|
|
511
|
-
}, {
|
|
512
|
-
label: "是否出现在附属界面",
|
|
513
|
-
//暂不支持
|
|
514
|
-
prop: "isOperate",
|
|
515
|
-
type: "edit",
|
|
516
|
-
columnType: "Switch"
|
|
517
|
-
}, {
|
|
518
|
-
label: "操作",
|
|
519
|
-
prop: "operate",
|
|
520
|
-
type: "operate",
|
|
521
|
-
sortable: !1
|
|
522
|
-
}], C = (e) => {
|
|
523
|
-
let n = s(t.value);
|
|
524
|
-
const p = n == null ? void 0 : n.find((d) => d.key === "page");
|
|
525
|
-
(p == null ? void 0 : p.contents) !== void 0 ? n = n == null ? void 0 : n.map((d) => ((d == null ? void 0 : d.key) === "page" && (d.contents = e == null ? void 0 : e.isPagination), d)) : n.push({
|
|
526
|
-
key: "page",
|
|
527
|
-
contents: e == null ? void 0 : e.isPagination
|
|
528
|
-
}), t.value = n;
|
|
529
|
-
};
|
|
530
|
-
Q(
|
|
531
|
-
() => l.originalItemContents,
|
|
532
|
-
() => {
|
|
533
|
-
var e, n, p, d, y, S, k, $, E, _, w, v, B;
|
|
534
|
-
!l.originalItemContents || l.originalItemContents.length === 0 || (t.value = s(l.originalItemContents), m.value = (n = (e = t.value) == null ? void 0 : e.find((a) => (a == null ? void 0 : a.key) === "header")) == null ? void 0 : n.contents, x.value = (d = (p = t.value) == null ? void 0 : p.find((a) => (a == null ? void 0 : a.key) === "rowButton")) == null ? void 0 : d.contents, O.value = (S = (y = t.value) == null ? void 0 : y.find((a) => (a == null ? void 0 : a.key) === "extraButton")) == null ? void 0 : S.contents, c.value = ($ = (k = t.value) == null ? void 0 : k.find((a) => (a == null ? void 0 : a.key) === "page")) != null && $.contents ? [{
|
|
535
|
-
name: "isPagination",
|
|
536
|
-
label: "是否显示分页",
|
|
537
|
-
type: "Switch",
|
|
538
|
-
value: (_ = (E = t.value) == null ? void 0 : E.find((a) => (a == null ? void 0 : a.key) === "page")) == null ? void 0 : _.contents
|
|
539
|
-
}] : [{
|
|
540
|
-
name: "isPagination",
|
|
541
|
-
label: "是否显示分页",
|
|
542
|
-
type: "Switch",
|
|
543
|
-
value: !0
|
|
544
|
-
}], m.value = (w = m.value) == null ? void 0 : w.map((a, z) => a = {
|
|
545
|
-
label: (a == null ? void 0 : a.label) ?? "",
|
|
546
|
-
prop: (a == null ? void 0 : a.label) === "操作" ? "operate" : a == null ? void 0 : a.prop,
|
|
547
|
-
width: a != null && a.width ? parseInt(a.width) : "",
|
|
548
|
-
fixed: (a == null ? void 0 : a.fixed) ?? void 0,
|
|
549
|
-
sortable: (a == null ? void 0 : a.sortable) ?? !1,
|
|
550
|
-
align: (a == null ? void 0 : a.align) ?? "center",
|
|
551
|
-
showOverflowTooltip: (a == null ? void 0 : a.showOverflowTooltip) ?? !0,
|
|
552
|
-
isNotDrag: (a == null ? void 0 : a.isNotDrag) ?? !1,
|
|
553
|
-
isEditCol: (a == null ? void 0 : a.isEditCol) ?? !1,
|
|
554
|
-
isOperate: (a == null ? void 0 : a.isOperate) ?? !1,
|
|
555
|
-
id: (a == null ? void 0 : a.id) ?? z
|
|
556
|
-
}), x.value = (v = x.value) == null ? void 0 : v.map((a, z) => a = {
|
|
557
|
-
label: (a == null ? void 0 : a.label) ?? "",
|
|
558
|
-
type: (a == null ? void 0 : a.type) ?? "",
|
|
559
|
-
textColor: (a == null ? void 0 : a.textColor) ?? "#000000",
|
|
560
|
-
id: (a == null ? void 0 : a.id) ?? z
|
|
561
|
-
}), O.value = (B = O.value) == null ? void 0 : B.map((a, z) => a = {
|
|
562
|
-
label: (a == null ? void 0 : a.label) ?? "",
|
|
563
|
-
type: (a == null ? void 0 : a.type) ?? "",
|
|
564
|
-
background: (a == null ? void 0 : a.textColor) ?? "#FFFFFF",
|
|
565
|
-
id: (a == null ? void 0 : a.id) ?? z
|
|
566
|
-
}));
|
|
567
|
-
},
|
|
568
|
-
{ deep: !0, immediate: !0 }
|
|
569
|
-
), Q(
|
|
570
|
-
() => c.value,
|
|
571
|
-
() => {
|
|
572
|
-
var p;
|
|
573
|
-
let e = s(t.value);
|
|
574
|
-
const n = e == null ? void 0 : e.find((d) => d.key === "page");
|
|
575
|
-
n != null && n.contents ? e = e == null ? void 0 : e.map((d) => {
|
|
576
|
-
var y;
|
|
577
|
-
return (d == null ? void 0 : d.key) === "page" && (d.contents = (y = c.value) == null ? void 0 : y[0].value), d;
|
|
578
|
-
}) : e.push({
|
|
579
|
-
key: "page",
|
|
580
|
-
contents: (p = c.value) == null ? void 0 : p[0].value
|
|
581
|
-
}), t.value = e;
|
|
582
|
-
},
|
|
583
|
-
{ immediate: !0, deep: !0 }
|
|
584
|
-
);
|
|
585
|
-
const F = () => {
|
|
586
|
-
const e = s(m.value);
|
|
587
|
-
let n = s(t.value);
|
|
588
|
-
e.push({
|
|
589
|
-
label: "",
|
|
590
|
-
prop: "",
|
|
591
|
-
width: "",
|
|
592
|
-
fixed: void 0,
|
|
593
|
-
sortable: !1,
|
|
594
|
-
align: "center",
|
|
595
|
-
showOverflowTooltip: !0,
|
|
596
|
-
isNotDrag: !1,
|
|
597
|
-
isEditCol: !1,
|
|
598
|
-
isOperate: !1,
|
|
599
|
-
id: P.value
|
|
600
|
-
}), m.value = e, P.value++;
|
|
601
|
-
const p = n == null ? void 0 : n.find((d) => (d == null ? void 0 : d.key) === "header");
|
|
602
|
-
p != null && p.contents ? (p.contents = e, n = n == null ? void 0 : n.map((d) => ((d == null ? void 0 : d.key) === "header" && (d.contents = e), d))) : n.push({
|
|
603
|
-
key: "header",
|
|
604
|
-
contents: e
|
|
605
|
-
}), t.value = n;
|
|
606
|
-
}, U = () => {
|
|
607
|
-
const e = s(x.value);
|
|
608
|
-
let n = s(t.value);
|
|
609
|
-
e.push({
|
|
610
|
-
label: "",
|
|
611
|
-
type: "",
|
|
612
|
-
textColor: "#000000",
|
|
613
|
-
id: P.value
|
|
614
|
-
}), x.value = e, P.value++;
|
|
615
|
-
const p = n == null ? void 0 : n.find((d) => (d == null ? void 0 : d.key) === "rowButton");
|
|
616
|
-
p != null && p.contents ? (p.contents = e, n = n == null ? void 0 : n.map((d) => ((d == null ? void 0 : d.key) === "rowButton" && (d.contents = e), d))) : n.push({
|
|
617
|
-
key: "rowButton",
|
|
618
|
-
contents: e
|
|
619
|
-
}), t.value = n;
|
|
620
|
-
}, i = () => {
|
|
621
|
-
const e = s(A.value);
|
|
622
|
-
let n = s(t.value);
|
|
623
|
-
e.push({
|
|
624
|
-
label: "",
|
|
625
|
-
type: "",
|
|
626
|
-
background: "#FFFFFF",
|
|
627
|
-
id: P.value
|
|
628
|
-
}), A.value = e, P.value++;
|
|
629
|
-
const p = n == null ? void 0 : n.find((d) => (d == null ? void 0 : d.key) === "extraButton");
|
|
630
|
-
p != null && p.contents ? (p.contents = e, n = n == null ? void 0 : n.map((d) => ((d == null ? void 0 : d.key) === "extraButton" && (d.contents = e), d))) : n.push({
|
|
631
|
-
key: "extraButton",
|
|
632
|
-
contents: e
|
|
633
|
-
}), t.value = n;
|
|
634
|
-
}, o = (e) => {
|
|
635
|
-
const n = s(x.value);
|
|
636
|
-
let p = s(t.value);
|
|
637
|
-
x.value = n.filter((y) => y.id !== e.id);
|
|
638
|
-
const d = p == null ? void 0 : p.find((y) => y.key === "rowButton");
|
|
639
|
-
d != null && d.contents && (p = p == null ? void 0 : p.map((y) => ((y == null ? void 0 : y.key) === "rowButton" && (y.contents = n.filter((S) => S.id !== e.id)), y))), t.value = p;
|
|
640
|
-
}, r = (e) => {
|
|
641
|
-
const n = s(A.value);
|
|
642
|
-
let p = s(t.value);
|
|
643
|
-
A.value = n.filter((y) => y.id !== e.id);
|
|
644
|
-
const d = p == null ? void 0 : p.find((y) => y.key === "extraButton");
|
|
645
|
-
d != null && d.contents && (p = p == null ? void 0 : p.map((y) => ((y == null ? void 0 : y.key) === "extraButton" && (y.contents = n.filter((S) => S.id !== e.id)), y))), t.value = p;
|
|
646
|
-
}, f = (e) => {
|
|
647
|
-
const n = s(m.value);
|
|
648
|
-
let p = s(t.value);
|
|
649
|
-
m.value = n.filter((y) => y.id !== e.id);
|
|
650
|
-
const d = p == null ? void 0 : p.find((y) => y.key === "header");
|
|
651
|
-
d != null && d.contents && (p = p == null ? void 0 : p.map((y) => ((y == null ? void 0 : y.key) === "header" && (y.contents = n.filter((S) => S.id !== e.id)), y))), t.value = p;
|
|
652
|
-
};
|
|
653
|
-
return Q(
|
|
654
|
-
() => [t.value, m.value],
|
|
655
|
-
() => {
|
|
656
|
-
let e = s(t.value);
|
|
657
|
-
const n = e == null ? void 0 : e.find((p) => (p == null ? void 0 : p.key) === "header");
|
|
658
|
-
n != null && n.contents ? (n.contents = m.value, e = e == null ? void 0 : e.map((p) => ((p == null ? void 0 : p.key) === "header" && (p.contents = m.value), p))) : e.push({
|
|
659
|
-
key: "header",
|
|
660
|
-
contents: m.value
|
|
661
|
-
}), u("change", e);
|
|
662
|
-
},
|
|
663
|
-
{ deep: !0, immediate: !0 }
|
|
664
|
-
), (e, n) => {
|
|
665
|
-
const p = pe("el-button");
|
|
666
|
-
return V(), L("div", pl, [
|
|
667
|
-
j("div", dl, [
|
|
668
|
-
j("div", fl, [
|
|
669
|
-
n[1] || (n[1] = j("div", null, W("表头"), -1)),
|
|
670
|
-
G(p, {
|
|
671
|
-
class: "blue-operate-button",
|
|
672
|
-
icon: "ele-Plus",
|
|
673
|
-
onClick: F
|
|
674
|
-
}, {
|
|
675
|
-
default: M(() => n[0] || (n[0] = [
|
|
676
|
-
ie(W("新建"))
|
|
677
|
-
])),
|
|
678
|
-
_: 1
|
|
679
|
-
})
|
|
680
|
-
]),
|
|
681
|
-
j("div", vl, [
|
|
682
|
-
G(oe, {
|
|
683
|
-
columns: T,
|
|
684
|
-
isShowPagination: !1,
|
|
685
|
-
isShowEdit: !1,
|
|
686
|
-
isMoveColumn: !1,
|
|
687
|
-
tableData: m.value,
|
|
688
|
-
onDeleteRow: f
|
|
689
|
-
}, null, 8, ["tableData"])
|
|
690
|
-
]),
|
|
691
|
-
j("div", yl, [
|
|
692
|
-
n[3] || (n[3] = j("div", null, W("行内按钮"), -1)),
|
|
693
|
-
G(p, {
|
|
694
|
-
class: "blue-operate-button",
|
|
695
|
-
icon: "ele-Plus",
|
|
696
|
-
onClick: U
|
|
697
|
-
}, {
|
|
698
|
-
default: M(() => n[2] || (n[2] = [
|
|
699
|
-
ie(W("新建"))
|
|
700
|
-
])),
|
|
701
|
-
_: 1
|
|
702
|
-
})
|
|
703
|
-
]),
|
|
704
|
-
j("div", ml, [
|
|
705
|
-
G(oe, {
|
|
706
|
-
columns: g.value,
|
|
707
|
-
isShowPagination: !1,
|
|
708
|
-
isShowEdit: !1,
|
|
709
|
-
isMoveColumn: !1,
|
|
710
|
-
tableData: x.value,
|
|
711
|
-
onDeleteRow: o
|
|
712
|
-
}, null, 8, ["columns", "tableData"])
|
|
713
|
-
]),
|
|
714
|
-
j("div", bl, [
|
|
715
|
-
n[5] || (n[5] = j("div", null, W("表格外部按钮"), -1)),
|
|
716
|
-
G(p, {
|
|
717
|
-
class: "blue-operate-button",
|
|
718
|
-
icon: "ele-Plus",
|
|
719
|
-
onClick: i
|
|
720
|
-
}, {
|
|
721
|
-
default: M(() => n[4] || (n[4] = [
|
|
722
|
-
ie(W("新建"))
|
|
723
|
-
])),
|
|
724
|
-
_: 1
|
|
725
|
-
})
|
|
726
|
-
]),
|
|
727
|
-
j("div", hl, [
|
|
728
|
-
G(oe, {
|
|
729
|
-
columns: O.value,
|
|
730
|
-
isShowPagination: !1,
|
|
731
|
-
isShowEdit: !1,
|
|
732
|
-
isMoveColumn: !1,
|
|
733
|
-
tableData: A.value,
|
|
734
|
-
onDeleteRow: r
|
|
735
|
-
}, null, 8, ["columns", "tableData"])
|
|
736
|
-
]),
|
|
737
|
-
n[6] || (n[6] = j("div", { class: "operate-title" }, [
|
|
738
|
-
j("div", null, W("分页"))
|
|
739
|
-
], -1)),
|
|
740
|
-
j("div", kl, [
|
|
741
|
-
G(ge, {
|
|
742
|
-
rowContents: c.value,
|
|
743
|
-
onChange: C
|
|
744
|
-
}, null, 8, ["rowContents"])
|
|
745
|
-
])
|
|
746
|
-
])
|
|
747
|
-
]);
|
|
748
|
-
};
|
|
749
|
-
}
|
|
750
|
-
}, _l = /* @__PURE__ */ ee(gl, [["__scopeId", "data-v-877911eb"]]), Cl = { class: "form-operate-content" }, Dl = { class: "form-operate-item" }, $l = { class: "operate-title" }, xl = { class: "operate-content" }, Ol = { class: "operate-title" }, Fl = { class: "operate-content" }, Tl = { class: "operate-content" }, El = {
|
|
751
|
-
__name: "operate",
|
|
752
|
-
props: {
|
|
753
|
-
itemContents: {
|
|
754
|
-
type: Array,
|
|
755
|
-
default: () => []
|
|
756
|
-
},
|
|
757
|
-
originalItemContents: {
|
|
758
|
-
type: Array,
|
|
759
|
-
default: () => []
|
|
760
|
-
}
|
|
761
|
-
},
|
|
762
|
-
emits: ["change"],
|
|
763
|
-
setup(b, { emit: D }) {
|
|
764
|
-
const l = b, u = D, t = N([{
|
|
765
|
-
name: "isRowFlex",
|
|
766
|
-
label: "是否横向布局",
|
|
767
|
-
type: "Switch",
|
|
768
|
-
value: !0
|
|
769
|
-
}]), m = N([{
|
|
770
|
-
label: "字段名称",
|
|
771
|
-
prop: "label",
|
|
772
|
-
type: "edit"
|
|
773
|
-
}, {
|
|
774
|
-
label: "字段类型",
|
|
775
|
-
prop: "type",
|
|
776
|
-
type: "edit"
|
|
777
|
-
}, {
|
|
778
|
-
label: "字段值",
|
|
779
|
-
prop: "key",
|
|
780
|
-
type: "edit"
|
|
781
|
-
}, {
|
|
782
|
-
label: "字段选项值",
|
|
783
|
-
prop: "options",
|
|
784
|
-
type: "edit"
|
|
785
|
-
}, {
|
|
786
|
-
label: "操作",
|
|
787
|
-
prop: "operate",
|
|
788
|
-
type: "operate",
|
|
789
|
-
sortable: !1
|
|
790
|
-
}]), x = N([{
|
|
791
|
-
label: "字段名称",
|
|
792
|
-
prop: "label",
|
|
793
|
-
type: "edit"
|
|
794
|
-
}, {
|
|
795
|
-
label: "字段类型",
|
|
796
|
-
prop: "type",
|
|
797
|
-
type: "edit"
|
|
798
|
-
}, {
|
|
799
|
-
label: "按钮背景颜色",
|
|
800
|
-
prop: "background",
|
|
801
|
-
type: "edit",
|
|
802
|
-
columnType: "Color"
|
|
803
|
-
}, {
|
|
804
|
-
label: "操作",
|
|
805
|
-
prop: "operate",
|
|
806
|
-
type: "operate",
|
|
807
|
-
sortable: !1
|
|
808
|
-
}]), O = N([]), g = N([]), A = N([]), P = N(0);
|
|
809
|
-
Q(
|
|
810
|
-
() => l.originalItemContents,
|
|
811
|
-
() => {
|
|
812
|
-
var i, o, r, f, e, n, p, d, y, S;
|
|
813
|
-
!l.originalItemContents || l.originalItemContents.length === 0 || (g.value = s(l.originalItemContents), A.value = (o = (i = g.value) == null ? void 0 : i.find((k) => (k == null ? void 0 : k.key) === "formContent")) == null ? void 0 : o.contents, O.value = (f = (r = g.value) == null ? void 0 : r.find((k) => (k == null ? void 0 : k.key) === "formButton")) == null ? void 0 : f.contents, A.value = (e = A.value) == null ? void 0 : e.map((k, $) => k = {
|
|
814
|
-
label: (k == null ? void 0 : k.label) ?? "",
|
|
815
|
-
type: (k == null ? void 0 : k.type) ?? "",
|
|
816
|
-
key: (k == null ? void 0 : k.key) ?? "",
|
|
817
|
-
options: (k == null ? void 0 : k.options) ?? "",
|
|
818
|
-
id: (k == null ? void 0 : k.id) ?? $
|
|
819
|
-
}), O.value = (n = O.value) == null ? void 0 : n.map((k, $) => k = {
|
|
820
|
-
label: (k == null ? void 0 : k.label) ?? "",
|
|
821
|
-
type: (k == null ? void 0 : k.type) ?? "",
|
|
822
|
-
background: (k == null ? void 0 : k.background) ?? "#000000",
|
|
823
|
-
id: (k == null ? void 0 : k.id) ?? $
|
|
824
|
-
}), t.value = (d = (p = g.value) == null ? void 0 : p.find((k) => (k == null ? void 0 : k.key) === "formFlex")) != null && d.contents ? [{
|
|
825
|
-
name: "isRowFlex",
|
|
826
|
-
label: "是否横向布局",
|
|
827
|
-
type: "Switch",
|
|
828
|
-
value: (S = (y = g.value) == null ? void 0 : y.find((k) => (k == null ? void 0 : k.key) === "formFlex")) == null ? void 0 : S.contents
|
|
829
|
-
}] : [{
|
|
830
|
-
name: "isRowFlex",
|
|
831
|
-
label: "是否横向布局",
|
|
832
|
-
type: "Switch",
|
|
833
|
-
value: !0
|
|
834
|
-
}]);
|
|
835
|
-
},
|
|
836
|
-
{ deep: !0, immediate: !0 }
|
|
837
|
-
);
|
|
838
|
-
const c = () => {
|
|
839
|
-
const i = s(O.value);
|
|
840
|
-
let o = s(g.value);
|
|
841
|
-
i.push({
|
|
842
|
-
label: "",
|
|
843
|
-
type: "",
|
|
844
|
-
background: "#000000",
|
|
845
|
-
id: P.value
|
|
846
|
-
}), O.value = i, P.value++;
|
|
847
|
-
const r = o == null ? void 0 : o.find((f) => (f == null ? void 0 : f.key) === "formButton");
|
|
848
|
-
r != null && r.contents ? (r.contents = i, o = o == null ? void 0 : o.map((f) => ((f == null ? void 0 : f.key) === "formButton" && (f.contents = i), f))) : o.push({
|
|
849
|
-
key: "formButton",
|
|
850
|
-
contents: i
|
|
851
|
-
}), g.value = o;
|
|
852
|
-
}, T = () => {
|
|
853
|
-
const i = s(A.value);
|
|
854
|
-
let o = s(g.value);
|
|
855
|
-
i.push({
|
|
856
|
-
label: "",
|
|
857
|
-
type: "",
|
|
858
|
-
key: "",
|
|
859
|
-
options: "",
|
|
860
|
-
id: P.value
|
|
861
|
-
}), A.value = i, P.value++;
|
|
862
|
-
const r = o == null ? void 0 : o.find((f) => (f == null ? void 0 : f.key) === "formContent");
|
|
863
|
-
r != null && r.contents ? (r.contents = i, o = o == null ? void 0 : o.map((f) => ((f == null ? void 0 : f.key) === "formContent" && (f.contents = i), f))) : o.push({
|
|
864
|
-
key: "formContent",
|
|
865
|
-
contents: i
|
|
866
|
-
}), g.value = o;
|
|
867
|
-
}, C = (i) => {
|
|
868
|
-
const o = s(O.value);
|
|
869
|
-
let r = s(g.value);
|
|
870
|
-
O.value = o.filter((e) => e.id !== i.id);
|
|
871
|
-
const f = r == null ? void 0 : r.find((e) => e.key === "formButton");
|
|
872
|
-
f != null && f.contents && (r = r == null ? void 0 : r.map((e) => ((e == null ? void 0 : e.key) === "formButton" && (e.contents = o.filter((n) => n.id !== i.id)), e))), g.value = r;
|
|
873
|
-
}, F = (i) => {
|
|
874
|
-
const o = s(A.value);
|
|
875
|
-
let r = s(g.value);
|
|
876
|
-
A.value = o.filter((e) => e.id !== i.id);
|
|
877
|
-
const f = r == null ? void 0 : r.find((e) => e.key === "formContent");
|
|
878
|
-
f != null && f.contents && (r = r == null ? void 0 : r.map((e) => ((e == null ? void 0 : e.key) === "formContent" && (e.contents = o.filter((n) => n.id !== i.id)), e))), g.value = r;
|
|
879
|
-
}, U = (i) => {
|
|
880
|
-
let o = s(g.value);
|
|
881
|
-
const r = o == null ? void 0 : o.find((f) => f.key === "formFlex");
|
|
882
|
-
(r == null ? void 0 : r.contents) !== void 0 ? o = o == null ? void 0 : o.map((f) => ((f == null ? void 0 : f.key) === "formFlex" && (f.contents = i == null ? void 0 : i.isRowFlex), f)) : o.push({
|
|
883
|
-
key: "formFlex",
|
|
884
|
-
contents: i == null ? void 0 : i.isRowFlex
|
|
885
|
-
}), g.value = o;
|
|
886
|
-
};
|
|
887
|
-
return Q(
|
|
888
|
-
() => [g.value, A.value],
|
|
889
|
-
() => {
|
|
890
|
-
let i = s(g.value);
|
|
891
|
-
const o = i == null ? void 0 : i.find((r) => (r == null ? void 0 : r.key) === "formContent");
|
|
892
|
-
o != null && o.contents ? (o.contents = A.value, i = i == null ? void 0 : i.map((r) => ((r == null ? void 0 : r.key) === "formContent" && (r.contents = A.value), r))) : i.push({
|
|
893
|
-
key: "formContent",
|
|
894
|
-
contents: A.value
|
|
895
|
-
}), u("change", i);
|
|
896
|
-
},
|
|
897
|
-
{ deep: !0, immediate: !0 }
|
|
898
|
-
), (i, o) => {
|
|
899
|
-
const r = pe("el-button");
|
|
900
|
-
return V(), L("div", Cl, [
|
|
901
|
-
j("div", Dl, [
|
|
902
|
-
j("div", $l, [
|
|
903
|
-
o[1] || (o[1] = j("div", null, W("表单信息"), -1)),
|
|
904
|
-
G(r, {
|
|
905
|
-
class: "blue-operate-button",
|
|
906
|
-
icon: "ele-Plus",
|
|
907
|
-
onClick: T
|
|
908
|
-
}, {
|
|
909
|
-
default: M(() => o[0] || (o[0] = [
|
|
910
|
-
ie(W("新建"))
|
|
911
|
-
])),
|
|
912
|
-
_: 1
|
|
913
|
-
})
|
|
914
|
-
]),
|
|
915
|
-
j("div", xl, [
|
|
916
|
-
G(oe, {
|
|
917
|
-
columns: m.value,
|
|
918
|
-
isShowPagination: !1,
|
|
919
|
-
isShowEdit: !1,
|
|
920
|
-
isMoveColumn: !1,
|
|
921
|
-
tableData: A.value,
|
|
922
|
-
onDeleteRow: F
|
|
923
|
-
}, null, 8, ["columns", "tableData"])
|
|
924
|
-
]),
|
|
925
|
-
j("div", Ol, [
|
|
926
|
-
o[3] || (o[3] = j("div", null, W("表单按钮"), -1)),
|
|
927
|
-
G(r, {
|
|
928
|
-
class: "blue-operate-button",
|
|
929
|
-
icon: "ele-Plus",
|
|
930
|
-
onClick: c
|
|
931
|
-
}, {
|
|
932
|
-
default: M(() => o[2] || (o[2] = [
|
|
933
|
-
ie(W("新建"))
|
|
934
|
-
])),
|
|
935
|
-
_: 1
|
|
936
|
-
})
|
|
937
|
-
]),
|
|
938
|
-
j("div", Fl, [
|
|
939
|
-
G(oe, {
|
|
940
|
-
columns: x.value,
|
|
941
|
-
isShowPagination: !1,
|
|
942
|
-
isShowEdit: !1,
|
|
943
|
-
isMoveColumn: !1,
|
|
944
|
-
tableData: O.value,
|
|
945
|
-
onDeleteRow: C
|
|
946
|
-
}, null, 8, ["columns", "tableData"])
|
|
947
|
-
]),
|
|
948
|
-
o[4] || (o[4] = j("div", { class: "operate-title" }, [
|
|
949
|
-
j("div", null, W("表单布局"))
|
|
950
|
-
], -1)),
|
|
951
|
-
j("div", Tl, [
|
|
952
|
-
G(ge, {
|
|
953
|
-
rowContents: t.value,
|
|
954
|
-
onChange: U
|
|
955
|
-
}, null, 8, ["rowContents"])
|
|
956
|
-
])
|
|
957
|
-
])
|
|
958
|
-
]);
|
|
959
|
-
};
|
|
960
|
-
}
|
|
961
|
-
}, Al = /* @__PURE__ */ ee(El, [["__scopeId", "data-v-a36b8468"]]), Bl = N([
|
|
962
|
-
{
|
|
963
|
-
name: "表格",
|
|
964
|
-
type: "table",
|
|
965
|
-
comp: "Table",
|
|
966
|
-
icon: "Grid"
|
|
967
|
-
},
|
|
968
|
-
{
|
|
969
|
-
name: "表单",
|
|
970
|
-
type: "form",
|
|
971
|
-
comp: "Form",
|
|
972
|
-
icon: "Film"
|
|
973
|
-
}
|
|
974
|
-
]), Nl = {
|
|
975
|
-
Table: tl,
|
|
976
|
-
Form: il,
|
|
977
|
-
TableOperate: _l,
|
|
978
|
-
FormOperate: Al
|
|
979
|
-
// 添加其他组件...
|
|
980
|
-
};
|
|
981
|
-
function We(b) {
|
|
982
|
-
return Nl[b] || null;
|
|
983
|
-
}
|
|
984
|
-
const Sl = { class: "type-select" }, wl = ["onClick"], jl = { class: "list-icon" }, Rl = {
|
|
985
|
-
__name: "index",
|
|
986
|
-
setup(b) {
|
|
987
|
-
const D = De(se), { itemData: l } = ke(D), u = (m) => He[m], t = (m) => {
|
|
988
|
-
const x = s(l.value);
|
|
989
|
-
x.push({
|
|
990
|
-
comp: m.comp,
|
|
991
|
-
name: m.name,
|
|
992
|
-
compData: []
|
|
993
|
-
}), D.setItemData(x);
|
|
994
|
-
};
|
|
995
|
-
return (m, x) => (V(), L("div", Sl, [
|
|
996
|
-
(V(!0), L(de, null, fe(Pe(Bl), (O, g) => (V(), L("div", {
|
|
997
|
-
class: "type-list",
|
|
998
|
-
key: g
|
|
999
|
-
}, [
|
|
1000
|
-
j("div", {
|
|
1001
|
-
class: "list-content",
|
|
1002
|
-
onClick: (A) => t(O)
|
|
1003
|
-
}, [
|
|
1004
|
-
j("div", jl, [
|
|
1005
|
-
(V(), ne(Ce(u(O.icon))))
|
|
1006
|
-
]),
|
|
1007
|
-
j("div", null, W(O.name), 1)
|
|
1008
|
-
], 8, wl)
|
|
1009
|
-
]))), 128))
|
|
1010
|
-
]));
|
|
1011
|
-
}
|
|
1012
|
-
}, ea = /* @__PURE__ */ ee(Rl, [["__scopeId", "data-v-fe4aecc8"]]), Ul = { class: "fill-content" }, Pl = { class: "operate-content" }, Vl = { class: "collapse-title" }, Wl = { class: "comp-child" }, Jl = {
|
|
1013
|
-
__name: "index",
|
|
1014
|
-
setup(b) {
|
|
1015
|
-
const D = De(se), { itemData: l, originalData: u } = ke(D), t = N([]), m = N([]);
|
|
1016
|
-
Q(
|
|
1017
|
-
() => l.value,
|
|
1018
|
-
() => {
|
|
1019
|
-
var g;
|
|
1020
|
-
!l.value || ((g = l.value) == null ? void 0 : g.length) === 0 || (t.value = s(l.value));
|
|
1021
|
-
},
|
|
1022
|
-
{ deep: !0, immediate: !0 }
|
|
1023
|
-
);
|
|
1024
|
-
const x = (g) => We(g), O = (g, A, P) => {
|
|
1025
|
-
if (!g || g.length === 0) return;
|
|
1026
|
-
let c = s(l.value);
|
|
1027
|
-
const T = s(A);
|
|
1028
|
-
T.compData = g, c = c == null ? void 0 : c.map((C, F) => (F === P && (C = T), C)), D.setItemData(c);
|
|
1029
|
-
};
|
|
1030
|
-
return (g, A) => {
|
|
1031
|
-
const P = pe("el-collapse-item"), c = pe("el-collapse");
|
|
1032
|
-
return V(), L("div", Ul, [
|
|
1033
|
-
A[1] || (A[1] = j("div", { class: "fill-operate" }, W("操作栏"), -1)),
|
|
1034
|
-
j("div", Pl, [
|
|
1035
|
-
G(c, {
|
|
1036
|
-
modelValue: m.value,
|
|
1037
|
-
"onUpdate:modelValue": A[0] || (A[0] = (T) => m.value = T),
|
|
1038
|
-
class: "collapse-content"
|
|
1039
|
-
}, {
|
|
1040
|
-
default: M(() => [
|
|
1041
|
-
(V(!0), L(de, null, fe(t.value, (T, C) => (V(), ne(P, {
|
|
1042
|
-
key: C,
|
|
1043
|
-
name: C
|
|
1044
|
-
}, {
|
|
1045
|
-
title: M(() => [
|
|
1046
|
-
j("div", Vl, W(T.name), 1)
|
|
1047
|
-
]),
|
|
1048
|
-
default: M(() => {
|
|
1049
|
-
var F, U;
|
|
1050
|
-
return [
|
|
1051
|
-
j("div", Wl, [
|
|
1052
|
-
(V(), ne(Ce(x(T.comp + "Operate")), {
|
|
1053
|
-
itemContents: T == null ? void 0 : T.compData,
|
|
1054
|
-
originalItemContents: (U = (F = Pe(u)) == null ? void 0 : F.find((i, o) => o === C)) == null ? void 0 : U.compData,
|
|
1055
|
-
onChange: (i) => O(i, T, C)
|
|
1056
|
-
}, null, 40, ["itemContents", "originalItemContents", "onChange"]))
|
|
1057
|
-
])
|
|
1058
|
-
];
|
|
1059
|
-
}),
|
|
1060
|
-
_: 2
|
|
1061
|
-
}, 1032, ["name"]))), 128))
|
|
1062
|
-
]),
|
|
1063
|
-
_: 1
|
|
1064
|
-
}, 8, ["modelValue"])
|
|
1065
|
-
])
|
|
1066
|
-
]);
|
|
1067
|
-
};
|
|
1068
|
-
}
|
|
1069
|
-
}, la = /* @__PURE__ */ ee(Jl, [["__scopeId", "data-v-a216b035"]]), zl = {
|
|
1070
|
-
key: 0,
|
|
1071
|
-
class: "show-content"
|
|
1072
|
-
}, Ll = {
|
|
1073
|
-
__name: "index",
|
|
1074
|
-
setup(b) {
|
|
1075
|
-
const D = De(se), { itemData: l } = ke(D), u = N([]);
|
|
1076
|
-
Q(
|
|
1077
|
-
() => l.value,
|
|
1078
|
-
() => {
|
|
1079
|
-
var m;
|
|
1080
|
-
!l.value || ((m = l.value) == null ? void 0 : m.length) === 0 || (u.value = s(l.value));
|
|
1081
|
-
},
|
|
1082
|
-
{ deep: !0, immediate: !0 }
|
|
1083
|
-
);
|
|
1084
|
-
const t = (m) => We(m);
|
|
1085
|
-
return (m, x) => {
|
|
1086
|
-
var O;
|
|
1087
|
-
return ((O = u.value) == null ? void 0 : O.length) > 0 ? (V(), L("div", zl, [
|
|
1088
|
-
(V(!0), L(de, null, fe(u.value, (g, A) => (V(), L("div", {
|
|
1089
|
-
class: "item-content",
|
|
1090
|
-
key: A
|
|
1091
|
-
}, [
|
|
1092
|
-
j("div", null, W(g.name), 1),
|
|
1093
|
-
(V(), ne(Ce(t(g.comp)), {
|
|
1094
|
-
itemData: g == null ? void 0 : g.compData,
|
|
1095
|
-
childItemData: g == null ? void 0 : g.itemChildData,
|
|
1096
|
-
key: A
|
|
1097
|
-
}, null, 8, ["itemData", "childItemData"]))
|
|
1098
|
-
]))), 128))
|
|
1099
|
-
])) : Ue("", !0);
|
|
1100
|
-
};
|
|
1101
|
-
}
|
|
1102
|
-
}, aa = /* @__PURE__ */ ee(Ll, [["__scopeId", "data-v-79320497"]]), K = [
|
|
1103
|
-
{
|
|
1104
|
-
key: "FormName",
|
|
1105
|
-
value: "Form"
|
|
1106
|
-
},
|
|
1107
|
-
{
|
|
1108
|
-
key: "TableName",
|
|
1109
|
-
value: "Table"
|
|
1110
|
-
},
|
|
1111
|
-
{
|
|
1112
|
-
key: "MenuName",
|
|
1113
|
-
value: "Menu"
|
|
1114
|
-
},
|
|
1115
|
-
{
|
|
1116
|
-
key: "GroupName",
|
|
1117
|
-
value: "Group"
|
|
1118
|
-
}
|
|
1119
|
-
], Z = [
|
|
1120
|
-
{
|
|
1121
|
-
key: "FormDirect",
|
|
1122
|
-
value: "formFlex"
|
|
1123
|
-
},
|
|
1124
|
-
{
|
|
1125
|
-
key: "Form",
|
|
1126
|
-
value: "formContent"
|
|
1127
|
-
},
|
|
1128
|
-
{
|
|
1129
|
-
key: "FormButton",
|
|
1130
|
-
value: "formButton"
|
|
1131
|
-
},
|
|
1132
|
-
{
|
|
1133
|
-
key: "FormFlex",
|
|
1134
|
-
value: "formWrap"
|
|
1135
|
-
},
|
|
1136
|
-
{
|
|
1137
|
-
key: "TableColumns",
|
|
1138
|
-
value: "header"
|
|
1139
|
-
},
|
|
1140
|
-
{
|
|
1141
|
-
key: "TableButton",
|
|
1142
|
-
value: "extraButton"
|
|
1143
|
-
},
|
|
1144
|
-
{
|
|
1145
|
-
key: "LineButton",
|
|
1146
|
-
value: "rowButton"
|
|
1147
|
-
},
|
|
1148
|
-
{
|
|
1149
|
-
key: "Table",
|
|
1150
|
-
value: "tableContents"
|
|
1151
|
-
},
|
|
1152
|
-
{
|
|
1153
|
-
key: "TableIndex",
|
|
1154
|
-
value: "tableIndex"
|
|
1155
|
-
},
|
|
1156
|
-
{
|
|
1157
|
-
key: "Menus",
|
|
1158
|
-
value: "menuContents"
|
|
1159
|
-
},
|
|
1160
|
-
{
|
|
1161
|
-
key: "GroupContents",
|
|
1162
|
-
value: "groupContents"
|
|
1163
|
-
}
|
|
1164
|
-
], be = N(0), Gl = (b) => {
|
|
1165
|
-
const D = b.split(`\r
|
|
1166
|
-
`).filter((t) => t.trim() !== ""), l = [];
|
|
1167
|
-
let u = "";
|
|
1168
|
-
for (const t of D)
|
|
1169
|
-
t.includes("{") || u.includes("{") || t.includes("[") || u.includes("[") || t.includes("【") || u.includes("【") || t.includes("(") || u.includes("(") || t.includes("(") || u.includes("(") ? (u += t.trim(), s(u).split("{").length - 1 === s(u).split("}").length - 1 && s(u).split("【").length - 1 === s(u).split("】").length - 1 && s(u).split("[").length - 1 === s(u).split("]").length - 1 && s(u).split("(").length - 1 === s(u).split(")").length - 1 && s(u).split("(").length - 1 === s(u).split(")").length - 1 && (l.push(u), u = "")) : l.push(t.trim());
|
|
1170
|
-
return l;
|
|
1171
|
-
}, Zl = (b) => {
|
|
1172
|
-
const D = b.trim().replace(/^'|'$/g, ""), l = /((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g, u = {};
|
|
1173
|
-
let t;
|
|
1174
|
-
for (; (t = l.exec(D)) !== null; ) {
|
|
1175
|
-
const m = t[1];
|
|
1176
|
-
let x = t[2].trim();
|
|
1177
|
-
(x.match(/\[/g) || []).length !== (x.match(/\]/g) || []).length && (x = x == null ? void 0 : x.replace(/]$/, "")), u[m] = m + "=" + x;
|
|
1178
|
-
}
|
|
1179
|
-
return u;
|
|
1180
|
-
}, Je = (b) => {
|
|
1181
|
-
const [D, l] = b.split("=").map((m) => m.trim()), u = D.replace(/['"]/g, ""), t = l.replace(/^['"]|['"]$/g, "");
|
|
1182
|
-
return console.log("parseKeyValue:", u, t), { key: u, value: t };
|
|
1183
|
-
}, Kl = (b) => {
|
|
1184
|
-
var x;
|
|
1185
|
-
let D = [];
|
|
1186
|
-
const [l, u] = b.split(/=(.+)/), t = l.replace(/['"]/g, "").trim(), m = u.replace(/^['"]|['"]$/g, "");
|
|
1187
|
-
return (x = Object.values(Zl(m))) == null || x.forEach((O) => {
|
|
1188
|
-
D.push(Je(O));
|
|
1189
|
-
}), { key: t, value: D };
|
|
1190
|
-
}, he = (b) => {
|
|
1191
|
-
try {
|
|
1192
|
-
return JSON.parse(b), !0;
|
|
1193
|
-
} catch {
|
|
1194
|
-
return !1;
|
|
1195
|
-
}
|
|
1196
|
-
}, ze = (b) => {
|
|
1197
|
-
try {
|
|
1198
|
-
const D = b.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
1199
|
-
if (s(D).split("{").length - 1 > 1) {
|
|
1200
|
-
let l = s(D).replace(/^\{(.*)\}$/, "[$1]");
|
|
1201
|
-
if (he(l) && !l.includes("$") || (l = l.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), he(l)) {
|
|
1202
|
-
const u = JSON.parse(l);
|
|
1203
|
-
let t = [];
|
|
1204
|
-
return u == null || u.forEach((m) => {
|
|
1205
|
-
var x;
|
|
1206
|
-
(x = Object.entries(s(m))) == null || x.forEach((O) => {
|
|
1207
|
-
be.value++, t.push({
|
|
1208
|
-
id: be.value,
|
|
1209
|
-
label: (O == null ? void 0 : O[0]) ?? "",
|
|
1210
|
-
key: (O == null ? void 0 : O[1]) === "" ? "" : O == null ? void 0 : O[1],
|
|
1211
|
-
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1212
|
-
width: Object.keys(s(m)).length
|
|
1213
|
-
});
|
|
1214
|
-
});
|
|
1215
|
-
}), t;
|
|
1216
|
-
} else
|
|
1217
|
-
return console.error("转换类型不正确:"), [];
|
|
1218
|
-
} else if (he(D)) {
|
|
1219
|
-
const l = JSON.parse(D);
|
|
1220
|
-
return Object.entries(l).map(([u, t]) => (be.value++, {
|
|
1221
|
-
id: be.value,
|
|
1222
|
-
label: u,
|
|
1223
|
-
key: t === "" ? "" : t,
|
|
1224
|
-
// 如果值为空,则key设为空字符串,否则保留原值
|
|
1225
|
-
width: 1
|
|
1226
|
-
}));
|
|
1227
|
-
} else
|
|
1228
|
-
return D;
|
|
1229
|
-
} catch (D) {
|
|
1230
|
-
return console.error("转换失败:", D), [];
|
|
1231
|
-
}
|
|
1232
|
-
}, Ml = (b, D) => {
|
|
1233
|
-
try {
|
|
1234
|
-
if (K != null && K.find((l) => (l == null ? void 0 : l.key) === D))
|
|
1235
|
-
return JSON.parse(b.replace(/[’]|[‘]|[']/g, '"'));
|
|
1236
|
-
if (s(b).split("[").length - 1 > 1) {
|
|
1237
|
-
const l = s(b).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1238
|
-
return JSON.parse(l);
|
|
1239
|
-
} else {
|
|
1240
|
-
const l = s(b).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
1241
|
-
if (he(l)) {
|
|
1242
|
-
const u = JSON.parse(l);
|
|
1243
|
-
return Array.isArray(u) ? u.map((t) => ({ label: t })) : u;
|
|
1244
|
-
} else
|
|
1245
|
-
return ze(s(b));
|
|
1246
|
-
}
|
|
1247
|
-
} catch (l) {
|
|
1248
|
-
return console.error("解析失败:", l), b;
|
|
1249
|
-
}
|
|
1250
|
-
}, ql = (b) => ({ [b == null ? void 0 : b.key]: Ml(b == null ? void 0 : b.value, b == null ? void 0 : b.key) }), Hl = (b) => {
|
|
1251
|
-
try {
|
|
1252
|
-
if (s(b).split("[").length - 1 > 1) {
|
|
1253
|
-
const D = s(b).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
1254
|
-
return JSON.parse(D);
|
|
1255
|
-
} else
|
|
1256
|
-
return JSON.parse(s(b).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((l) => ({ label: l }));
|
|
1257
|
-
} catch (D) {
|
|
1258
|
-
return console.error("解析失败:", D), b;
|
|
1259
|
-
}
|
|
1260
|
-
}, oa = (b) => {
|
|
1261
|
-
var m, x, O, g, A, P;
|
|
1262
|
-
const D = Gl((x = (m = s(b)) == null ? void 0 : m.replace("(", "(")) == null ? void 0 : x.replace(")", ")")), l = (O = s(D)) == null ? void 0 : O.map((c) => {
|
|
1263
|
-
var C, F;
|
|
1264
|
-
let T = (F = (C = s(c)) == null ? void 0 : C.split("=")) == null ? void 0 : F[0];
|
|
1265
|
-
return T != null && T.includes("GroupContents") ? Kl(c) : Je(c);
|
|
1266
|
-
}), u = [];
|
|
1267
|
-
console.log("transContents", l), (g = s(l)) == null || g.forEach((c) => {
|
|
1268
|
-
var T, C, F, U, i;
|
|
1269
|
-
K != null && K.find((o) => {
|
|
1270
|
-
var r, f;
|
|
1271
|
-
return ((r = o == null ? void 0 : o.key) == null ? void 0 : r.toUpperCase()) === ((f = c == null ? void 0 : c.key) == null ? void 0 : f.toUpperCase());
|
|
1272
|
-
}) ? u.push({
|
|
1273
|
-
comp: ((T = K == null ? void 0 : K.find((o) => {
|
|
1274
|
-
var r, f;
|
|
1275
|
-
return ((r = o == null ? void 0 : o.key) == null ? void 0 : r.toUpperCase()) === ((f = c == null ? void 0 : c.key) == null ? void 0 : f.toUpperCase());
|
|
1276
|
-
})) == null ? void 0 : T.value) ?? "",
|
|
1277
|
-
name: (C = c == null ? void 0 : c.value) == null ? void 0 : C.replace(/[’]|[‘]|[']/g, ""),
|
|
1278
|
-
compData: []
|
|
1279
|
-
}) : Z != null && Z.find((o) => {
|
|
1280
|
-
var r, f;
|
|
1281
|
-
return ((r = o == null ? void 0 : o.key) == null ? void 0 : r.toUpperCase()) === ((f = c == null ? void 0 : c.key) == null ? void 0 : f.toUpperCase());
|
|
1282
|
-
}) && ((u == null ? void 0 : u.length) === 0 && (F = c.key) != null && F.includes("Menus") && u.push({
|
|
1283
|
-
comp: "Menu",
|
|
1284
|
-
name: "",
|
|
1285
|
-
compData: []
|
|
1286
|
-
}), (U = u == null ? void 0 : u[(u == null ? void 0 : u.length) - 1]) != null && U.compData && u[(u == null ? void 0 : u.length) - 1].compData.push({
|
|
1287
|
-
key: (i = Z == null ? void 0 : Z.find((o) => {
|
|
1288
|
-
var r, f;
|
|
1289
|
-
return ((r = o == null ? void 0 : o.key) == null ? void 0 : r.toUpperCase()) === ((f = c == null ? void 0 : c.key) == null ? void 0 : f.toUpperCase());
|
|
1290
|
-
})) == null ? void 0 : i.value,
|
|
1291
|
-
contents: c == null ? void 0 : c.value
|
|
1292
|
-
}));
|
|
1293
|
-
}), console.log("newContents", u);
|
|
1294
|
-
let t = (A = s(u)) == null ? void 0 : A.map((c) => {
|
|
1295
|
-
var T;
|
|
1296
|
-
return c != null && c.compData && (c.compData = (T = c == null ? void 0 : c.compData) == null ? void 0 : T.map((C) => {
|
|
1297
|
-
var F, U, i, o, r, f, e, n, p, d, y;
|
|
1298
|
-
if ((C == null ? void 0 : C.key) === "formFlex")
|
|
1299
|
-
C.contents = ((U = (F = C.contents) == null ? void 0 : F.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : U.toUpperCase()) !== "Vertical".toUpperCase();
|
|
1300
|
-
else if ((C == null ? void 0 : C.key) === "groupContents")
|
|
1301
|
-
C.contents = (i = s(C.contents)) == null ? void 0 : i.map((S) => ql(s(S)));
|
|
1302
|
-
else if (((r = (o = C.contents) == null ? void 0 : o.trim()) != null && r.startsWith("[") || (e = (f = C.contents) == null ? void 0 : f.trim()) != null && e.startsWith("【")) && ((p = (n = C.contents) == null ? void 0 : n.trim()) != null && p.endsWith("]") || (y = (d = C.contents) == null ? void 0 : d.trim()) != null && y.endsWith("】")))
|
|
1303
|
-
C.contents = Hl(s(C.contents));
|
|
1304
|
-
else {
|
|
1305
|
-
if (!C.contents) return;
|
|
1306
|
-
C.contents = ze(s(C.contents));
|
|
1307
|
-
}
|
|
1308
|
-
return C;
|
|
1309
|
-
})), c;
|
|
1310
|
-
});
|
|
1311
|
-
return t = (P = s(t)) == null ? void 0 : P.map((c) => {
|
|
1312
|
-
var T;
|
|
1313
|
-
return (c == null ? void 0 : c.comp) === "Group" && (c.compData = (T = c.compData) == null ? void 0 : T.map((C) => {
|
|
1314
|
-
var U;
|
|
1315
|
-
let F = [];
|
|
1316
|
-
return (U = C.contents) == null || U.forEach((i) => {
|
|
1317
|
-
var o, r, f, e, n, p, d, y, S, k, $, E;
|
|
1318
|
-
if (K != null && K.find((_) => {
|
|
1319
|
-
var w, v, B;
|
|
1320
|
-
return ((w = _ == null ? void 0 : _.key) == null ? void 0 : w.toUpperCase()) === ((B = (v = Object.keys(i)) == null ? void 0 : v[0]) == null ? void 0 : B.toUpperCase());
|
|
1321
|
-
}))
|
|
1322
|
-
F.push({
|
|
1323
|
-
comp: (o = K == null ? void 0 : K.find((_) => {
|
|
1324
|
-
var w, v, B;
|
|
1325
|
-
return ((w = _ == null ? void 0 : _.key) == null ? void 0 : w.toUpperCase()) === ((B = (v = Object.keys(i)) == null ? void 0 : v[0]) == null ? void 0 : B.toUpperCase());
|
|
1326
|
-
})) == null ? void 0 : o.value,
|
|
1327
|
-
name: (f = (r = Object.values(i)) == null ? void 0 : r[0]) == null ? void 0 : f.replace(/[’]|[‘]|[']/g, ""),
|
|
1328
|
-
compData: []
|
|
1329
|
-
});
|
|
1330
|
-
else if (Z != null && Z.find((_) => {
|
|
1331
|
-
var w, v, B;
|
|
1332
|
-
return ((w = _ == null ? void 0 : _.key) == null ? void 0 : w.toUpperCase()) === ((B = (v = Object.keys(i)) == null ? void 0 : v[0]) == null ? void 0 : B.toUpperCase());
|
|
1333
|
-
})) {
|
|
1334
|
-
if ((F == null ? void 0 : F.length) === 0) return;
|
|
1335
|
-
(e = F == null ? void 0 : F[(F == null ? void 0 : F.length) - 1]) != null && e.compData && F[(F == null ? void 0 : F.length) - 1].compData.push({
|
|
1336
|
-
key: (n = Z == null ? void 0 : Z.find((_) => {
|
|
1337
|
-
var w, v, B;
|
|
1338
|
-
return ((w = _ == null ? void 0 : _.key) == null ? void 0 : w.toUpperCase()) === ((B = (v = Object.keys(i)) == null ? void 0 : v[0]) == null ? void 0 : B.toUpperCase());
|
|
1339
|
-
})) == null ? void 0 : n.value,
|
|
1340
|
-
contents: (p = Object.values(i)) == null ? void 0 : p[0]
|
|
1341
|
-
});
|
|
1342
|
-
} else if ((y = (d = Object.keys(i)) == null ? void 0 : d[0]) != null && y.includes("$")) {
|
|
1343
|
-
const _ = (k = (S = Object.keys(s(i))) == null ? void 0 : S[0]) == null ? void 0 : k.split("$");
|
|
1344
|
-
F[(F == null ? void 0 : F.length) - 1].compData.push({
|
|
1345
|
-
key: ($ = Z == null ? void 0 : Z.find((w) => {
|
|
1346
|
-
var v, B;
|
|
1347
|
-
return ((v = w == null ? void 0 : w.key) == null ? void 0 : v.toUpperCase()) === ((B = _ == null ? void 0 : _[0]) == null ? void 0 : B.toUpperCase());
|
|
1348
|
-
})) == null ? void 0 : $.value,
|
|
1349
|
-
contents: (E = Object.values(i)) == null ? void 0 : E[0],
|
|
1350
|
-
selectLabel: _ == null ? void 0 : _[1]
|
|
1351
|
-
});
|
|
1352
|
-
}
|
|
1353
|
-
return i;
|
|
1354
|
-
}), C.contents = F, C;
|
|
1355
|
-
})), c;
|
|
1356
|
-
}), t;
|
|
1357
|
-
};
|
|
1358
|
-
export {
|
|
1359
|
-
aa as a,
|
|
1360
|
-
la as b,
|
|
1361
|
-
oa as e,
|
|
1362
|
-
We as g,
|
|
1363
|
-
ea as m,
|
|
1364
|
-
se as p,
|
|
1365
|
-
Ve as u
|
|
1366
|
-
};
|