ss-component-new 1.1.17 → 1.1.18
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-DLhSgLgc.js +3394 -0
- package/dist/{index-hjkvqVVf.js → index-BFdnTJMh.js} +1 -1
- package/dist/{index-CeOZHsL0.js → index-DM0qZDHo.js} +3 -3
- package/dist/{index-DWMH22gL.js → index-DjrQsQms.js} +78 -74
- package/dist/index-MSbODhhD.js +3282 -0
- package/dist/{main-C8laWp6v.js → main-U3be2-RR.js} +3 -3
- package/dist/{menu-3a4UTvU1.js → menu-hS9inuNL.js} +1 -0
- package/dist/{modelComp-CFwQm9Yp.js → modelComp-Eh2O6nl8.js} +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +4 -4
- package/dist/ss-component.umd.cjs +16 -16
- package/package.json +2 -1
- package/dist/array-BeEcIEzJ.js +0 -3434
- package/dist/index-CKbmw71j.js +0 -3102
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as S, onMounted as A, resolveComponent as l, createElementBlock as d, openBlock as o, Fragment as m, renderList as M, createBlock as r, withCtx as s, createVNode as b, createSlots as g, renderSlot as u, mergeProps as O, computed as I } from "vue";
|
|
2
|
-
import { u as R, s as q, _ as E } from "./menu-
|
|
2
|
+
import { u as R, s as q, _ as E } from "./menu-hS9inuNL.js";
|
|
3
3
|
const F = /* @__PURE__ */ S({
|
|
4
4
|
__name: "menuItem",
|
|
5
5
|
props: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineAsyncComponent as B, computed as E, onMounted as F, resolveComponent as L, createBlock as f, openBlock as _, withCtx as S, resolveDynamicComponent as N, defineComponent as U, ref as G, watch as V, unref as q, createVNode as v, createElementVNode as z, toDisplayString as H } from "vue";
|
|
2
|
-
import { E as M, u as J, s as C, c as D, _ as K } from "./menu-
|
|
3
|
-
import { u as Q } from "./modelComp-
|
|
4
|
-
const A = B(() => import("./index-
|
|
2
|
+
import { E as M, u as J, s as C, c as D, _ as K } from "./menu-hS9inuNL.js";
|
|
3
|
+
import { u as Q } from "./modelComp-Eh2O6nl8.js";
|
|
4
|
+
const A = B(() => import("./index-BFdnTJMh.js"));
|
|
5
5
|
A.install = (n) => {
|
|
6
6
|
n.component("ssMenu", A);
|
|
7
7
|
};
|
|
@@ -1,49 +1,52 @@
|
|
|
1
|
-
import { ref as y, watch as M, createElementBlock as
|
|
2
|
-
import { p as
|
|
3
|
-
import { u as
|
|
4
|
-
import { _ as
|
|
5
|
-
import te from "./index-
|
|
1
|
+
import { ref as y, watch as M, createElementBlock as m, openBlock as u, createVNode as F, createCommentVNode as D, Fragment as K, renderList as L, createBlock as E, unref as N, toDisplayString as P, resolveDynamicComponent as W, createElementVNode as x } from "vue";
|
|
2
|
+
import { p as j, u as Y, d as q, e as z, g as H, m as Q, a as X, b as Z, c as ee, s as ae } from "./array-DLhSgLgc.js";
|
|
3
|
+
import { u as U } from "./modelComp-Eh2O6nl8.js";
|
|
4
|
+
import { _ as O, u as R, s as A, c as I } from "./menu-hS9inuNL.js";
|
|
5
|
+
import te from "./index-DM0qZDHo.js";
|
|
6
6
|
const se = { class: "system-wrap" }, oe = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "show-content"
|
|
9
9
|
}, ne = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "item-view-group"
|
|
12
|
+
}, le = {
|
|
10
13
|
__name: "index",
|
|
11
14
|
props: {
|
|
12
15
|
content: String,
|
|
13
16
|
jsonContents: Array
|
|
14
17
|
},
|
|
15
18
|
emits: ["change"],
|
|
16
|
-
setup(
|
|
17
|
-
const a =
|
|
18
|
-
Y(
|
|
19
|
-
const C =
|
|
20
|
-
|
|
19
|
+
setup(T, { emit: $ }) {
|
|
20
|
+
const a = T, V = $, g = U(j);
|
|
21
|
+
Y(j);
|
|
22
|
+
const C = R(), { itemData: d } = A(g), p = q(j), { selectIndex: S } = A(p), { activeMenuPath: w, activeMenuOpenPaths: J, menuTriggerType: G } = A(C), v = y([]), _ = y([]), b = (t) => {
|
|
23
|
+
V("change", {
|
|
21
24
|
wholeValue: v.value,
|
|
22
25
|
editValue: t
|
|
23
26
|
});
|
|
24
|
-
},
|
|
27
|
+
}, B = (t) => {
|
|
25
28
|
const r = I(v.value), l = r == null ? void 0 : r.map((e, s) => (s === (t == null ? void 0 : t.index) && (e.compData = t == null ? void 0 : t.contents), e));
|
|
26
29
|
v.value = l;
|
|
27
30
|
};
|
|
28
31
|
M(
|
|
29
|
-
() =>
|
|
32
|
+
() => d.value,
|
|
30
33
|
() => {
|
|
31
|
-
var r, l, e, s, o, n,
|
|
32
|
-
if (!
|
|
34
|
+
var r, l, e, s, o, n, i, f;
|
|
35
|
+
if (!d.value || ((r = d.value) == null ? void 0 : r.length) === 0) return;
|
|
33
36
|
let t = null;
|
|
34
|
-
if (!
|
|
35
|
-
t = (e = (l = I(
|
|
37
|
+
if (!w.value)
|
|
38
|
+
t = (e = (l = I(d.value)) == null ? void 0 : l.filter((h) => (h == null ? void 0 : h.comp) === "Group")) == null ? void 0 : e[0], C.setActiveMenuPath(t == null ? void 0 : t.name);
|
|
36
39
|
else {
|
|
37
|
-
const
|
|
38
|
-
t =
|
|
40
|
+
const h = (s = I(d.value)) == null ? void 0 : s.filter((c) => (c == null ? void 0 : c.comp) === "Group");
|
|
41
|
+
t = h == null ? void 0 : h.find((c) => c.name === w.value);
|
|
39
42
|
}
|
|
40
|
-
_.value = (n = (o = t == null ? void 0 : t.compData) == null ? void 0 : o[0]) == null ? void 0 : n.contents, v.value = (f = (
|
|
43
|
+
_.value = (n = (o = t == null ? void 0 : t.compData) == null ? void 0 : o[0]) == null ? void 0 : n.contents, v.value = (f = (i = t == null ? void 0 : t.compData) == null ? void 0 : i[0]) == null ? void 0 : f.contents, console.log("itemData监听", w.value, d.value);
|
|
41
44
|
},
|
|
42
45
|
{ deep: !0, immediate: !0 }
|
|
43
|
-
), M(() =>
|
|
46
|
+
), M(() => w.value, (t) => {
|
|
44
47
|
var r, l, e, s, o;
|
|
45
48
|
if (console.log("点击-新-data2:", t), t) {
|
|
46
|
-
const n = (r = I(
|
|
49
|
+
const n = (r = I(d.value)) == null ? void 0 : r.find((i) => i.name === t);
|
|
47
50
|
t && n ? (_.value = (e = (l = n == null ? void 0 : n.compData) == null ? void 0 : l[0]) == null ? void 0 : e.contents, v.value = (o = (s = n == null ? void 0 : n.compData) == null ? void 0 : s[0]) == null ? void 0 : o.contents, console.log("点击-新-data:", t, _.value)) : (_.value = [], v.value = []), p.setSelectIndex(""), p.setSelectMenu("");
|
|
48
51
|
}
|
|
49
52
|
}), M(
|
|
@@ -70,39 +73,40 @@ const se = { class: "system-wrap" }, oe = {
|
|
|
70
73
|
},
|
|
71
74
|
{ deep: !0, immediate: !0 }
|
|
72
75
|
);
|
|
73
|
-
const
|
|
76
|
+
const k = (t) => H(t);
|
|
74
77
|
return (t, r) => {
|
|
75
78
|
var l;
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
((l = _.value) == null ? void 0 : l.length) > 0 ? (
|
|
79
|
-
(
|
|
79
|
+
return u(), m("div", se, [
|
|
80
|
+
F(te, { class: "sys-aside" }),
|
|
81
|
+
((l = _.value) == null ? void 0 : l.length) > 0 ? (u(), m("div", oe, [
|
|
82
|
+
(u(!0), m(K, null, L(_.value, (e, s) => (u(), m("div", {
|
|
80
83
|
class: "item-content",
|
|
81
84
|
key: s
|
|
82
85
|
}, [
|
|
83
|
-
|
|
86
|
+
N(S) === "" || s.toString() === N(S) ? (u(), m("div", ne, P(e.name), 1)) : D("", !0),
|
|
87
|
+
N(S) === "" || s.toString() === N(S) ? (u(), E(W(k(e.comp)), {
|
|
84
88
|
itemData: e == null ? void 0 : e.compData,
|
|
85
89
|
childItemData: e == null ? void 0 : e.itemChildData,
|
|
86
90
|
key: s,
|
|
87
91
|
onChange: b,
|
|
88
92
|
index: s,
|
|
89
|
-
onContentChange:
|
|
90
|
-
}, null, 40, ["itemData", "childItemData", "index"])) :
|
|
93
|
+
onContentChange: B
|
|
94
|
+
}, null, 40, ["itemData", "childItemData", "index"])) : D("", !0)
|
|
91
95
|
]))), 128))
|
|
92
|
-
])) :
|
|
96
|
+
])) : D("", !0)
|
|
93
97
|
]);
|
|
94
98
|
};
|
|
95
99
|
}
|
|
96
|
-
},
|
|
100
|
+
}, re = /* @__PURE__ */ O(le, [["__scopeId", "data-v-979a28e7"]]), ce = { class: "add-model-content" }, ue = {
|
|
97
101
|
key: 0,
|
|
98
102
|
class: "model-import-data"
|
|
99
|
-
},
|
|
103
|
+
}, ie = { class: "import-button" }, me = { key: 0 }, de = {
|
|
100
104
|
key: 1,
|
|
101
105
|
class: "model-operate"
|
|
102
|
-
},
|
|
106
|
+
}, he = { class: "model-select" }, ge = { class: "model-fill" }, ve = {
|
|
103
107
|
key: 2,
|
|
104
108
|
class: "model-view"
|
|
105
|
-
},
|
|
109
|
+
}, _e = {
|
|
106
110
|
__name: "index",
|
|
107
111
|
props: {
|
|
108
112
|
mode: {
|
|
@@ -123,20 +127,20 @@ const se = { class: "system-wrap" }, oe = {
|
|
|
123
127
|
}
|
|
124
128
|
},
|
|
125
129
|
emits: ["change"],
|
|
126
|
-
setup(
|
|
127
|
-
const a =
|
|
128
|
-
var o, n,
|
|
130
|
+
setup(T, { emit: $ }) {
|
|
131
|
+
const a = T, V = $, g = y(""), C = y([]), d = y(0), p = U(j), S = R(j), { itemData: w, originalData: J } = A(p), { activeMenuPath: G } = A(S), v = y(null), _ = y(0), b = y(""), B = (e) => {
|
|
132
|
+
var o, n, i;
|
|
129
133
|
const s = (o = I(e == null ? void 0 : e.wholeValue)) == null ? void 0 : o.map((f) => {
|
|
130
|
-
var
|
|
131
|
-
return (f == null ? void 0 : f.comp) === "Form" && (f.compData = (
|
|
134
|
+
var h;
|
|
135
|
+
return (f == null ? void 0 : f.comp) === "Form" && (f.compData = (h = f.compData) == null ? void 0 : h.map((c) => ((c == null ? void 0 : c.key) === "formContent" && (c.contents = ee(c == null ? void 0 : c.contents)), c))), f;
|
|
132
136
|
});
|
|
133
|
-
|
|
134
|
-
originalContents:
|
|
137
|
+
V("change", {
|
|
138
|
+
originalContents: J.value,
|
|
135
139
|
currentContents: e == null ? void 0 : e.wholeValue,
|
|
136
140
|
editContent: e == null ? void 0 : e.editValue,
|
|
137
141
|
arrayToContents: s
|
|
138
|
-
}), ae(e == null ? void 0 : e.wholeValue, (n = e == null ? void 0 : e.editValue) == null ? void 0 : n.content, (
|
|
139
|
-
},
|
|
142
|
+
}), ae(e == null ? void 0 : e.wholeValue, (n = e == null ? void 0 : e.editValue) == null ? void 0 : n.content, (i = e == null ? void 0 : e.editValue) == null ? void 0 : i.buttonName), console.log("change123", e == null ? void 0 : e.editValue, e == null ? void 0 : e.wholeValue);
|
|
143
|
+
}, k = y([]), t = () => {
|
|
140
144
|
v.value.click();
|
|
141
145
|
}, r = (e) => {
|
|
142
146
|
const s = e.target.files[0];
|
|
@@ -144,9 +148,9 @@ const se = { class: "system-wrap" }, oe = {
|
|
|
144
148
|
const o = new FileReader();
|
|
145
149
|
o.onload = (n) => {
|
|
146
150
|
try {
|
|
147
|
-
g.value = n.target.result,
|
|
148
|
-
} catch (
|
|
149
|
-
console.error("解析失败:",
|
|
151
|
+
g.value = n.target.result, k.value = l(n.target.result), _.value++;
|
|
152
|
+
} catch (i) {
|
|
153
|
+
console.error("解析失败:", i);
|
|
150
154
|
}
|
|
151
155
|
}, o.onerror = (n) => {
|
|
152
156
|
console.error("文件读取错误:", n);
|
|
@@ -162,7 +166,7 @@ const se = { class: "system-wrap" }, oe = {
|
|
|
162
166
|
() => _.value,
|
|
163
167
|
() => {
|
|
164
168
|
var e;
|
|
165
|
-
((e =
|
|
169
|
+
((e = k.value) == null ? void 0 : e.length) !== 0 && (p.setOriginalData(k.value), p.setItemData(k.value));
|
|
166
170
|
},
|
|
167
171
|
{ deep: !0, immediate: !0 }
|
|
168
172
|
);
|
|
@@ -173,9 +177,9 @@ const se = { class: "system-wrap" }, oe = {
|
|
|
173
177
|
return JSON.parse(s);
|
|
174
178
|
} catch (o) {
|
|
175
179
|
try {
|
|
176
|
-
const
|
|
177
|
-
if (Array.isArray(
|
|
178
|
-
return
|
|
180
|
+
const i = new Function(`return ${s}`)();
|
|
181
|
+
if (Array.isArray(i) || typeof i == "object")
|
|
182
|
+
return i;
|
|
179
183
|
throw new Error(`解析结果不是有效的数组或对象: ${o}`);
|
|
180
184
|
} catch (n) {
|
|
181
185
|
throw new Error(`无法解析JSON: ${n.message}`);
|
|
@@ -184,9 +188,9 @@ const se = { class: "system-wrap" }, oe = {
|
|
|
184
188
|
};
|
|
185
189
|
return (e, s) => {
|
|
186
190
|
var o;
|
|
187
|
-
return
|
|
188
|
-
((o = a == null ? void 0 : a.jsonContents) == null ? void 0 : o.length) === 0 && (a != null && a.showButton) ? (
|
|
189
|
-
x("div",
|
|
191
|
+
return u(), m("div", ce, [
|
|
192
|
+
((o = a == null ? void 0 : a.jsonContents) == null ? void 0 : o.length) === 0 && (a != null && a.showButton) ? (u(), m("div", ue, [
|
|
193
|
+
x("div", ie, [
|
|
190
194
|
x("input", {
|
|
191
195
|
type: "file",
|
|
192
196
|
ref_key: "fileInput",
|
|
@@ -199,40 +203,40 @@ const se = { class: "system-wrap" }, oe = {
|
|
|
199
203
|
onClick: t,
|
|
200
204
|
class: "import-button-content"
|
|
201
205
|
}, "导入文件"),
|
|
202
|
-
b.value ? (
|
|
206
|
+
b.value ? (u(), m("span", me, P(b.value), 1)) : D("", !0)
|
|
203
207
|
])
|
|
204
|
-
])) :
|
|
205
|
-
(a == null ? void 0 : a.mode) === "edit" ? (
|
|
206
|
-
x("div",
|
|
207
|
-
|
|
208
|
+
])) : D("", !0),
|
|
209
|
+
(a == null ? void 0 : a.mode) === "edit" ? (u(), m("div", de, [
|
|
210
|
+
x("div", he, [
|
|
211
|
+
F(Q)
|
|
208
212
|
]),
|
|
209
|
-
(
|
|
213
|
+
(u(), m("div", {
|
|
210
214
|
class: "model-show",
|
|
211
|
-
key:
|
|
215
|
+
key: d.value
|
|
212
216
|
}, [
|
|
213
|
-
|
|
217
|
+
F(X)
|
|
214
218
|
])),
|
|
215
|
-
x("div",
|
|
216
|
-
|
|
219
|
+
x("div", ge, [
|
|
220
|
+
F(Z)
|
|
217
221
|
])
|
|
218
|
-
])) :
|
|
219
|
-
(a == null ? void 0 : a.mode) === "view" ? (
|
|
220
|
-
(
|
|
222
|
+
])) : D("", !0),
|
|
223
|
+
(a == null ? void 0 : a.mode) === "view" ? (u(), m("div", ve, [
|
|
224
|
+
(u(), E(re, {
|
|
221
225
|
content: g.value,
|
|
222
|
-
onChange:
|
|
226
|
+
onChange: B,
|
|
223
227
|
jsonContents: C.value,
|
|
224
|
-
key:
|
|
228
|
+
key: d.value
|
|
225
229
|
}, null, 8, ["content", "jsonContents"]))
|
|
226
|
-
])) :
|
|
230
|
+
])) : D("", !0)
|
|
227
231
|
]);
|
|
228
232
|
};
|
|
229
233
|
}
|
|
230
|
-
},
|
|
234
|
+
}, fe = /* @__PURE__ */ O(_e, [["__scopeId", "data-v-c8a54bd8"]]), ye = {
|
|
231
235
|
__name: "index",
|
|
232
|
-
setup(
|
|
233
|
-
return (
|
|
236
|
+
setup(T) {
|
|
237
|
+
return ($, a) => (u(), E(fe, { class: "ssComponent" }));
|
|
234
238
|
}
|
|
235
|
-
},
|
|
239
|
+
}, we = /* @__PURE__ */ O(ye, [["__scopeId", "data-v-f196ec9f"]]);
|
|
236
240
|
export {
|
|
237
|
-
|
|
241
|
+
we as default
|
|
238
242
|
};
|