ss-component-new 1.1.85 → 1.1.87
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-D2zrIzej.js → array-C8gxudwq.js} +2 -2
- package/dist/{array-D8U2pGTC.cjs → array-q8pUBU30.cjs} +1 -1
- package/dist/{cloneDeep-8zu2YtRV.cjs → cloneDeep-B3VC5L8Z.cjs} +1 -1
- package/dist/{cloneDeep-DuEirD61.js → cloneDeep-BpK0E_ef.js} +1 -1
- package/dist/{index-CdiwcgWn.cjs → index-B-jDNH2e.cjs} +1 -1
- package/dist/index-B7LUAJqu.cjs +1 -0
- package/dist/{index-Bk6z8NoT.cjs → index-BLoamlbm.cjs} +1 -1
- package/dist/{index-CPAniSJJ.cjs → index-BW-bmuq0.cjs} +1 -1
- package/dist/{index-DADq4uib.cjs → index-C6UYDisz.cjs} +1 -1
- package/dist/{index-DzijCTQM.js → index-CQuV8YFa.js} +2 -2
- package/dist/{index-DORpNeEv.js → index-CQvBB7B8.js} +1 -1
- package/dist/{index-CefBKPRE.cjs → index-CdxjVh-X.cjs} +1 -1
- package/dist/{index-By9M6a6K.cjs → index-DZAs9vSe.cjs} +1 -1
- package/dist/{index-D0BrZauT.js → index-Dakgk1fr.js} +2 -2
- package/dist/index-Dc21Fkf9.js +345 -0
- package/dist/{index-3JVabNmb.js → index-DtoLslf_.js} +1 -1
- package/dist/{index-Dk3AafH9.js → index-gsysGhDn.js} +1 -1
- package/dist/{index-BviuenkT.js → index-iaj5xJUJ.js} +3 -3
- package/dist/index-nChhWjuh.js +43 -0
- package/dist/index-wRmYoZQa.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-Ce-Paygw.js +618 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-CwZAxgWm.cjs +7 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-sXEqRck_.js → index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-B67eMpk2.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-CoTrTiyZ.cjs → index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-CL3yi2CW.cjs} +1 -1
- package/dist/{main-BJ49BQ83.js → main-BIsSHE8k.js} +3 -3
- package/dist/{main-BrFLjXjC.cjs → main-C_3s_51_.cjs} +1 -1
- package/dist/{ss-component.cjs.js → ss-component.cjs} +1 -1
- package/dist/{ss-component-new.css → ss-component.css} +1 -1
- package/dist/{ss-component.es.js → ss-component.js} +6 -6
- package/dist/ss-component2.cjs +1 -0
- package/dist/{router.es.js → ss-component2.js} +1 -1
- package/package.json +1 -1
- package/dist/index-BK00mV7O.js +0 -37
- package/dist/index-DK-C6XIG.js +0 -351
- package/dist/index-P-XWFKEv.cjs +0 -1
- package/dist/index-bTbhSpJ8.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_876d48c6_lang-BufoMCSS.cjs +0 -4
- package/dist/index.vue_vue_type_style_index_0_scoped_876d48c6_lang-CSfAQ28_.js +0 -254
- package/dist/router.cjs.js +0 -1
package/dist/index-DK-C6XIG.js
DELETED
|
@@ -1,351 +0,0 @@
|
|
|
1
|
-
import { ref as D, onMounted as ee, createElementBlock as m, openBlock as i, Fragment as z, renderList as H, createElementVNode as N, createCommentVNode as $, toDisplayString as U, watch as O, createVNode as R, unref as F, createBlock as Y, resolveDynamicComponent as te } from "vue";
|
|
2
|
-
import { m as ae, a as ne, b as oe } from "./index-BviuenkT.js";
|
|
3
|
-
import { p as J, u as se, b as le, i as re, e as ce, g as ue, a as ie } from "./array-D2zrIzej.js";
|
|
4
|
-
import { u as Q } from "./modelComp-B3sxj_Kp.js";
|
|
5
|
-
import { u as X, s as P } from "./menu-BIINB-0Y.js";
|
|
6
|
-
import de from "./index-Dk3AafH9.js";
|
|
7
|
-
import { e as me } from "./index.vue_vue_type_style_index_0_scoped_876d48c6_lang-CSfAQ28_.js";
|
|
8
|
-
import { _ as q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
-
import { c as B } from "./cloneDeep-DuEirD61.js";
|
|
10
|
-
const fe = { class: "bread-content" }, he = ["onClick"], ve = { key: 0 }, ge = {
|
|
11
|
-
__name: "index",
|
|
12
|
-
props: {
|
|
13
|
-
breadArray: {
|
|
14
|
-
type: Array,
|
|
15
|
-
default: () => []
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
emits: ["click"],
|
|
19
|
-
setup(p, { emit: k }) {
|
|
20
|
-
const t = p, d = D([]), u = k;
|
|
21
|
-
ee(() => {
|
|
22
|
-
d.value = t == null ? void 0 : t.breadArray;
|
|
23
|
-
});
|
|
24
|
-
const f = (y) => {
|
|
25
|
-
u("click", y);
|
|
26
|
-
};
|
|
27
|
-
return (y, v) => (i(), m("div", fe, [
|
|
28
|
-
(i(!0), m(z, null, H(d.value, (h, g) => (i(), m("div", {
|
|
29
|
-
key: g,
|
|
30
|
-
class: "bread-item"
|
|
31
|
-
}, [
|
|
32
|
-
N("div", {
|
|
33
|
-
class: "bread-title",
|
|
34
|
-
onClick: (A) => f(h)
|
|
35
|
-
}, U(h.value), 9, he),
|
|
36
|
-
g !== d.value.length - 1 ? (i(), m("div", ve, U("/"))) : $("", !0)
|
|
37
|
-
]))), 128))
|
|
38
|
-
]));
|
|
39
|
-
}
|
|
40
|
-
}, ye = /* @__PURE__ */ q(ge, [["__scopeId", "data-v-d55d3ede"]]);
|
|
41
|
-
function _e(p) {
|
|
42
|
-
const k = [], t = {
|
|
43
|
-
"(": ")",
|
|
44
|
-
"{": "}",
|
|
45
|
-
"[": "]"
|
|
46
|
-
};
|
|
47
|
-
for (let d = 0; d < p.length; d++) {
|
|
48
|
-
const u = p[d];
|
|
49
|
-
if (t[u])
|
|
50
|
-
k.push(u);
|
|
51
|
-
else if (Object.values(t).includes(u)) {
|
|
52
|
-
const f = k.pop();
|
|
53
|
-
if (console.log("stack", k, f, t[f]), t[f] !== u)
|
|
54
|
-
return !1;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
return k.length === 0;
|
|
58
|
-
}
|
|
59
|
-
function Ce(p) {
|
|
60
|
-
var d, u, f, y;
|
|
61
|
-
const k = (u = (d = p[0]) == null ? void 0 : d.compData) == null ? void 0 : u.filter((v) => v.key !== "formContent"), t = (y = (f = p[0]) == null ? void 0 : f.compData) == null ? void 0 : y.filter((v) => v.key === "formContent");
|
|
62
|
-
console.log("handleFormModel:", k, t, p);
|
|
63
|
-
}
|
|
64
|
-
const pe = { class: "system-wrap" }, ke = {
|
|
65
|
-
key: 0,
|
|
66
|
-
class: "show-content"
|
|
67
|
-
}, De = {
|
|
68
|
-
key: 0,
|
|
69
|
-
class: "item-menu-content"
|
|
70
|
-
}, Se = {
|
|
71
|
-
key: 0,
|
|
72
|
-
class: "item-view-group"
|
|
73
|
-
}, Ie = {
|
|
74
|
-
__name: "index",
|
|
75
|
-
props: {
|
|
76
|
-
content: String,
|
|
77
|
-
jsonContents: Array
|
|
78
|
-
},
|
|
79
|
-
emits: ["change", "contentChange"],
|
|
80
|
-
setup(p, { emit: k }) {
|
|
81
|
-
const t = p, d = k, u = Q(J);
|
|
82
|
-
se(J);
|
|
83
|
-
const f = D(!0), y = X(), v = D(!0), { itemData: h } = P(u), g = le(J), { activeMenuPath: A, activeMenuOpenPaths: Z, menuTriggerType: G, menus: V } = P(y), { selectIndex: w, selectTitle: M } = P(g), b = D([]), _ = D([]), K = (e) => {
|
|
84
|
-
var n, o, a;
|
|
85
|
-
const s = (n = h.value) == null ? void 0 : n.find((l) => l.name === A.value);
|
|
86
|
-
_.value = (a = (o = s == null ? void 0 : s.compData) == null ? void 0 : o[0]) == null ? void 0 : a.contents, v.value = !0, v.value && (v.value = !1), d("change", {
|
|
87
|
-
wholeValue: b.value,
|
|
88
|
-
editValue: e
|
|
89
|
-
});
|
|
90
|
-
}, L = (e) => {
|
|
91
|
-
var S, C, T;
|
|
92
|
-
const s = B(b.value), n = s == null ? void 0 : s.map((r, I) => (I === (e == null ? void 0 : e.index) && (r.compData = e == null ? void 0 : e.contents), r));
|
|
93
|
-
let o = "";
|
|
94
|
-
(C = (S = B(n)) == null ? void 0 : S.filter((r) => (r == null ? void 0 : r.comp) === "Form")) == null || C.forEach((r) => {
|
|
95
|
-
var I;
|
|
96
|
-
(I = r == null ? void 0 : r.compData) == null || I.forEach((x) => {
|
|
97
|
-
var j;
|
|
98
|
-
(x == null ? void 0 : x.key) === "formContent" && ((j = x == null ? void 0 : x.contents) == null || j.forEach((E) => {
|
|
99
|
-
E.value !== "" && (o = o === "" ? E == null ? void 0 : E.value : o + "-" + (E == null ? void 0 : E.value));
|
|
100
|
-
}));
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
let a = M == null ? void 0 : M.value;
|
|
104
|
-
(a == null ? void 0 : a.length) > 0 ? a[0] = { key: "main", value: o } : (Array.isArray(a) || (a = []), a.push({ key: "main", value: o })), g.setSelectTitle(a), f.value = !1, b.value = n;
|
|
105
|
-
const l = (T = h.value) == null ? void 0 : T.map((r, I) => {
|
|
106
|
-
var x;
|
|
107
|
-
return r.name === A.value && (r.compData = (x = r.compData) == null ? void 0 : x.map((j) => ((j == null ? void 0 : j.key) === "groupContents" && (j.contents = b.value), j))), r;
|
|
108
|
-
});
|
|
109
|
-
u.setItemData(l), v.value && (v.value = !1), d("contentChange", {
|
|
110
|
-
wholeContent: h.value
|
|
111
|
-
});
|
|
112
|
-
}, W = (e) => {
|
|
113
|
-
var s, n;
|
|
114
|
-
if ((e == null ? void 0 : e.key) === "main")
|
|
115
|
-
g.setSelectIndex(""), g.setSelectMenu(""), g.setSelectTitle((s = M.value) == null ? void 0 : s[0]);
|
|
116
|
-
else {
|
|
117
|
-
const o = [];
|
|
118
|
-
let a = -1;
|
|
119
|
-
(n = M.value) == null || n.forEach((l, S) => {
|
|
120
|
-
(l == null ? void 0 : l.key) === (e == null ? void 0 : e.key) && (a = S), (a === -1 || a >= S) && o.push(l);
|
|
121
|
-
}), g.setSelectTitle(o), g.setSelectMenu(e == null ? void 0 : e.key);
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
O(
|
|
125
|
-
() => h.value,
|
|
126
|
-
() => {
|
|
127
|
-
var s, n, o, a, l, S, C, T;
|
|
128
|
-
if (!h.value || ((s = h.value) == null ? void 0 : s.length) === 0 || !f.value) return;
|
|
129
|
-
let e = null;
|
|
130
|
-
if (!A.value)
|
|
131
|
-
e = (o = (n = B(h.value)) == null ? void 0 : n.filter((r) => (r == null ? void 0 : r.comp) === "Group")) == null ? void 0 : o[0], y.setActiveMenuPath(e == null ? void 0 : e.name);
|
|
132
|
-
else {
|
|
133
|
-
const r = (a = B(h.value)) == null ? void 0 : a.filter((I) => (I == null ? void 0 : I.comp) === "Group");
|
|
134
|
-
e = r == null ? void 0 : r.find((I) => I.name === A.value);
|
|
135
|
-
}
|
|
136
|
-
_.value = (S = (l = e == null ? void 0 : e.compData) == null ? void 0 : l[0]) == null ? void 0 : S.contents, b.value = (T = (C = e == null ? void 0 : e.compData) == null ? void 0 : C[0]) == null ? void 0 : T.contents, console.log("itemData监听", e, A.value, h.value);
|
|
137
|
-
},
|
|
138
|
-
{ deep: !0, immediate: !0 }
|
|
139
|
-
), O(() => A.value, (e) => {
|
|
140
|
-
var s, n, o, a, l, S;
|
|
141
|
-
if (e) {
|
|
142
|
-
const C = (s = B(h.value)) == null ? void 0 : s.find((T) => T.name === e);
|
|
143
|
-
if (e && C) {
|
|
144
|
-
_.value = (o = (n = C == null ? void 0 : C.compData) == null ? void 0 : n[0]) == null ? void 0 : o.contents, b.value = (l = (a = C == null ? void 0 : C.compData) == null ? void 0 : a[0]) == null ? void 0 : l.contents, console.log("点击-新-data:", e, _.value);
|
|
145
|
-
const T = (S = _.value) == null ? void 0 : S.filter((r) => r.comp === "Form");
|
|
146
|
-
Ce(T);
|
|
147
|
-
} else
|
|
148
|
-
_.value = [], b.value = [];
|
|
149
|
-
g.setSelectTitle([]), g.setSelectIndex(""), g.setSelectMenu("");
|
|
150
|
-
}
|
|
151
|
-
}, {
|
|
152
|
-
immediate: !0
|
|
153
|
-
}), O(
|
|
154
|
-
() => [t == null ? void 0 : t.content, t == null ? void 0 : t.jsonContents],
|
|
155
|
-
() => {
|
|
156
|
-
var o;
|
|
157
|
-
if (((o = t == null ? void 0 : t.jsonContents) == null ? void 0 : o.length) > 0) {
|
|
158
|
-
u.setOriginalData(t == null ? void 0 : t.jsonContents), u.setItemData(t == null ? void 0 : t.jsonContents);
|
|
159
|
-
return;
|
|
160
|
-
}
|
|
161
|
-
if (!(t != null && t.content) || (t == null ? void 0 : t.content) === "") return;
|
|
162
|
-
f.value = !0;
|
|
163
|
-
let e;
|
|
164
|
-
re(t == null ? void 0 : t.content) ? e = ce(t == null ? void 0 : t.content) : e = me(t == null ? void 0 : t.content);
|
|
165
|
-
const s = Array.isArray(e) && (e == null ? void 0 : e.find((a) => {
|
|
166
|
-
var l;
|
|
167
|
-
return ((l = a.comp) == null ? void 0 : l.toUpperCase()) === "MENU";
|
|
168
|
-
}));
|
|
169
|
-
y.setRawMenu(s ?? {});
|
|
170
|
-
const n = Array.isArray(e) && (e == null ? void 0 : e.find((a) => {
|
|
171
|
-
var l;
|
|
172
|
-
return ((l = a.comp) == null ? void 0 : l.toUpperCase()) === "SYSTEM";
|
|
173
|
-
}));
|
|
174
|
-
y.setSystemKey((n == null ? void 0 : n.name) ?? ""), u.setOriginalData(e), u.setItemData(e);
|
|
175
|
-
},
|
|
176
|
-
{ deep: !0, immediate: !0 }
|
|
177
|
-
);
|
|
178
|
-
const c = (e) => ue(e);
|
|
179
|
-
return (e, s) => {
|
|
180
|
-
var n, o;
|
|
181
|
-
return i(), m("div", pe, [
|
|
182
|
-
R(de, { class: "sys-aside" }),
|
|
183
|
-
((n = _.value) == null ? void 0 : n.length) > 0 ? (i(), m("div", ke, [
|
|
184
|
-
((o = F(M)) == null ? void 0 : o.length) > 1 ? (i(), m("div", De, [
|
|
185
|
-
(i(), Y(ye, {
|
|
186
|
-
key: F(M),
|
|
187
|
-
breadArray: F(M),
|
|
188
|
-
onClick: W
|
|
189
|
-
}, null, 8, ["breadArray"]))
|
|
190
|
-
])) : $("", !0),
|
|
191
|
-
(i(!0), m(z, null, H(_.value, (a, l) => (i(), m("div", {
|
|
192
|
-
class: "item-content",
|
|
193
|
-
key: l
|
|
194
|
-
}, [
|
|
195
|
-
F(w) === "" || l.toString() === F(w) ? (i(), m("div", Se, U(a.name), 1)) : $("", !0),
|
|
196
|
-
F(w) === "" || l.toString() === F(w) ? (i(), Y(te(c(a.comp)), {
|
|
197
|
-
itemData: a == null ? void 0 : a.compData,
|
|
198
|
-
childItemData: a == null ? void 0 : a.itemChildData,
|
|
199
|
-
key: l,
|
|
200
|
-
onChange: K,
|
|
201
|
-
index: l,
|
|
202
|
-
onContentChange: L
|
|
203
|
-
}, null, 40, ["itemData", "childItemData", "index"])) : $("", !0)
|
|
204
|
-
]))), 128))
|
|
205
|
-
])) : $("", !0)
|
|
206
|
-
]);
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
}, Me = /* @__PURE__ */ q(Ie, [["__scopeId", "data-v-38117cb6"]]), Ae = { class: "add-model-content" }, be = {
|
|
210
|
-
key: 0,
|
|
211
|
-
class: "model-import-data"
|
|
212
|
-
}, Te = { class: "import-button" }, xe = { key: 0 }, $e = {
|
|
213
|
-
key: 1,
|
|
214
|
-
class: "model-operate"
|
|
215
|
-
}, je = { class: "model-select" }, we = { class: "model-fill" }, Ee = {
|
|
216
|
-
key: 2,
|
|
217
|
-
class: "model-view"
|
|
218
|
-
}, Fe = {
|
|
219
|
-
__name: "index",
|
|
220
|
-
props: {
|
|
221
|
-
mode: {
|
|
222
|
-
type: String,
|
|
223
|
-
default: "view"
|
|
224
|
-
},
|
|
225
|
-
content: {
|
|
226
|
-
type: String,
|
|
227
|
-
default: ""
|
|
228
|
-
},
|
|
229
|
-
jsonContents: {
|
|
230
|
-
type: Array,
|
|
231
|
-
default: () => []
|
|
232
|
-
},
|
|
233
|
-
showButton: {
|
|
234
|
-
type: Boolean,
|
|
235
|
-
default: !0
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
emits: ["change", "contentChange"],
|
|
239
|
-
setup(p, { emit: k }) {
|
|
240
|
-
const t = p, d = k, u = D(""), f = D([]), y = D(0), v = Q(J), h = X(J), { itemData: g, originalData: A } = P(v), { activeMenuPath: Z } = P(h), G = D(null), V = D(0), w = D(""), M = (c) => {
|
|
241
|
-
d("contentChange", c);
|
|
242
|
-
}, b = (c) => {
|
|
243
|
-
var s;
|
|
244
|
-
const e = (s = B(c == null ? void 0 : c.wholeValue)) == null ? void 0 : s.map((n) => {
|
|
245
|
-
var o;
|
|
246
|
-
return (n == null ? void 0 : n.comp) === "Form" && (n.compData = (o = n.compData) == null ? void 0 : o.map((a) => ((a == null ? void 0 : a.key) === "formContent" && (a.contents = ie(a == null ? void 0 : a.contents)), a))), n;
|
|
247
|
-
});
|
|
248
|
-
d("change", {
|
|
249
|
-
originalContents: A.value,
|
|
250
|
-
currentContents: c == null ? void 0 : c.wholeValue,
|
|
251
|
-
editContent: c == null ? void 0 : c.editValue,
|
|
252
|
-
arrayToContents: e
|
|
253
|
-
});
|
|
254
|
-
}, _ = D([]), K = () => {
|
|
255
|
-
G.value.click();
|
|
256
|
-
}, L = (c) => {
|
|
257
|
-
const e = c.target.files[0];
|
|
258
|
-
if (!e) return;
|
|
259
|
-
const s = new FileReader();
|
|
260
|
-
s.onload = (n) => {
|
|
261
|
-
try {
|
|
262
|
-
u.value = n.target.result;
|
|
263
|
-
const o = _e(n.target.result);
|
|
264
|
-
console.log("handleFileChange-isValid", o), _.value = W(n.target.result), V.value++;
|
|
265
|
-
} catch (o) {
|
|
266
|
-
console.error("解析失败:", o);
|
|
267
|
-
}
|
|
268
|
-
}, s.onerror = (n) => {
|
|
269
|
-
console.error("文件读取错误:", n);
|
|
270
|
-
}, s.readAsText(e);
|
|
271
|
-
};
|
|
272
|
-
O(
|
|
273
|
-
() => [t == null ? void 0 : t.content, t == null ? void 0 : t.jsonContents],
|
|
274
|
-
() => {
|
|
275
|
-
u.value = t == null ? void 0 : t.content, f.value = t == null ? void 0 : t.jsonContents;
|
|
276
|
-
},
|
|
277
|
-
{ deep: !0, immediate: !0 }
|
|
278
|
-
), O(
|
|
279
|
-
() => V.value,
|
|
280
|
-
() => {
|
|
281
|
-
var c;
|
|
282
|
-
((c = _.value) == null ? void 0 : c.length) !== 0 && (v.setOriginalData(_.value), v.setItemData(_.value));
|
|
283
|
-
},
|
|
284
|
-
{ deep: !0, immediate: !0 }
|
|
285
|
-
);
|
|
286
|
-
const W = (c) => {
|
|
287
|
-
let e = c.replace(/,/g, ",").replace(/;/g, ";").replace(/:/g, ":");
|
|
288
|
-
e = e.replace(/(\w+)\s*:/g, "$1:"), e = e.replace(/\r\n/g, "").replace(/\n/g, "").replace(/\t/g, "").replace(/\s+/g, " ").trim(), e = e.replace(/,\s*([}\]])/g, "$1"), e = e.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g, ": $2$4");
|
|
289
|
-
try {
|
|
290
|
-
return JSON.parse(e);
|
|
291
|
-
} catch (s) {
|
|
292
|
-
try {
|
|
293
|
-
const o = new Function(`return ${e}`)();
|
|
294
|
-
if (Array.isArray(o) || typeof o == "object")
|
|
295
|
-
return o;
|
|
296
|
-
throw new Error(`解析结果不是有效的数组或对象: ${s}`);
|
|
297
|
-
} catch (n) {
|
|
298
|
-
throw new Error(`无法解析JSON: ${n.message}`);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
};
|
|
302
|
-
return (c, e) => {
|
|
303
|
-
var s;
|
|
304
|
-
return i(), m("div", Ae, [
|
|
305
|
-
((s = t == null ? void 0 : t.jsonContents) == null ? void 0 : s.length) === 0 && (t != null && t.showButton) ? (i(), m("div", be, [
|
|
306
|
-
N("div", Te, [
|
|
307
|
-
N("input", {
|
|
308
|
-
type: "file",
|
|
309
|
-
ref_key: "fileInput",
|
|
310
|
-
ref: G,
|
|
311
|
-
accept: ".txt",
|
|
312
|
-
onChange: L,
|
|
313
|
-
style: { display: "none" }
|
|
314
|
-
}, null, 544),
|
|
315
|
-
N("button", {
|
|
316
|
-
onClick: K,
|
|
317
|
-
class: "import-button-content"
|
|
318
|
-
}, "导入文件"),
|
|
319
|
-
w.value ? (i(), m("span", xe, U(w.value), 1)) : $("", !0)
|
|
320
|
-
])
|
|
321
|
-
])) : $("", !0),
|
|
322
|
-
(t == null ? void 0 : t.mode) === "edit" ? (i(), m("div", $e, [
|
|
323
|
-
N("div", je, [
|
|
324
|
-
R(ae)
|
|
325
|
-
]),
|
|
326
|
-
(i(), m("div", {
|
|
327
|
-
class: "model-show",
|
|
328
|
-
key: y.value
|
|
329
|
-
}, [
|
|
330
|
-
R(ne)
|
|
331
|
-
])),
|
|
332
|
-
N("div", we, [
|
|
333
|
-
R(oe)
|
|
334
|
-
])
|
|
335
|
-
])) : $("", !0),
|
|
336
|
-
(t == null ? void 0 : t.mode) === "view" ? (i(), m("div", Ee, [
|
|
337
|
-
(i(), Y(Me, {
|
|
338
|
-
content: u.value,
|
|
339
|
-
onChange: b,
|
|
340
|
-
jsonContents: f.value,
|
|
341
|
-
onContentChange: M,
|
|
342
|
-
key: y.value
|
|
343
|
-
}, null, 8, ["content", "jsonContents"]))
|
|
344
|
-
])) : $("", !0)
|
|
345
|
-
]);
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
}, Ke = /* @__PURE__ */ q(Fe, [["__scopeId", "data-v-876d48c6"]]);
|
|
349
|
-
export {
|
|
350
|
-
Ke as default
|
|
351
|
-
};
|
package/dist/index-P-XWFKEv.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue");;/* empty css */const r=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");require("vue-router");require("./array-D8U2pGTC.cjs");require("./index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-CoTrTiyZ.cjs");require("./index.vue_vue_type_style_index_0_scoped_876d48c6_lang-BufoMCSS.cjs");const o={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},setup(u){return e.ref(!1),(c,i)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(t)}}},n=r._export_sfc(o,[["__scopeId","data-v-c06bb5c0"]]);exports.default=n;
|
package/dist/index-bTbhSpJ8.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-Bk6z8NoT.cjs"),D=require("./array-D8U2pGTC.cjs"),J=require("./modelComp-DAsVXKA0.cjs"),A=require("./menu-B_Az9K_F.cjs"),U=require("./index-CPAniSJJ.cjs"),G=require("./index.vue_vue_type_style_index_0_scoped_876d48c6_lang-BufoMCSS.cjs"),R=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),b=require("./cloneDeep-8zu2YtRV.cjs"),L={class:"bread-content"},H=["onClick"],K={key:0},W={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(y,{emit:_}){const n=y,d=e.ref([]),i=_;e.onMounted(()=>{d.value=n==null?void 0:n.breadArray});const m=g=>{i("click",g)};return(g,h)=>(e.openBlock(),e.createElementBlock("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(f,v)=>(e.openBlock(),e.createElementBlock("div",{key:v,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:E=>m(f)},e.toDisplayString(f.value),9,H),v!==d.value.length-1?(e.openBlock(),e.createElementBlock("div",K,e.toDisplayString("/"))):e.createCommentVNode("",!0)]))),128))]))}},Y=R._export_sfc(W,[["__scopeId","data-v-d55d3ede"]]);function z(y){const _=[],n={"(":")","{":"}","[":"]"};for(let d=0;d<y.length;d++){const i=y[d];if(n[i])_.push(i);else if(Object.values(n).includes(i)){const m=_.pop();if(console.log("stack",_,m,n[m]),n[m]!==i)return!1}}return _.length===0}function Q(y){var d,i,m,g;const _=(i=(d=y[0])==null?void 0:d.compData)==null?void 0:i.filter(h=>h.key!=="formContent"),n=(g=(m=y[0])==null?void 0:m.compData)==null?void 0:g.filter(h=>h.key==="formContent");console.log("handleFormModel:",_,n,y)}const X={class:"system-wrap"},Z={key:0,class:"show-content"},ee={key:0,class:"item-menu-content"},te={key:0,class:"item-view-group"},ne={__name:"index",props:{content:String,jsonContents:Array},emits:["change","contentChange"],setup(y,{emit:_}){const n=y,d=_,i=J.useModelComp(D.pinia);D.useFormToTableComp(D.pinia);const m=e.ref(!0),g=A.useMenuState(),h=e.ref(!0),{itemData:f}=A.storeToRefs(i),v=D.useUnit(D.pinia),{activeMenuPath:E,activeMenuOpenPaths:P,menuTriggerType:w,menus:V}=A.storeToRefs(g),{selectIndex:I,selectTitle:S}=A.storeToRefs(v),N=e.ref([]),k=e.ref([]),j=t=>{var a,l,o;const c=(a=f.value)==null?void 0:a.find(r=>r.name===E.value);k.value=(o=(l=c==null?void 0:c.compData)==null?void 0:l[0])==null?void 0:o.contents,h.value=!0,h.value&&(h.value=!1),d("change",{wholeValue:N.value,editValue:t})},F=t=>{var C,p,x;const c=b.cloneDeep(N.value),a=c==null?void 0:c.map((s,B)=>(B===(t==null?void 0:t.index)&&(s.compData=t==null?void 0:t.contents),s));let l="";(p=(C=b.cloneDeep(a))==null?void 0:C.filter(s=>(s==null?void 0:s.comp)==="Form"))==null||p.forEach(s=>{var B;(B=s==null?void 0:s.compData)==null||B.forEach(M=>{var T;(M==null?void 0:M.key)==="formContent"&&((T=M==null?void 0:M.contents)==null||T.forEach($=>{$.value!==""&&(l=l===""?$==null?void 0:$.value:l+"-"+($==null?void 0:$.value))}))})});let o=S==null?void 0:S.value;(o==null?void 0:o.length)>0?o[0]={key:"main",value:l}:(Array.isArray(o)||(o=[]),o.push({key:"main",value:l})),v.setSelectTitle(o),m.value=!1,N.value=a;const r=(x=f.value)==null?void 0:x.map((s,B)=>{var M;return s.name===E.value&&(s.compData=(M=s.compData)==null?void 0:M.map(T=>((T==null?void 0:T.key)==="groupContents"&&(T.contents=N.value),T))),s});i.setItemData(r),h.value&&(h.value=!1),d("contentChange",{wholeContent:f.value})},q=t=>{var c,a;if((t==null?void 0:t.key)==="main")v.setSelectIndex(""),v.setSelectMenu(""),v.setSelectTitle((c=S.value)==null?void 0:c[0]);else{const l=[];let o=-1;(a=S.value)==null||a.forEach((r,C)=>{(r==null?void 0:r.key)===(t==null?void 0:t.key)&&(o=C),(o===-1||o>=C)&&l.push(r)}),v.setSelectTitle(l),v.setSelectMenu(t==null?void 0:t.key)}};e.watch(()=>f.value,()=>{var c,a,l,o,r,C,p,x;if(!f.value||((c=f.value)==null?void 0:c.length)===0||!m.value)return;let t=null;if(!E.value)t=(l=(a=b.cloneDeep(f.value))==null?void 0:a.filter(s=>(s==null?void 0:s.comp)==="Group"))==null?void 0:l[0],g.setActiveMenuPath(t==null?void 0:t.name);else{const s=(o=b.cloneDeep(f.value))==null?void 0:o.filter(B=>(B==null?void 0:B.comp)==="Group");t=s==null?void 0:s.find(B=>B.name===E.value)}k.value=(C=(r=t==null?void 0:t.compData)==null?void 0:r[0])==null?void 0:C.contents,N.value=(x=(p=t==null?void 0:t.compData)==null?void 0:p[0])==null?void 0:x.contents,console.log("itemData监听",t,E.value,f.value)},{deep:!0,immediate:!0}),e.watch(()=>E.value,t=>{var c,a,l,o,r,C;if(t){const p=(c=b.cloneDeep(f.value))==null?void 0:c.find(x=>x.name===t);if(t&&p){k.value=(l=(a=p==null?void 0:p.compData)==null?void 0:a[0])==null?void 0:l.contents,N.value=(r=(o=p==null?void 0:p.compData)==null?void 0:o[0])==null?void 0:r.contents,console.log("点击-新-data:",t,k.value);const x=(C=k.value)==null?void 0:C.filter(s=>s.comp==="Form");Q(x)}else k.value=[],N.value=[];v.setSelectTitle([]),v.setSelectIndex(""),v.setSelectMenu("")}},{immediate:!0}),e.watch(()=>[n==null?void 0:n.content,n==null?void 0:n.jsonContents],()=>{var l;if(((l=n==null?void 0:n.jsonContents)==null?void 0:l.length)>0){i.setOriginalData(n==null?void 0:n.jsonContents),i.setItemData(n==null?void 0:n.jsonContents);return}if(!(n!=null&&n.content)||(n==null?void 0:n.content)==="")return;m.value=!0;let t;D.isExpandStringToJson(n==null?void 0:n.content)?t=D.expandStringToJson(n==null?void 0:n.content):t=G.expandNewStringToJson(n==null?void 0:n.content);const c=Array.isArray(t)&&(t==null?void 0:t.find(o=>{var r;return((r=o.comp)==null?void 0:r.toUpperCase())==="MENU"}));g.setRawMenu(c??{});const a=Array.isArray(t)&&(t==null?void 0:t.find(o=>{var r;return((r=o.comp)==null?void 0:r.toUpperCase())==="SYSTEM"}));g.setSystemKey((a==null?void 0:a.name)??""),i.setOriginalData(t),i.setItemData(t)},{deep:!0,immediate:!0});const u=t=>D.getComponent(t);return(t,c)=>{var a,l;return e.openBlock(),e.createElementBlock("div",X,[e.createVNode(U.default,{class:"sys-aside"}),((a=k.value)==null?void 0:a.length)>0?(e.openBlock(),e.createElementBlock("div",Z,[((l=e.unref(S))==null?void 0:l.length)>1?(e.openBlock(),e.createElementBlock("div",ee,[(e.openBlock(),e.createBlock(Y,{key:e.unref(S),breadArray:e.unref(S),onClick:q},null,8,["breadArray"]))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:r},[e.unref(I)===""||r.toString()===e.unref(I)?(e.openBlock(),e.createElementBlock("div",te,e.toDisplayString(o.name),1)):e.createCommentVNode("",!0),e.unref(I)===""||r.toString()===e.unref(I)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u(o.comp)),{itemData:o==null?void 0:o.compData,childItemData:o==null?void 0:o.itemChildData,key:r,onChange:j,index:r,onContentChange:F},null,40,["itemData","childItemData","index"])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0)])}}},oe=R._export_sfc(ne,[["__scopeId","data-v-38117cb6"]]),ae={class:"add-model-content"},le={key:0,class:"model-import-data"},ce={class:"import-button"},re={key:0},se={key:1,class:"model-operate"},ue={class:"model-select"},ie={class:"model-fill"},de={key:2,class:"model-view"},me={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change","contentChange"],setup(y,{emit:_}){const n=y,d=_,i=e.ref(""),m=e.ref([]),g=e.ref(0),h=J.useModelComp(D.pinia),f=A.useMenuState(D.pinia),{itemData:v,originalData:E}=A.storeToRefs(h),{activeMenuPath:P}=A.storeToRefs(f),w=e.ref(null),V=e.ref(0),I=e.ref(""),S=u=>{d("contentChange",u)},N=u=>{var c;const t=(c=b.cloneDeep(u==null?void 0:u.wholeValue))==null?void 0:c.map(a=>{var l;return(a==null?void 0:a.comp)==="Form"&&(a.compData=(l=a.compData)==null?void 0:l.map(o=>((o==null?void 0:o.key)==="formContent"&&(o.contents=D.arrayToNumberArray(o==null?void 0:o.contents)),o))),a});d("change",{originalContents:E.value,currentContents:u==null?void 0:u.wholeValue,editContent:u==null?void 0:u.editValue,arrayToContents:t})},k=e.ref([]),j=()=>{w.value.click()},F=u=>{const t=u.target.files[0];if(!t)return;const c=new FileReader;c.onload=a=>{try{i.value=a.target.result;const l=z(a.target.result);console.log("handleFileChange-isValid",l),k.value=q(a.target.result),V.value++}catch(l){console.error("解析失败:",l)}},c.onerror=a=>{console.error("文件读取错误:",a)},c.readAsText(t)};e.watch(()=>[n==null?void 0:n.content,n==null?void 0:n.jsonContents],()=>{i.value=n==null?void 0:n.content,m.value=n==null?void 0:n.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>V.value,()=>{var u;((u=k.value)==null?void 0:u.length)!==0&&(h.setOriginalData(k.value),h.setItemData(k.value))},{deep:!0,immediate:!0});const q=u=>{let t=u.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");t=t.replace(/(\w+)\s*:/g,"$1:"),t=t.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),t=t.replace(/,\s*([}\]])/g,"$1"),t=t.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(t)}catch(c){try{const l=new Function(`return ${t}`)();if(Array.isArray(l)||typeof l=="object")return l;throw new Error(`解析结果不是有效的数组或对象: ${c}`)}catch(a){throw new Error(`无法解析JSON: ${a.message}`)}}};return(u,t)=>{var c;return e.openBlock(),e.createElementBlock("div",ae,[((c=n==null?void 0:n.jsonContents)==null?void 0:c.length)===0&&(n!=null&&n.showButton)?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",ce,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:F,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:j,class:"import-button-content"},"导入文件"),I.value?(e.openBlock(),e.createElementBlock("span",re,e.toDisplayString(I.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(n==null?void 0:n.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",ue,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:g.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",ie,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(n==null?void 0:n.mode)==="view"?(e.openBlock(),e.createElementBlock("div",de,[(e.openBlock(),e.createBlock(oe,{content:i.value,onChange:N,jsonContents:m.value,onContentChange:S,key:g.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},fe=R._export_sfc(me,[["__scopeId","data-v-876d48c6"]]);exports.default=fe;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";const C=require("./array-D8U2pGTC.cjs"),R=require("vue"),l=require("./cloneDeep-8zu2YtRV.cjs"),w=R.ref(0),X=e=>{let c;e.includes(`\r
|
|
2
|
-
`)?c=e.split(`\r
|
|
3
|
-
`).filter(t=>t.trim()!==""):c=e.split(`
|
|
4
|
-
`).filter(t=>t.trim()!=="");const p=[];let r="";for(const t of c)t.includes("{")||r.includes("{")||t.includes("[")||r.includes("[")||t.includes("【")||r.includes("【")||t.includes("(")||r.includes("(")||t.includes("(")||r.includes("(")||t.includes("/*")||r.includes("/*")?(r+=t.trim(),l.cloneDeep(r).split("{").length-1===l.cloneDeep(r).split("}").length-1&&l.cloneDeep(r).split("【").length-1===l.cloneDeep(r).split("】").length-1&&l.cloneDeep(r).split("[").length-1===l.cloneDeep(r).split("]").length-1&&l.cloneDeep(r).split("(").length-1===l.cloneDeep(r).split(")").length-1&&l.cloneDeep(r).split("(").length-1===l.cloneDeep(r).split(")").length-1&&l.cloneDeep(r).split("/*").length-1===l.cloneDeep(r).split("*/").length-1&&(p.push(r),r="")):p.push(t.trim());return p},Y=e=>{const[c,p]=e.split(/=(.+)/),r=c.replace(/['"]/g,"").trim(),t=p.replace(/^['"]|['"]$/g,"");return{key:r,value:t}},G=e=>{try{return JSON.parse(e),!0}catch{return!1}},K=e=>{try{const c=e.replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",").replace(/:/g,":").replace(/:\s*(?=,|}|$)/g,': ""');if(l.cloneDeep(c).split("{").length-1>1){let p=l.cloneDeep(c).replace(/^\{(.*)\}$/,"[$1]");if(G(p)&&!p.includes("$")||(p=p.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g,'"$1$$$2"')),G(p)){const r=JSON.parse(p);let t=[];return r==null||r.forEach(u=>{var f;(f=Object.entries(l.cloneDeep(u)))==null||f.forEach(i=>{w.value++,t.push({id:w.value,key:(i==null?void 0:i[0])??"",value:(i==null?void 0:i[1])===""?"":i==null?void 0:i[1],width:Object.keys(l.cloneDeep(u)).length})})}),t}else return console.error("转换类型不正确:"),[]}else if(G(c)){const p=JSON.parse(c);return Object.entries(p).map(([r,t])=>(w.value++,{id:w.value,key:r,value:t===""?"":t,width:1}))}else return c}catch(c){return console.error("转换失败:",c),[]}},Z=(e,c)=>{var p;try{if((p=C.viewMainDict)!=null&&p.find(r=>(r==null?void 0:r.key)===c))return e.replace(/['"]/g,"").trim();if(l.cloneDeep(e).split("[").length-1>1){const r=l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(r)}else{const r=l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",");if(G(r)){const t=JSON.parse(r);return Array.isArray(t)?t.map(u=>({label:u})):t}else return K(l.cloneDeep(e))}}catch(r){return console.error("解析失败:",r),e}},_=e=>({[e==null?void 0:e.key]:Z(e==null?void 0:e.value,e==null?void 0:e.key)}),S=e=>{try{if(l.cloneDeep(e).split("[").length-1>1){const c=l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replaceAll(/,/g,",").replaceAll("(","[").replaceAll(")","]").replaceAll("],]","]]");return JSON.parse(c)}else return JSON.parse(l.cloneDeep(e).replace(/[’]|[‘]|[']/g,'"').replace(/,/g,",")).map(p=>({label:p}))}catch(c){return console.error("解析失败:",c),e}},v=e=>{const c=e.match(/\(([^)]+)\)/);return c?c[1]:""},ee=e=>{const c=e.match(/^([^(]+)\s*\(/);return c?c[1].trim():e},B=e=>e.replace(/'/g,"").replace(/"/g,"").replace(/{|}/g,"").split(":").map(c=>c.trim()).filter(c=>c).join("/"),re=e=>{var f,i;let c=[],p=[];const r=(f=l.cloneDeep(e))==null?void 0:f.map(d=>d==null?void 0:d.key),t=[...new Set((i=l.cloneDeep(r))==null?void 0:i.map(d=>v(d)))];t==null||t.forEach(d=>{let A=e==null?void 0:e.filter(o=>o.key.includes(d));A==null||A.forEach(o=>{o!=null&&o.key.includes("Menus")&&(c.push({key:"GroupName",value:B(o==null?void 0:o.value)}),p.push(B(o==null?void 0:o.value)))});let U=e==null?void 0:e.filter(o=>o.key.includes(d)&&!(o!=null&&o.key.includes("Menus")));U=U==null?void 0:U.map(o=>(o.key=ee(o.key),o));const x={key:"GroupContents",value:U};c.push(x)});const u={key:"Menus",value:p};return c.unshift(u),c},Q=e=>{var c,p;if(Array.isArray(Object.keys(e))&&((c=Object.keys(e))==null?void 0:c.length)>0){let r=[];return(p=Object.entries(e))==null||p.forEach(([t,u])=>{var i,d;let f=[];if(f.push(t),((i=Object.keys(u))==null?void 0:i.length)>0){let A=[];A.push((d=Q(u))==null?void 0:d[0]),f.push(A==null?void 0:A[0])}r.push(f)}),r}},te=(e,c)=>{var r;let p=c;return Array.isArray(Object.keys(e))&&((r=Object.entries(e))==null||r.forEach(([t,u])=>{let f=[t];if(typeof u=="object"&&u!==null){let i=Q(u);i==null||i.forEach(d=>{f.push(d)})}p.push(f)})),p},ce=e=>{const c={};return e.forEach(r=>{const t=r.split("/");let u=c;t.forEach(f=>{u[f]||(u[f]={}),u=u[f]})}),te(c,[])},se=e=>ce(e),le=e=>{var f,i,d,A,U,x,o;const c=X((i=(f=l.cloneDeep(e))==null?void 0:f.replace("(","("))==null?void 0:i.replace(")",")")),p=(A=(d=l.cloneDeep(c))==null?void 0:d.filter(s=>!s.includes("/*")))==null?void 0:A.map(s=>Y(s)),r=re(p),t=[];(U=l.cloneDeep(r))==null||U.forEach(s=>{var $,n,a,g,k,E,J,M,N;($=C.viewMainDict)!=null&&$.find(y=>{var D,m;return((D=y==null?void 0:y.key)==null?void 0:D.toUpperCase())===((m=s==null?void 0:s.key)==null?void 0:m.toUpperCase())})?t.push({comp:((a=(n=C.viewMainDict)==null?void 0:n.find(y=>{var D,m;return((D=y==null?void 0:y.key)==null?void 0:D.toUpperCase())===((m=s==null?void 0:s.key)==null?void 0:m.toUpperCase())}))==null?void 0:a.value)??"",name:(g=s==null?void 0:s.value)==null?void 0:g.replace(/[’]|[‘]|[']/g,""),compData:[]}):(k=C.viewChildDict)!=null&&k.find(y=>{var D,m;return((D=y==null?void 0:y.key)==null?void 0:D.toUpperCase())===((m=s==null?void 0:s.key)==null?void 0:m.toUpperCase())})&&((t==null?void 0:t.length)===0&&(E=s.key)!=null&&E.includes("Menus")&&t.push({comp:"Menu",name:"",compData:[]}),(J=t==null?void 0:t[(t==null?void 0:t.length)-1])!=null&&J.compData&&t[(t==null?void 0:t.length)-1].compData.push({key:(N=(M=C.viewChildDict)==null?void 0:M.find(y=>{var D,m;return((D=y==null?void 0:y.key)==null?void 0:D.toUpperCase())===((m=s==null?void 0:s.key)==null?void 0:m.toUpperCase())}))==null?void 0:N.value,contents:s==null?void 0:s.value}))});let u=(x=l.cloneDeep(t))==null?void 0:x.map(s=>{var $;return s!=null&&s.compData&&(s.compData=($=s==null?void 0:s.compData)==null?void 0:$.map(n=>{var a,g,k,E,J,M,N,y,D,m,T;if((n==null?void 0:n.key)==="formFlex")n.contents=((g=(a=n.contents)==null?void 0:a.replace(/[’]|[‘]|[']/g,""))==null?void 0:g.toUpperCase())!=="Vertical".toUpperCase();else if((n==null?void 0:n.key)==="groupContents")n.contents=(k=l.cloneDeep(n.contents))==null?void 0:k.map(P=>_(l.cloneDeep(P)));else if(Array.isArray(n==null?void 0:n.contents))n.contents=se(n.contents);else if(((J=(E=n==null?void 0:n.contents)==null?void 0:E.trim())!=null&&J.startsWith("[")||(N=(M=n.contents)==null?void 0:M.trim())!=null&&N.startsWith("【"))&&((D=(y=n.contents)==null?void 0:y.trim())!=null&&D.endsWith("]")||(T=(m=n.contents)==null?void 0:m.trim())!=null&&T.endsWith("】")))n.contents=S(l.cloneDeep(n.contents));else{if(!n.contents)return;n.contents=K(l.cloneDeep(n.contents))}return n})),s});return u=(o=l.cloneDeep(u))==null?void 0:o.map(s=>{var $;return(s==null?void 0:s.comp)==="Group"&&(s.compData=($=s.compData)==null?void 0:$.map(n=>{var g;let a=[];return(g=n.contents)==null||g.forEach(k=>{var E,J,M,N,y,D,m,T,P,L,V,W,q,I,F,H,z;if((E=C.viewMainDict)!=null&&E.find(h=>{var b,O,j;return((b=h==null?void 0:h.key)==null?void 0:b.toUpperCase())===((j=(O=Object.keys(k))==null?void 0:O[0])==null?void 0:j.toUpperCase())}))a.push({comp:(M=(J=C.viewMainDict)==null?void 0:J.find(h=>{var b,O,j;return((b=h==null?void 0:h.key)==null?void 0:b.toUpperCase())===((j=(O=Object.keys(k))==null?void 0:O[0])==null?void 0:j.toUpperCase())}))==null?void 0:M.value,name:(y=(N=Object.values(k))==null?void 0:N[0])==null?void 0:y.replace(/[’]|[‘]|[']/g,""),compData:[]});else if((D=C.viewChildDict)!=null&&D.find(h=>{var b,O,j;return((b=h==null?void 0:h.key)==null?void 0:b.toUpperCase())===((j=(O=Object.keys(k))==null?void 0:O[0])==null?void 0:j.toUpperCase())})){if((a==null?void 0:a.length)===0)return;(m=a==null?void 0:a[(a==null?void 0:a.length)-1])!=null&&m.compData&&a[(a==null?void 0:a.length)-1].compData.push({key:(P=(T=C.viewChildDict)==null?void 0:T.find(h=>{var b,O,j;return((b=h==null?void 0:h.key)==null?void 0:b.toUpperCase())===((j=(O=Object.keys(k))==null?void 0:O[0])==null?void 0:j.toUpperCase())}))==null?void 0:P.value,contents:(L=Object.values(k))==null?void 0:L[0]})}else if((W=(V=Object.keys(k))==null?void 0:V[0])!=null&&W.includes("$")){const h=(I=(q=Object.keys(l.cloneDeep(k)))==null?void 0:q[0])==null?void 0:I.split("$");a[(a==null?void 0:a.length)-1].compData.push({key:(H=(F=C.viewChildDict)==null?void 0:F.find(b=>{var O,j;return((O=b==null?void 0:b.key)==null?void 0:O.toUpperCase())===((j=h==null?void 0:h[0])==null?void 0:j.toUpperCase())}))==null?void 0:H.value,contents:(z=Object.values(k))==null?void 0:z[0],selectLabel:h==null?void 0:h[1]})}return k}),n.contents=a,n})),s}),u};exports.expandNewStringToJson=le;
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { v as M, c as x } from "./array-D2zrIzej.js";
|
|
2
|
-
import { ref as Y } from "vue";
|
|
3
|
-
import { c as l } from "./cloneDeep-DuEirD61.js";
|
|
4
|
-
const L = Y(0), Z = (e) => {
|
|
5
|
-
let s;
|
|
6
|
-
e.includes(`\r
|
|
7
|
-
`) ? s = e.split(`\r
|
|
8
|
-
`).filter((t) => t.trim() !== "") : s = e.split(`
|
|
9
|
-
`).filter((t) => t.trim() !== "");
|
|
10
|
-
const p = [];
|
|
11
|
-
let r = "";
|
|
12
|
-
for (const t of s)
|
|
13
|
-
t.includes("{") || r.includes("{") || t.includes("[") || r.includes("[") || t.includes("【") || r.includes("【") || t.includes("(") || r.includes("(") || t.includes("(") || r.includes("(") || t.includes("/*") || r.includes("/*") ? (r += t.trim(), l(r).split("{").length - 1 === l(r).split("}").length - 1 && l(r).split("【").length - 1 === l(r).split("】").length - 1 && l(r).split("[").length - 1 === l(r).split("]").length - 1 && l(r).split("(").length - 1 === l(r).split(")").length - 1 && l(r).split("(").length - 1 === l(r).split(")").length - 1 && l(r).split("/*").length - 1 === l(r).split("*/").length - 1 && (p.push(r), r = "")) : p.push(t.trim());
|
|
14
|
-
return p;
|
|
15
|
-
}, _ = (e) => {
|
|
16
|
-
const [s, p] = e.split(/=(.+)/), r = s.replace(/['"]/g, "").trim(), t = p.replace(/^['"]|['"]$/g, "");
|
|
17
|
-
return { key: r, value: t };
|
|
18
|
-
}, V = (e) => {
|
|
19
|
-
try {
|
|
20
|
-
return JSON.parse(e), !0;
|
|
21
|
-
} catch {
|
|
22
|
-
return !1;
|
|
23
|
-
}
|
|
24
|
-
}, R = (e) => {
|
|
25
|
-
try {
|
|
26
|
-
const s = e.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
27
|
-
if (l(s).split("{").length - 1 > 1) {
|
|
28
|
-
let p = l(s).replace(/^\{(.*)\}$/, "[$1]");
|
|
29
|
-
if (V(p) && !p.includes("$") || (p = p.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), V(p)) {
|
|
30
|
-
const r = JSON.parse(p);
|
|
31
|
-
let t = [];
|
|
32
|
-
return r == null || r.forEach((o) => {
|
|
33
|
-
var y;
|
|
34
|
-
(y = Object.entries(l(o))) == null || y.forEach((i) => {
|
|
35
|
-
L.value++, t.push({
|
|
36
|
-
id: L.value,
|
|
37
|
-
key: (i == null ? void 0 : i[0]) ?? "",
|
|
38
|
-
value: (i == null ? void 0 : i[1]) === "" ? "" : i == null ? void 0 : i[1],
|
|
39
|
-
// 如果值为空,则key设为空字符串,否则保留原值
|
|
40
|
-
width: Object.keys(l(o)).length
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
}), t;
|
|
44
|
-
} else
|
|
45
|
-
return console.error("转换类型不正确:"), [];
|
|
46
|
-
} else if (V(s)) {
|
|
47
|
-
const p = JSON.parse(s);
|
|
48
|
-
return Object.entries(p).map(([r, t]) => (L.value++, {
|
|
49
|
-
id: L.value,
|
|
50
|
-
key: r,
|
|
51
|
-
value: t === "" ? "" : t,
|
|
52
|
-
// 如果值为空,则key设为空字符串,否则保留原值
|
|
53
|
-
width: 1
|
|
54
|
-
}));
|
|
55
|
-
} else
|
|
56
|
-
return s;
|
|
57
|
-
} catch (s) {
|
|
58
|
-
return console.error("转换失败:", s), [];
|
|
59
|
-
}
|
|
60
|
-
}, w = (e, s) => {
|
|
61
|
-
var p;
|
|
62
|
-
try {
|
|
63
|
-
if ((p = M) != null && p.find((r) => (r == null ? void 0 : r.key) === s))
|
|
64
|
-
return e.replace(/['"]/g, "").trim();
|
|
65
|
-
if (l(e).split("[").length - 1 > 1) {
|
|
66
|
-
const r = l(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
67
|
-
return JSON.parse(r);
|
|
68
|
-
} else {
|
|
69
|
-
const r = l(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
70
|
-
if (V(r)) {
|
|
71
|
-
const t = JSON.parse(r);
|
|
72
|
-
return Array.isArray(t) ? t.map((o) => ({ label: o })) : t;
|
|
73
|
-
} else
|
|
74
|
-
return R(l(e));
|
|
75
|
-
}
|
|
76
|
-
} catch (r) {
|
|
77
|
-
return console.error("解析失败:", r), e;
|
|
78
|
-
}
|
|
79
|
-
}, S = (e) => ({ [e == null ? void 0 : e.key]: w(e == null ? void 0 : e.value, e == null ? void 0 : e.key) }), v = (e) => {
|
|
80
|
-
try {
|
|
81
|
-
if (l(e).split("[").length - 1 > 1) {
|
|
82
|
-
const s = l(e).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
83
|
-
return JSON.parse(s);
|
|
84
|
-
} else
|
|
85
|
-
return JSON.parse(l(e).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((p) => ({ label: p }));
|
|
86
|
-
} catch (s) {
|
|
87
|
-
return console.error("解析失败:", s), e;
|
|
88
|
-
}
|
|
89
|
-
}, ee = (e) => {
|
|
90
|
-
const s = e.match(/\(([^)]+)\)/);
|
|
91
|
-
return s ? s[1] : "";
|
|
92
|
-
}, re = (e) => {
|
|
93
|
-
const s = e.match(/^([^(]+)\s*\(/);
|
|
94
|
-
return s ? s[1].trim() : e;
|
|
95
|
-
}, Q = (e) => e.replace(/'/g, "").replace(/"/g, "").replace(/{|}/g, "").split(":").map((s) => s.trim()).filter((s) => s).join("/"), te = (e) => {
|
|
96
|
-
var y, i;
|
|
97
|
-
let s = [], p = [];
|
|
98
|
-
const r = (y = l(e)) == null ? void 0 : y.map((d) => d == null ? void 0 : d.key), t = [...new Set((i = l(r)) == null ? void 0 : i.map((d) => ee(d)))];
|
|
99
|
-
t == null || t.forEach((d) => {
|
|
100
|
-
let U = e == null ? void 0 : e.filter((u) => u.key.includes(d));
|
|
101
|
-
U == null || U.forEach((u) => {
|
|
102
|
-
u != null && u.key.includes("Menus") && (s.push({
|
|
103
|
-
key: "GroupName",
|
|
104
|
-
value: Q(u == null ? void 0 : u.value)
|
|
105
|
-
}), p.push(Q(u == null ? void 0 : u.value)));
|
|
106
|
-
});
|
|
107
|
-
let C = e == null ? void 0 : e.filter((u) => u.key.includes(d) && !(u != null && u.key.includes("Menus")));
|
|
108
|
-
C = C == null ? void 0 : C.map((u) => (u.key = re(u.key), u));
|
|
109
|
-
const P = {
|
|
110
|
-
key: "GroupContents",
|
|
111
|
-
value: C
|
|
112
|
-
};
|
|
113
|
-
s.push(P);
|
|
114
|
-
});
|
|
115
|
-
const o = {
|
|
116
|
-
key: "Menus",
|
|
117
|
-
value: p
|
|
118
|
-
};
|
|
119
|
-
return s.unshift(o), s;
|
|
120
|
-
}, X = (e) => {
|
|
121
|
-
var s, p;
|
|
122
|
-
if (Array.isArray(Object.keys(e)) && ((s = Object.keys(e)) == null ? void 0 : s.length) > 0) {
|
|
123
|
-
let r = [];
|
|
124
|
-
return (p = Object.entries(e)) == null || p.forEach(([t, o]) => {
|
|
125
|
-
var i, d;
|
|
126
|
-
let y = [];
|
|
127
|
-
if (y.push(t), ((i = Object.keys(o)) == null ? void 0 : i.length) > 0) {
|
|
128
|
-
let U = [];
|
|
129
|
-
U.push((d = X(o)) == null ? void 0 : d[0]), y.push(U == null ? void 0 : U[0]);
|
|
130
|
-
}
|
|
131
|
-
r.push(y);
|
|
132
|
-
}), r;
|
|
133
|
-
}
|
|
134
|
-
}, se = (e, s) => {
|
|
135
|
-
var r;
|
|
136
|
-
let p = s;
|
|
137
|
-
return Array.isArray(Object.keys(e)) && ((r = Object.entries(e)) == null || r.forEach(([t, o]) => {
|
|
138
|
-
let y = [t];
|
|
139
|
-
if (typeof o == "object" && o !== null) {
|
|
140
|
-
let i = X(o);
|
|
141
|
-
i == null || i.forEach((d) => {
|
|
142
|
-
y.push(d);
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
p.push(y);
|
|
146
|
-
})), p;
|
|
147
|
-
}, ce = (e) => {
|
|
148
|
-
const s = {};
|
|
149
|
-
return e.forEach((r) => {
|
|
150
|
-
const t = r.split("/");
|
|
151
|
-
let o = s;
|
|
152
|
-
t.forEach((y) => {
|
|
153
|
-
o[y] || (o[y] = {}), o = o[y];
|
|
154
|
-
});
|
|
155
|
-
}), se(s, []);
|
|
156
|
-
}, le = (e) => ce(e), ue = (e) => {
|
|
157
|
-
var y, i, d, U, C, P, u;
|
|
158
|
-
const s = Z((i = (y = l(e)) == null ? void 0 : y.replace("(", "(")) == null ? void 0 : i.replace(")", ")")), p = (U = (d = l(s)) == null ? void 0 : d.filter((c) => !c.includes("/*"))) == null ? void 0 : U.map((c) => _(c)), r = te(p), t = [];
|
|
159
|
-
(C = l(r)) == null || C.forEach((c) => {
|
|
160
|
-
var D, n, a, $, b, E, g, J, N;
|
|
161
|
-
(D = M) != null && D.find((h) => {
|
|
162
|
-
var m, k;
|
|
163
|
-
return ((m = h == null ? void 0 : h.key) == null ? void 0 : m.toUpperCase()) === ((k = c == null ? void 0 : c.key) == null ? void 0 : k.toUpperCase());
|
|
164
|
-
}) ? t.push({
|
|
165
|
-
comp: ((a = (n = M) == null ? void 0 : n.find((h) => {
|
|
166
|
-
var m, k;
|
|
167
|
-
return ((m = h == null ? void 0 : h.key) == null ? void 0 : m.toUpperCase()) === ((k = c == null ? void 0 : c.key) == null ? void 0 : k.toUpperCase());
|
|
168
|
-
})) == null ? void 0 : a.value) ?? "",
|
|
169
|
-
name: ($ = c == null ? void 0 : c.value) == null ? void 0 : $.replace(/[’]|[‘]|[']/g, ""),
|
|
170
|
-
compData: []
|
|
171
|
-
}) : (b = x) != null && b.find((h) => {
|
|
172
|
-
var m, k;
|
|
173
|
-
return ((m = h == null ? void 0 : h.key) == null ? void 0 : m.toUpperCase()) === ((k = c == null ? void 0 : c.key) == null ? void 0 : k.toUpperCase());
|
|
174
|
-
}) && ((t == null ? void 0 : t.length) === 0 && (E = c.key) != null && E.includes("Menus") && t.push({
|
|
175
|
-
comp: "Menu",
|
|
176
|
-
name: "",
|
|
177
|
-
compData: []
|
|
178
|
-
}), (g = t == null ? void 0 : t[(t == null ? void 0 : t.length) - 1]) != null && g.compData && t[(t == null ? void 0 : t.length) - 1].compData.push({
|
|
179
|
-
key: (N = (J = x) == null ? void 0 : J.find((h) => {
|
|
180
|
-
var m, k;
|
|
181
|
-
return ((m = h == null ? void 0 : h.key) == null ? void 0 : m.toUpperCase()) === ((k = c == null ? void 0 : c.key) == null ? void 0 : k.toUpperCase());
|
|
182
|
-
})) == null ? void 0 : N.value,
|
|
183
|
-
contents: c == null ? void 0 : c.value
|
|
184
|
-
}));
|
|
185
|
-
});
|
|
186
|
-
let o = (P = l(t)) == null ? void 0 : P.map((c) => {
|
|
187
|
-
var D;
|
|
188
|
-
return c != null && c.compData && (c.compData = (D = c == null ? void 0 : c.compData) == null ? void 0 : D.map((n) => {
|
|
189
|
-
var a, $, b, E, g, J, N, h, m, k, T;
|
|
190
|
-
if ((n == null ? void 0 : n.key) === "formFlex")
|
|
191
|
-
n.contents = (($ = (a = n.contents) == null ? void 0 : a.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : $.toUpperCase()) !== "Vertical".toUpperCase();
|
|
192
|
-
else if ((n == null ? void 0 : n.key) === "groupContents")
|
|
193
|
-
n.contents = (b = l(n.contents)) == null ? void 0 : b.map((G) => S(l(G)));
|
|
194
|
-
else if (Array.isArray(n == null ? void 0 : n.contents))
|
|
195
|
-
n.contents = le(n.contents);
|
|
196
|
-
else if (((g = (E = n == null ? void 0 : n.contents) == null ? void 0 : E.trim()) != null && g.startsWith("[") || (N = (J = n.contents) == null ? void 0 : J.trim()) != null && N.startsWith("【")) && ((m = (h = n.contents) == null ? void 0 : h.trim()) != null && m.endsWith("]") || (T = (k = n.contents) == null ? void 0 : k.trim()) != null && T.endsWith("】")))
|
|
197
|
-
n.contents = v(l(n.contents));
|
|
198
|
-
else {
|
|
199
|
-
if (!n.contents) return;
|
|
200
|
-
n.contents = R(l(n.contents));
|
|
201
|
-
}
|
|
202
|
-
return n;
|
|
203
|
-
})), c;
|
|
204
|
-
});
|
|
205
|
-
return o = (u = l(o)) == null ? void 0 : u.map((c) => {
|
|
206
|
-
var D;
|
|
207
|
-
return (c == null ? void 0 : c.comp) === "Group" && (c.compData = (D = c.compData) == null ? void 0 : D.map((n) => {
|
|
208
|
-
var $;
|
|
209
|
-
let a = [];
|
|
210
|
-
return ($ = n.contents) == null || $.forEach((b) => {
|
|
211
|
-
var E, g, J, N, h, m, k, T, G, W, I, F, H, q, z, B, K;
|
|
212
|
-
if ((E = M) != null && E.find((f) => {
|
|
213
|
-
var O, j, A;
|
|
214
|
-
return ((O = f == null ? void 0 : f.key) == null ? void 0 : O.toUpperCase()) === ((A = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : A.toUpperCase());
|
|
215
|
-
}))
|
|
216
|
-
a.push({
|
|
217
|
-
comp: (J = (g = M) == null ? void 0 : g.find((f) => {
|
|
218
|
-
var O, j, A;
|
|
219
|
-
return ((O = f == null ? void 0 : f.key) == null ? void 0 : O.toUpperCase()) === ((A = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : A.toUpperCase());
|
|
220
|
-
})) == null ? void 0 : J.value,
|
|
221
|
-
name: (h = (N = Object.values(b)) == null ? void 0 : N[0]) == null ? void 0 : h.replace(/[’]|[‘]|[']/g, ""),
|
|
222
|
-
compData: []
|
|
223
|
-
});
|
|
224
|
-
else if ((m = x) != null && m.find((f) => {
|
|
225
|
-
var O, j, A;
|
|
226
|
-
return ((O = f == null ? void 0 : f.key) == null ? void 0 : O.toUpperCase()) === ((A = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : A.toUpperCase());
|
|
227
|
-
})) {
|
|
228
|
-
if ((a == null ? void 0 : a.length) === 0) return;
|
|
229
|
-
(k = a == null ? void 0 : a[(a == null ? void 0 : a.length) - 1]) != null && k.compData && a[(a == null ? void 0 : a.length) - 1].compData.push({
|
|
230
|
-
key: (G = (T = x) == null ? void 0 : T.find((f) => {
|
|
231
|
-
var O, j, A;
|
|
232
|
-
return ((O = f == null ? void 0 : f.key) == null ? void 0 : O.toUpperCase()) === ((A = (j = Object.keys(b)) == null ? void 0 : j[0]) == null ? void 0 : A.toUpperCase());
|
|
233
|
-
})) == null ? void 0 : G.value,
|
|
234
|
-
contents: (W = Object.values(b)) == null ? void 0 : W[0]
|
|
235
|
-
});
|
|
236
|
-
} else if ((F = (I = Object.keys(b)) == null ? void 0 : I[0]) != null && F.includes("$")) {
|
|
237
|
-
const f = (q = (H = Object.keys(l(b))) == null ? void 0 : H[0]) == null ? void 0 : q.split("$");
|
|
238
|
-
a[(a == null ? void 0 : a.length) - 1].compData.push({
|
|
239
|
-
key: (B = (z = x) == null ? void 0 : z.find((O) => {
|
|
240
|
-
var j, A;
|
|
241
|
-
return ((j = O == null ? void 0 : O.key) == null ? void 0 : j.toUpperCase()) === ((A = f == null ? void 0 : f[0]) == null ? void 0 : A.toUpperCase());
|
|
242
|
-
})) == null ? void 0 : B.value,
|
|
243
|
-
contents: (K = Object.values(b)) == null ? void 0 : K[0],
|
|
244
|
-
selectLabel: f == null ? void 0 : f[1]
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
return b;
|
|
248
|
-
}), n.contents = a, n;
|
|
249
|
-
})), c;
|
|
250
|
-
}), o;
|
|
251
|
-
};
|
|
252
|
-
export {
|
|
253
|
-
ue as e
|
|
254
|
-
};
|
package/dist/router.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("vue-router");const r=require("./index-DADq4uib.cjs");module.exports=r.router;
|