ss-component-new 1.1.86 → 1.1.88
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-CuefuJR6.js} +2 -2
- package/dist/{array-D8U2pGTC.cjs → array-DjZCFuX6.cjs} +1 -1
- package/dist/{cloneDeep-8zu2YtRV.cjs → cloneDeep-BViCcHX9.cjs} +1 -1
- package/dist/{cloneDeep-DuEirD61.js → cloneDeep-CZ1WcsqU.js} +1 -1
- package/dist/{index-BviuenkT.js → index-2vs5vHzf.js} +3 -3
- package/dist/index-B0NlRxsH.cjs +1 -0
- package/dist/{index-Bk6z8NoT.cjs → index-B29cRZmo.cjs} +1 -1
- package/dist/{index-DADq4uib.cjs → index-B3SqB7yl.cjs} +1 -1
- package/dist/{index-DORpNeEv.js → index-BD3O_DQN.js} +1 -1
- package/dist/{index-DBKxwOZZ.js → index-BMLnfdpX.js} +4 -5
- package/dist/index-BwEs_Gih.js +345 -0
- package/dist/{index-CPAniSJJ.cjs → index-CNE4QdxQ.cjs} +1 -1
- package/dist/{index-P-XWFKEv.cjs → index-CRQJ_FnB.cjs} +1 -1
- package/dist/{index-BK00mV7O.js → index-Cq_yCzqv.js} +3 -3
- package/dist/{index-D0BrZauT.js → index-DGU4M4GV.js} +3 -3
- package/dist/{index-CdiwcgWn.cjs → index-DLZJaKRC.cjs} +1 -1
- package/dist/{index-By9M6a6K.cjs → index-DiOtu98z.cjs} +1 -1
- package/dist/{index-DzijCTQM.js → index-Dns47tcD.js} +2 -2
- package/dist/index-DzJuDGl8.cjs +1 -0
- package/dist/{index-CefBKPRE.cjs → index-IJ9PKpzX.cjs} +1 -1
- package/dist/{index-3JVabNmb.js → index-Oz6bAv7L.js} +1 -1
- package/dist/{index-Dk3AafH9.js → index-cAlHRAni.js} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-D2nrgoto.cjs +7 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-DnHED9x9.js +618 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-CoTrTiyZ.cjs → index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-B8p4YtkN.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-sXEqRck_.js → index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-DrUd-gvH.js} +3 -3
- package/dist/{main-BrFLjXjC.cjs → main-CijR7xkz.cjs} +1 -1
- package/dist/{main-BJ49BQ83.js → main-DvtmZKNG.js} +3 -3
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/package.json +1 -1
- package/dist/index-DK-C6XIG.js +0 -351
- package/dist/index-bTbhSpJ8.cjs +0 -1
- package/dist/index-sjmLPf8w.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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createElementBlock as d, openBlock as D, createElementVNode as E, renderSlot as R, defineComponent as Y, ref as t, resolveComponent as e, createVNode as C, withCtx as I, reactive as K, watch as M, unref as U, toDisplayString as S, createTextVNode as l } from "vue";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { _ as a } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import { u as L, l as m } from "./index-
|
|
4
|
+
import { u as L, l as m } from "./index-Dns47tcD.js";
|
|
5
5
|
import { useRouter as O } from "vue-router";
|
|
6
6
|
const H = {}, P = { class: "header-wrapper" }, v = { class: "header-horizontal" }, j = { class: "header-logo" }, h = { class: "header-cTitle" }, r = { class: "header-horizontal" }, G = { class: "header-eTitle" };
|
|
7
7
|
function b(Q, s) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as g, onMounted as A, resolveComponent as l, createElementBlock as
|
|
1
|
+
import { defineComponent as g, onMounted as A, resolveComponent as l, createElementBlock as d, openBlock as o, Fragment as _, renderList as m, createBlock as r, withCtx as s, createVNode as I, createSlots as b, renderSlot as u, mergeProps as O, computed as S } from "vue";
|
|
2
2
|
import { u as q, s as E } from "./menu-BIINB-0Y.js";
|
|
3
3
|
import { _ as F } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const R = /* @__PURE__ */ g({
|
|
@@ -22,7 +22,7 @@ const R = /* @__PURE__ */ g({
|
|
|
22
22
|
return A(() => {
|
|
23
23
|
}), (n, y) => {
|
|
24
24
|
const k = l("MenuItem", !0), v = l("el-sub-menu"), C = l("el-menu-item");
|
|
25
|
-
return o(!0), _
|
|
25
|
+
return o(!0), d(_, null, m(M.menuList, (e) => (o(), d(_, null, [
|
|
26
26
|
e.children && e.children.length > 0 ? (o(), r(v, {
|
|
27
27
|
index: e.path,
|
|
28
28
|
key: e.path
|
|
@@ -81,7 +81,6 @@ const R = /* @__PURE__ */ g({
|
|
|
81
81
|
const p = l("el-sub-menu"), $ = l("el-menu-item"), B = l("el-menu");
|
|
82
82
|
return o(), r(B, {
|
|
83
83
|
class: "menu-wrap",
|
|
84
|
-
router: "",
|
|
85
84
|
"default-active": v.value,
|
|
86
85
|
"default-openeds": C.value,
|
|
87
86
|
"unique-opened": !0,
|
|
@@ -91,7 +90,7 @@ const R = /* @__PURE__ */ g({
|
|
|
91
90
|
onClose: k
|
|
92
91
|
}, {
|
|
93
92
|
default: s(() => [
|
|
94
|
-
(o(!0), _
|
|
93
|
+
(o(!0), d(_, null, m(M.menuList, (t) => (o(), d(_, null, [
|
|
95
94
|
t.children && t.children.length > 0 ? (o(), r(p, {
|
|
96
95
|
index: t.path,
|
|
97
96
|
key: t.path
|
|
@@ -129,7 +128,7 @@ const R = /* @__PURE__ */ g({
|
|
|
129
128
|
}, 8, ["default-active", "default-openeds"]);
|
|
130
129
|
};
|
|
131
130
|
}
|
|
132
|
-
}), D = /* @__PURE__ */ F(T, [["__scopeId", "data-v-
|
|
131
|
+
}), D = /* @__PURE__ */ F(T, [["__scopeId", "data-v-cd5548ec"]]);
|
|
133
132
|
export {
|
|
134
133
|
D as default
|
|
135
134
|
};
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { ref as g, onMounted as te, createElementBlock as v, openBlock as m, Fragment as H, renderList as Q, createElementVNode as F, createCommentVNode as M, toDisplayString as R, watch as B, createVNode as O, unref as E, createBlock as W, resolveDynamicComponent as ae } from "vue";
|
|
2
|
+
import { m as ne, a as oe, b as se } from "./index-2vs5vHzf.js";
|
|
3
|
+
import { p as J, u as le, b as re, i as ce, e as ue, g as ie, a as me } from "./array-CuefuJR6.js";
|
|
4
|
+
import { u as X } from "./modelComp-B3sxj_Kp.js";
|
|
5
|
+
import { u as Z, s as P } from "./menu-BIINB-0Y.js";
|
|
6
|
+
import de from "./index-cAlHRAni.js";
|
|
7
|
+
import { e as z, a as he } from "./index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-DnHED9x9.js";
|
|
8
|
+
import { _ as Y } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
+
import { c as N } from "./cloneDeep-CZ1WcsqU.js";
|
|
10
|
+
const ve = { class: "bread-content" }, fe = ["onClick"], ye = { key: 0 }, ge = {
|
|
11
|
+
__name: "index",
|
|
12
|
+
props: {
|
|
13
|
+
breadArray: {
|
|
14
|
+
type: Array,
|
|
15
|
+
default: () => []
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
emits: ["click"],
|
|
19
|
+
setup(w, { emit: T }) {
|
|
20
|
+
const e = w, k = g([]), h = T;
|
|
21
|
+
te(() => {
|
|
22
|
+
k.value = e == null ? void 0 : e.breadArray;
|
|
23
|
+
});
|
|
24
|
+
const f = (_) => {
|
|
25
|
+
h("click", _);
|
|
26
|
+
};
|
|
27
|
+
return (_, p) => (m(), v("div", ve, [
|
|
28
|
+
(m(!0), v(H, null, Q(k.value, (i, y) => (m(), v("div", {
|
|
29
|
+
key: y,
|
|
30
|
+
class: "bread-item"
|
|
31
|
+
}, [
|
|
32
|
+
F("div", {
|
|
33
|
+
class: "bread-title",
|
|
34
|
+
onClick: (x) => f(i)
|
|
35
|
+
}, R(i.value), 9, fe),
|
|
36
|
+
y !== k.value.length - 1 ? (m(), v("div", ye, R("/"))) : M("", !0)
|
|
37
|
+
]))), 128))
|
|
38
|
+
]));
|
|
39
|
+
}
|
|
40
|
+
}, _e = /* @__PURE__ */ Y(ge, [["__scopeId", "data-v-d55d3ede"]]);
|
|
41
|
+
function pe(w) {
|
|
42
|
+
var k, h, f, _;
|
|
43
|
+
const T = (h = (k = w[0]) == null ? void 0 : k.compData) == null ? void 0 : h.filter((p) => p.key !== "formContent"), e = (_ = (f = w[0]) == null ? void 0 : f.compData) == null ? void 0 : _.filter((p) => p.key === "formContent");
|
|
44
|
+
console.log("handleFormModel:", T, e, w);
|
|
45
|
+
}
|
|
46
|
+
const Ce = { class: "system-wrap" }, ke = {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: "show-content"
|
|
49
|
+
}, De = {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "item-menu-content"
|
|
52
|
+
}, Se = {
|
|
53
|
+
key: 0,
|
|
54
|
+
class: "item-view-group"
|
|
55
|
+
}, Ae = {
|
|
56
|
+
__name: "index",
|
|
57
|
+
props: {
|
|
58
|
+
content: String,
|
|
59
|
+
jsonContents: Array
|
|
60
|
+
},
|
|
61
|
+
emits: ["change", "contentChange"],
|
|
62
|
+
setup(w, { emit: T }) {
|
|
63
|
+
const e = w, k = T, h = X(J);
|
|
64
|
+
le(J);
|
|
65
|
+
const f = g(!0), _ = Z(), p = g(!0), { itemData: i } = P(h), y = re(J), { activeMenuPath: x, activeMenuOpenPaths: q, menuTriggerType: ee, menus: U } = P(_), { selectIndex: $, selectTitle: C } = P(y), A = g([]), D = g([]), G = (t) => {
|
|
66
|
+
var o, s, a;
|
|
67
|
+
const n = (o = i.value) == null ? void 0 : o.find((l) => l.name === x.value);
|
|
68
|
+
D.value = (a = (s = n == null ? void 0 : n.compData) == null ? void 0 : s[0]) == null ? void 0 : a.contents, p.value = !0, p.value && (p.value = !1), k("change", {
|
|
69
|
+
wholeValue: A.value,
|
|
70
|
+
editValue: t
|
|
71
|
+
});
|
|
72
|
+
}, K = (t) => {
|
|
73
|
+
var r, c, d;
|
|
74
|
+
const n = N(A.value), o = n == null ? void 0 : n.map((u, S) => (S === (t == null ? void 0 : t.index) && (u.compData = t == null ? void 0 : t.contents), u));
|
|
75
|
+
let s = "";
|
|
76
|
+
(c = (r = N(o)) == null ? void 0 : r.filter((u) => (u == null ? void 0 : u.comp) === "Form")) == null || c.forEach((u) => {
|
|
77
|
+
var S;
|
|
78
|
+
(S = u == null ? void 0 : u.compData) == null || S.forEach((I) => {
|
|
79
|
+
var b;
|
|
80
|
+
(I == null ? void 0 : I.key) === "formContent" && ((b = I == null ? void 0 : I.contents) == null || b.forEach((j) => {
|
|
81
|
+
j.value !== "" && (s = s === "" ? j == null ? void 0 : j.value : s + "-" + (j == null ? void 0 : j.value));
|
|
82
|
+
}));
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
let a = C == null ? void 0 : C.value;
|
|
86
|
+
(a == null ? void 0 : a.length) > 0 ? a[0] = { key: "main", value: s } : (Array.isArray(a) || (a = []), a.push({ key: "main", value: s })), y.setSelectTitle(a), f.value = !1, A.value = o;
|
|
87
|
+
const l = (d = i.value) == null ? void 0 : d.map((u, S) => {
|
|
88
|
+
var I;
|
|
89
|
+
return u.name === x.value && (u.compData = (I = u.compData) == null ? void 0 : I.map((b) => ((b == null ? void 0 : b.key) === "groupContents" && (b.contents = A.value), b))), u;
|
|
90
|
+
});
|
|
91
|
+
h.setItemData(l), p.value && (p.value = !1), k("contentChange", {
|
|
92
|
+
wholeContent: i.value
|
|
93
|
+
});
|
|
94
|
+
}, L = (t) => {
|
|
95
|
+
var n, o;
|
|
96
|
+
if ((t == null ? void 0 : t.key) === "main")
|
|
97
|
+
y.setSelectIndex(""), y.setSelectMenu(""), y.setSelectTitle((n = C.value) == null ? void 0 : n[0]);
|
|
98
|
+
else {
|
|
99
|
+
const s = [];
|
|
100
|
+
let a = -1;
|
|
101
|
+
(o = C.value) == null || o.forEach((l, r) => {
|
|
102
|
+
(l == null ? void 0 : l.key) === (t == null ? void 0 : t.key) && (a = r), (a === -1 || a >= r) && s.push(l);
|
|
103
|
+
}), y.setSelectTitle(s), y.setSelectMenu(t == null ? void 0 : t.key);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
B(
|
|
107
|
+
() => i.value,
|
|
108
|
+
() => {
|
|
109
|
+
var n, o, s, a, l, r, c, d;
|
|
110
|
+
if (!i.value || ((n = i.value) == null ? void 0 : n.length) === 0 || !f.value) return;
|
|
111
|
+
let t = null;
|
|
112
|
+
if (!x.value && Array.isArray(i.value))
|
|
113
|
+
t = (s = (o = N(i.value)) == null ? void 0 : o.filter((u) => (u == null ? void 0 : u.comp) === "Group")) == null ? void 0 : s[0], _.setActiveMenuPath(t == null ? void 0 : t.name);
|
|
114
|
+
else if (Array.isArray(i.value)) {
|
|
115
|
+
const u = (a = N(i.value)) == null ? void 0 : a.filter((S) => (S == null ? void 0 : S.comp) === "Group");
|
|
116
|
+
t = u == null ? void 0 : u.find((S) => S.name === x.value);
|
|
117
|
+
}
|
|
118
|
+
D.value = (r = (l = t == null ? void 0 : t.compData) == null ? void 0 : l[0]) == null ? void 0 : r.contents, A.value = (d = (c = t == null ? void 0 : t.compData) == null ? void 0 : c[0]) == null ? void 0 : d.contents, console.log("itemData监听", t, x.value, i.value);
|
|
119
|
+
},
|
|
120
|
+
{ deep: !0, immediate: !0 }
|
|
121
|
+
), B(() => x.value, (t) => {
|
|
122
|
+
var n, o, s, a, l, r;
|
|
123
|
+
if (t) {
|
|
124
|
+
const c = (n = N(i.value)) == null ? void 0 : n.find((d) => d.name === t);
|
|
125
|
+
if (t && c) {
|
|
126
|
+
D.value = (s = (o = c == null ? void 0 : c.compData) == null ? void 0 : o[0]) == null ? void 0 : s.contents, A.value = (l = (a = c == null ? void 0 : c.compData) == null ? void 0 : a[0]) == null ? void 0 : l.contents, console.log("点击-新-data:", t, D.value);
|
|
127
|
+
const d = (r = D.value) == null ? void 0 : r.filter((u) => u.comp === "Form");
|
|
128
|
+
pe(d);
|
|
129
|
+
} else
|
|
130
|
+
D.value = [], A.value = [];
|
|
131
|
+
y.setSelectTitle([]), y.setSelectIndex(""), y.setSelectMenu("");
|
|
132
|
+
}
|
|
133
|
+
}, {
|
|
134
|
+
immediate: !0
|
|
135
|
+
}), B(
|
|
136
|
+
() => [e == null ? void 0 : e.content, e == null ? void 0 : e.jsonContents],
|
|
137
|
+
() => {
|
|
138
|
+
var a, l, r;
|
|
139
|
+
if (((a = e == null ? void 0 : e.jsonContents) == null ? void 0 : a.length) > 0) {
|
|
140
|
+
h.setOriginalData(e == null ? void 0 : e.jsonContents), h.setItemData(e == null ? void 0 : e.jsonContents);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (!(e != null && e.content) || ((l = e == null ? void 0 : e.content) == null ? void 0 : l.length) === 0) return;
|
|
144
|
+
f.value = !0;
|
|
145
|
+
let t, n = [];
|
|
146
|
+
(r = e == null ? void 0 : e.content) == null || r.forEach((c) => {
|
|
147
|
+
ce(c) ? n.push(ue(c)) : z(c) ? n.push(z(c)) : n.push(he(c));
|
|
148
|
+
}), t = n[0];
|
|
149
|
+
const o = Array.isArray(t) && (t == null ? void 0 : t.find((c) => {
|
|
150
|
+
var d;
|
|
151
|
+
return ((d = c.comp) == null ? void 0 : d.toUpperCase()) === "MENU";
|
|
152
|
+
}));
|
|
153
|
+
_.setRawMenu(o ?? {});
|
|
154
|
+
const s = Array.isArray(t) && (t == null ? void 0 : t.find((c) => {
|
|
155
|
+
var d;
|
|
156
|
+
return ((d = c.comp) == null ? void 0 : d.toUpperCase()) === "SYSTEM";
|
|
157
|
+
}));
|
|
158
|
+
_.setSystemKey((s == null ? void 0 : s.name) ?? ""), h.setOriginalData(t), h.setItemData(t);
|
|
159
|
+
},
|
|
160
|
+
{ deep: !0, immediate: !0 }
|
|
161
|
+
);
|
|
162
|
+
const V = (t) => ie(t);
|
|
163
|
+
return (t, n) => {
|
|
164
|
+
var o, s;
|
|
165
|
+
return m(), v("div", Ce, [
|
|
166
|
+
O(de, { class: "sys-aside" }),
|
|
167
|
+
((o = D.value) == null ? void 0 : o.length) > 0 ? (m(), v("div", ke, [
|
|
168
|
+
((s = E(C)) == null ? void 0 : s.length) > 1 ? (m(), v("div", De, [
|
|
169
|
+
(m(), W(_e, {
|
|
170
|
+
key: E(C),
|
|
171
|
+
breadArray: E(C),
|
|
172
|
+
onClick: L
|
|
173
|
+
}, null, 8, ["breadArray"]))
|
|
174
|
+
])) : M("", !0),
|
|
175
|
+
(m(!0), v(H, null, Q(D.value, (a, l) => (m(), v("div", {
|
|
176
|
+
class: "item-content",
|
|
177
|
+
key: l
|
|
178
|
+
}, [
|
|
179
|
+
E($) === "" || l.toString() === E($) ? (m(), v("div", Se, R(a.name), 1)) : M("", !0),
|
|
180
|
+
E($) === "" || l.toString() === E($) ? (m(), W(ae(V(a.comp)), {
|
|
181
|
+
itemData: a == null ? void 0 : a.compData,
|
|
182
|
+
childItemData: a == null ? void 0 : a.itemChildData,
|
|
183
|
+
key: l,
|
|
184
|
+
onChange: G,
|
|
185
|
+
index: l,
|
|
186
|
+
onContentChange: K
|
|
187
|
+
}, null, 40, ["itemData", "childItemData", "index"])) : M("", !0)
|
|
188
|
+
]))), 128))
|
|
189
|
+
])) : M("", !0)
|
|
190
|
+
]);
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
}, we = /* @__PURE__ */ Y(Ae, [["__scopeId", "data-v-c89dc4ab"]]), Ie = { class: "add-model-content" }, Me = {
|
|
194
|
+
key: 0,
|
|
195
|
+
class: "model-import-data"
|
|
196
|
+
}, xe = { class: "import-button" }, be = { key: 0 }, Te = {
|
|
197
|
+
key: 1,
|
|
198
|
+
class: "model-operate"
|
|
199
|
+
}, $e = { class: "model-select" }, je = { class: "model-fill" }, Ee = {
|
|
200
|
+
key: 2,
|
|
201
|
+
class: "model-view"
|
|
202
|
+
}, Fe = {
|
|
203
|
+
__name: "index",
|
|
204
|
+
props: {
|
|
205
|
+
mode: {
|
|
206
|
+
type: String,
|
|
207
|
+
default: "view"
|
|
208
|
+
},
|
|
209
|
+
content: {
|
|
210
|
+
type: String,
|
|
211
|
+
default: ""
|
|
212
|
+
},
|
|
213
|
+
jsonContents: {
|
|
214
|
+
type: Array,
|
|
215
|
+
default: () => []
|
|
216
|
+
},
|
|
217
|
+
showButton: {
|
|
218
|
+
type: Boolean,
|
|
219
|
+
default: !0
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
emits: ["change", "contentChange"],
|
|
223
|
+
setup(w, { emit: T }) {
|
|
224
|
+
const e = w, k = T, h = g([]), f = g([]), _ = g([]), p = g(0), i = X(J), y = Z(J), { itemData: x, originalData: q } = P(i), { activeMenuPath: ee } = P(y), U = g(null), $ = g(0), C = g([]), A = g(""), D = g(0), G = (n) => {
|
|
225
|
+
k("contentChange", n);
|
|
226
|
+
}, K = (n) => {
|
|
227
|
+
var s;
|
|
228
|
+
const o = (s = N(n == null ? void 0 : n.wholeValue)) == null ? void 0 : s.map((a) => {
|
|
229
|
+
var l;
|
|
230
|
+
return (a == null ? void 0 : a.comp) === "Form" && (a.compData = (l = a.compData) == null ? void 0 : l.map((r) => ((r == null ? void 0 : r.key) === "formContent" && (r.contents = me(r == null ? void 0 : r.contents)), r))), a;
|
|
231
|
+
});
|
|
232
|
+
k("change", {
|
|
233
|
+
originalContents: q.value,
|
|
234
|
+
currentContents: n == null ? void 0 : n.wholeValue,
|
|
235
|
+
editContent: n == null ? void 0 : n.editValue,
|
|
236
|
+
arrayToContents: o
|
|
237
|
+
});
|
|
238
|
+
};
|
|
239
|
+
B(
|
|
240
|
+
() => f.value,
|
|
241
|
+
() => {
|
|
242
|
+
D.value === f.value.length && f.value.length !== 0 && (h.value = f.value);
|
|
243
|
+
},
|
|
244
|
+
{ deep: !0, immediate: !0 }
|
|
245
|
+
);
|
|
246
|
+
const L = () => {
|
|
247
|
+
U.value.click();
|
|
248
|
+
}, V = async (n) => {
|
|
249
|
+
const o = n.target.files;
|
|
250
|
+
if (!o) return;
|
|
251
|
+
new FileReader(), h.value = [], f.value = [], D.value = o.length;
|
|
252
|
+
const s = Array.from(o).map(async (a) => await new Promise((l) => {
|
|
253
|
+
const r = new FileReader();
|
|
254
|
+
r.onload = (c) => {
|
|
255
|
+
try {
|
|
256
|
+
f.value.push(c.target.result), C.value = t(c.target.result), $.value++;
|
|
257
|
+
} catch (d) {
|
|
258
|
+
console.error("解析失败:", d);
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
}, r.onerror = () => l(`读取 ${a.name} 失败`), r.readAsText(a);
|
|
262
|
+
}));
|
|
263
|
+
await Promise.all(s);
|
|
264
|
+
};
|
|
265
|
+
B(
|
|
266
|
+
() => [e == null ? void 0 : e.content, e == null ? void 0 : e.jsonContents],
|
|
267
|
+
() => {
|
|
268
|
+
h.value = e == null ? void 0 : e.content, _.value = e == null ? void 0 : e.jsonContents;
|
|
269
|
+
},
|
|
270
|
+
{ deep: !0, immediate: !0 }
|
|
271
|
+
), B(
|
|
272
|
+
() => $.value,
|
|
273
|
+
() => {
|
|
274
|
+
var n;
|
|
275
|
+
((n = C.value) == null ? void 0 : n.length) !== 0 && (i.setOriginalData(C.value), i.setItemData(C.value));
|
|
276
|
+
},
|
|
277
|
+
{ deep: !0, immediate: !0 }
|
|
278
|
+
);
|
|
279
|
+
const t = (n) => {
|
|
280
|
+
let o = n.replace(/,/g, ",").replace(/;/g, ";").replace(/:/g, ":");
|
|
281
|
+
o = o.replace(/(\w+)\s*:/g, "$1:"), o = o.replace(/\r\n/g, "").replace(/\n/g, "").replace(/\t/g, "").replace(/\s+/g, " ").trim(), o = o.replace(/,\s*([}\]])/g, "$1"), o = o.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g, ": $2$4");
|
|
282
|
+
try {
|
|
283
|
+
return JSON.parse(o);
|
|
284
|
+
} catch (s) {
|
|
285
|
+
try {
|
|
286
|
+
const l = new Function(`return ${o}`)();
|
|
287
|
+
if (Array.isArray(l) || typeof l == "object")
|
|
288
|
+
return l;
|
|
289
|
+
throw new Error(`解析结果不是有效的数组或对象: ${s}`);
|
|
290
|
+
} catch (a) {
|
|
291
|
+
throw new Error(`无法解析JSON: ${a.message}`);
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
return (n, o) => {
|
|
296
|
+
var s;
|
|
297
|
+
return m(), v("div", Ie, [
|
|
298
|
+
((s = e == null ? void 0 : e.jsonContents) == null ? void 0 : s.length) === 0 && (e != null && e.showButton) ? (m(), v("div", Me, [
|
|
299
|
+
F("div", xe, [
|
|
300
|
+
F("input", {
|
|
301
|
+
type: "file",
|
|
302
|
+
ref_key: "fileInput",
|
|
303
|
+
ref: U,
|
|
304
|
+
accept: ".txt, .inm",
|
|
305
|
+
onChange: V,
|
|
306
|
+
style: { display: "none" },
|
|
307
|
+
multiple: ""
|
|
308
|
+
}, null, 544),
|
|
309
|
+
F("button", {
|
|
310
|
+
onClick: L,
|
|
311
|
+
class: "import-button-content"
|
|
312
|
+
}, "导入文件"),
|
|
313
|
+
A.value ? (m(), v("span", be, R(A.value), 1)) : M("", !0)
|
|
314
|
+
])
|
|
315
|
+
])) : M("", !0),
|
|
316
|
+
(e == null ? void 0 : e.mode) === "edit" ? (m(), v("div", Te, [
|
|
317
|
+
F("div", $e, [
|
|
318
|
+
O(ne)
|
|
319
|
+
]),
|
|
320
|
+
(m(), v("div", {
|
|
321
|
+
class: "model-show",
|
|
322
|
+
key: p.value
|
|
323
|
+
}, [
|
|
324
|
+
O(oe)
|
|
325
|
+
])),
|
|
326
|
+
F("div", je, [
|
|
327
|
+
O(se)
|
|
328
|
+
])
|
|
329
|
+
])) : M("", !0),
|
|
330
|
+
(e == null ? void 0 : e.mode) === "view" ? (m(), v("div", Ee, [
|
|
331
|
+
(m(), W(we, {
|
|
332
|
+
content: h.value,
|
|
333
|
+
onChange: K,
|
|
334
|
+
jsonContents: _.value,
|
|
335
|
+
onContentChange: G,
|
|
336
|
+
key: p.value
|
|
337
|
+
}, null, 8, ["content", "jsonContents"]))
|
|
338
|
+
])) : M("", !0)
|
|
339
|
+
]);
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
}, Le = /* @__PURE__ */ Y(Fe, [["__scopeId", "data-v-0d13cfeb"]]);
|
|
343
|
+
export {
|
|
344
|
+
Le as default
|
|
345
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-B8p4YtkN.cjs"),e=require("vue"),c=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function l(n,i,a,p,_,M){const t=e.resolveComponent("DynamicIcon"),s=e.resolveComponent("ssMenu");return e.openBlock(),e.createBlock(s,{menuList:n.renderMenuList,onClickMenu:n.clickMenu,onOpenMenu:n.openMenu,onCloseMenu:n.closeMenu,onChangeMenuStyle:n.changeMenuStyle,class:"menuList-wrap"},{title:e.withCtx(({menu:o})=>[e.createVNode(t,{name:o.icon??""},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(o.title??""),1)]),_:1},8,["menuList","onClickMenu","onOpenMenu","onCloseMenu","onChangeMenuStyle"])}const r=c._export_sfc(u._sfc_main,[["render",l],["__scopeId","data-v-dc84a8f7"]]);exports.default=r;
|
|
@@ -1 +1 @@
|
|
|
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-
|
|
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-DjZCFuX6.cjs");require("./index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-B8p4YtkN.cjs");require("./index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-D2nrgoto.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;
|
|
@@ -2,9 +2,9 @@ import { ref as e, resolveComponent as o, createBlock as r, openBlock as n } fro
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { _ as p } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
import "vue-router";
|
|
5
|
-
import "./array-
|
|
6
|
-
import "./index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-
|
|
7
|
-
import "./index.
|
|
5
|
+
import "./array-CuefuJR6.js";
|
|
6
|
+
import "./index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-DrUd-gvH.js";
|
|
7
|
+
import "./index.vue_vue_type_style_index_0_scoped_0d13cfeb_lang-DnHED9x9.js";
|
|
8
8
|
const a = {
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as gt, computed as Ie, createElementBlock as N, openBlock as y, normalizeClass as Me, unref as W, renderSlot as ge, createVNode as fe, Transition as wn, withCtx as B, withDirectives as Dn, createElementVNode as ae, normalizeStyle as se, createTextVNode as lt, toDisplayString as he, vShow as En, watch as Se, shallowReactive as Gn, ref as L, onMounted as Nt, createBlock as Y, createCommentVNode as J, resolveDynamicComponent as Qe, Fragment as pe, withModifiers as qn, nextTick as st, isVNode as Sn, render as on, resolveComponent as K, renderList as be, createSlots as Cn, mergeProps as Zn, normalizeProps as Jn, guardReactiveProps as Kn } from "vue";
|
|
2
|
-
import { b as Jt, d as Fe, _ as xn, a as Qn, i as pt, c as an, w as eo, e as to, f as no, p as oo, g as Tn, h as ao, j as ro, T as rn, k as io, m as lo, n as ln, o as so, q as uo, s as co, t as sn, v as Ut, x as fo, y as ho, z as un, A as po, B as dn, C as go } from "./index-
|
|
2
|
+
import { b as Jt, d as Fe, _ as xn, a as Qn, i as pt, c as an, w as eo, e as to, f as no, p as oo, g as Tn, h as ao, j as ro, T as rn, k as io, m as lo, n as ln, o as so, q as uo, s as co, t as sn, v as Ut, x as fo, y as ho, z as un, A as po, B as dn, C as go } from "./index-Dns47tcD.js";
|
|
3
3
|
import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import { c as Pt } from "./cloneDeep-
|
|
5
|
-
import mo from "./index-
|
|
4
|
+
import { c as Pt } from "./cloneDeep-CZ1WcsqU.js";
|
|
5
|
+
import mo from "./index-BMLnfdpX.js";
|
|
6
6
|
const vo = (o) => o, bo = Jt({
|
|
7
7
|
value: {
|
|
8
8
|
type: [String, Number],
|