ss-component-new 1.1.69 → 1.1.70
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/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/array-BAin2LgZ.js +3233 -0
- package/dist/cloneDeep-D5Kd1l4C.js +318 -0
- package/dist/index-B2ClyWJG.js +351 -0
- package/dist/{menu-D6yKPqgS.js → index-BiRoo_a0.js} +3821 -1790
- package/dist/index-C4ww6i-R.js +3133 -0
- package/dist/index-C6uydMjw.js +26 -0
- package/dist/{index-CEq6IRIE.js → index-CmIl8-ng.js} +171 -877
- package/dist/index-DT5WJi3E.js +131 -0
- package/dist/index-DUDzEpKd.js +36 -0
- package/dist/{index-10n3uNlg.js → index-l2B1gJ80.js} +4 -3
- package/dist/{index-DiAssal2.js → index-qo-kPc5S.js} +2 -2
- package/dist/index.vue_vue_type_style_index_0_scoped_876d48c6_lang-nK36fXfd.js +254 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-BO-d1Oip.js +144 -0
- package/dist/{main-DqI34-Cq.js → main-D4QrQeyh.js} +46 -44
- package/dist/menu-R7bFdGaV.js +924 -0
- package/dist/{modelComp-Cr1QF6ip.js → modelComp-CvlV4fLW.js} +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +2 -31
- package/dist/ss-component.umd.cjs +81 -55
- package/package.json +1 -1
- package/dist/_plugin-vue_export-helper-B7R8Jogt.js +0 -524
- package/dist/array-BGMpYX__.js +0 -3352
- package/dist/index-K2751gew.js +0 -163
- package/dist/index-zogzyMot.js +0 -3749
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ref as _, watch as V, createElementBlock as C, createCommentVNode as I, openBlock as f, Fragment as le, renderList as se, createElementVNode as O, createBlock as Z, toDisplayString as v, resolveDynamicComponent as ue, onMounted as ce, createVNode as A } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { m as ie, a as me, b as de } from "./index-DT5WJi3E.js";
|
|
3
|
+
import { p as E, e as ye, g as fe, a as ge } from "./array-BAin2LgZ.js";
|
|
4
|
+
import { u as ee } from "./modelComp-CvlV4fLW.js";
|
|
5
|
+
import { s as te, u as he } from "./menu-R7bFdGaV.js";
|
|
6
|
+
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
+
import { c as k } from "./cloneDeep-D5Kd1l4C.js";
|
|
6
8
|
const x = [
|
|
7
9
|
{
|
|
8
10
|
key: "FormName",
|
|
@@ -56,20 +58,20 @@ const x = [
|
|
|
56
58
|
},
|
|
57
59
|
emits: ["change"],
|
|
58
60
|
setup(F, { emit: B }) {
|
|
59
|
-
const e = F, $ = B, h = ee(E), { itemData:
|
|
61
|
+
const e = F, $ = B, h = ee(E), { itemData: p } = te(h), b = _([]), w = _([]), L = (l) => {
|
|
60
62
|
$("change", {
|
|
61
|
-
wholeValue:
|
|
63
|
+
wholeValue: b.value,
|
|
62
64
|
editValue: l
|
|
63
65
|
});
|
|
64
66
|
}, D = (l) => {
|
|
65
|
-
const g = k(
|
|
66
|
-
|
|
67
|
+
const g = k(b.value), S = g == null ? void 0 : g.map((c, j) => (j === (l == null ? void 0 : l.index) && (c.compData = l == null ? void 0 : l.contents), c));
|
|
68
|
+
b.value = S;
|
|
67
69
|
};
|
|
68
70
|
V(
|
|
69
|
-
() =>
|
|
71
|
+
() => p.value,
|
|
70
72
|
() => {
|
|
71
73
|
var l;
|
|
72
|
-
!
|
|
74
|
+
!p.value || ((l = p.value) == null ? void 0 : l.length) === 0 || (w.value = p.value, b.value = p.value);
|
|
73
75
|
},
|
|
74
76
|
{ deep: !0, immediate: !0 }
|
|
75
77
|
), V(
|
|
@@ -81,12 +83,12 @@ const x = [
|
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
83
85
|
if (!(e != null && e.content) || (e == null ? void 0 : e.content) === "") return;
|
|
84
|
-
const l =
|
|
86
|
+
const l = ye(e == null ? void 0 : e.content);
|
|
85
87
|
h.setOriginalData(l), h.setItemData(l);
|
|
86
88
|
},
|
|
87
89
|
{ deep: !0, immediate: !0 }
|
|
88
90
|
);
|
|
89
|
-
const N = (l) =>
|
|
91
|
+
const N = (l) => fe(l);
|
|
90
92
|
return (l, g) => {
|
|
91
93
|
var S;
|
|
92
94
|
return ((S = w.value) == null ? void 0 : S.length) > 0 ? (f(), C("div", ke, [
|
|
@@ -107,7 +109,7 @@ const x = [
|
|
|
107
109
|
])) : I("", !0);
|
|
108
110
|
};
|
|
109
111
|
}
|
|
110
|
-
},
|
|
112
|
+
}, pe = /* @__PURE__ */ ne(Ce, [["__scopeId", "data-v-869e6e20"]]), be = { class: "add-model-content" }, we = {
|
|
111
113
|
key: 0,
|
|
112
114
|
class: "model-import-data"
|
|
113
115
|
}, je = { class: "import-button" }, Se = { key: 0 }, xe = {
|
|
@@ -138,15 +140,15 @@ const x = [
|
|
|
138
140
|
},
|
|
139
141
|
emits: ["change"],
|
|
140
142
|
setup(F, { emit: B }) {
|
|
141
|
-
const e = F, $ = B, h = _(""),
|
|
143
|
+
const e = F, $ = B, h = _(""), p = _([]), b = _(0), w = ee(E);
|
|
142
144
|
he(E);
|
|
143
145
|
const { itemData: L, originalData: D } = te(w), N = _(null), l = _(0), g = _(""), S = () => {
|
|
144
|
-
|
|
146
|
+
b.value = window.innerWidth;
|
|
145
147
|
}, c = async (o) => {
|
|
146
148
|
var u;
|
|
147
149
|
const a = (u = k(o == null ? void 0 : o.wholeValue)) == null ? void 0 : u.map((n) => {
|
|
148
|
-
var
|
|
149
|
-
return (n == null ? void 0 : n.comp) === "Form" && (n.compData = (
|
|
150
|
+
var d;
|
|
151
|
+
return (n == null ? void 0 : n.comp) === "Form" && (n.compData = (d = n.compData) == null ? void 0 : d.map((y) => ((y == null ? void 0 : y.key) === "formContent" && (y.contents = ge(y == null ? void 0 : y.contents)), y))), n;
|
|
150
152
|
});
|
|
151
153
|
$("change", {
|
|
152
154
|
originalContents: D.value,
|
|
@@ -159,8 +161,8 @@ const x = [
|
|
|
159
161
|
var u;
|
|
160
162
|
let a = [];
|
|
161
163
|
return (u = k(o)) == null || u.forEach((n) => {
|
|
162
|
-
var
|
|
163
|
-
x != null && x.find((t) => (t == null ? void 0 : t.value) === (n == null ? void 0 : n.comp)) && a.push(((
|
|
164
|
+
var d, y;
|
|
165
|
+
x != null && x.find((t) => (t == null ? void 0 : t.value) === (n == null ? void 0 : n.comp)) && a.push(((d = x == null ? void 0 : x.find((t) => (t == null ? void 0 : t.value) === (n == null ? void 0 : n.comp))) == null ? void 0 : d.key) + "=" + n.name + "/r/n"), (y = n == null ? void 0 : n.compData) == null || y.forEach((t) => {
|
|
164
166
|
var M, R, z, W, q, G, H, K, P, Q, U, X;
|
|
165
167
|
if (s != null && s.find((i) => (i == null ? void 0 : i.value) === (t == null ? void 0 : t.key)))
|
|
166
168
|
if (!((M = t == null ? void 0 : t.contents) != null && M.length))
|
|
@@ -169,21 +171,21 @@ const x = [
|
|
|
169
171
|
let i = (z = t == null ? void 0 : t.contents) == null ? void 0 : z[0];
|
|
170
172
|
if (!i) return;
|
|
171
173
|
if (Object.keys(i).includes("label") && Object.keys(i).includes("key") && Object.keys(i).includes("width"))
|
|
172
|
-
if (((q = (W = t.contents) == null ? void 0 : W.filter((
|
|
173
|
-
const
|
|
174
|
-
a.push(((H = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.value) === (t == null ? void 0 : t.key))) == null ? void 0 : H.key) + "=" + JSON.stringify(
|
|
174
|
+
if (((q = (W = t.contents) == null ? void 0 : W.filter((m) => m.width !== 1)) == null ? void 0 : q.length) === 0) {
|
|
175
|
+
const m = (G = k(t == null ? void 0 : t.contents)) == null ? void 0 : G.map((r) => ({ [r.label]: r.value }));
|
|
176
|
+
a.push(((H = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.value) === (t == null ? void 0 : t.key))) == null ? void 0 : H.key) + "=" + JSON.stringify(m) + "/r/n");
|
|
175
177
|
} else {
|
|
176
|
-
let
|
|
178
|
+
let m = [];
|
|
177
179
|
(K = k(t == null ? void 0 : t.contents)) == null || K.reduce((r, J) => {
|
|
178
180
|
var Y;
|
|
179
|
-
return r[J.label] = J.key, ((Y = Object.keys(k(r))) == null ? void 0 : Y.length) >= J.width && (
|
|
180
|
-
}, {}), a.push(((P = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.value) === (t == null ? void 0 : t.key))) == null ? void 0 : P.key) + "=" + JSON.stringify(
|
|
181
|
+
return r[J.label] = J.key, ((Y = Object.keys(k(r))) == null ? void 0 : Y.length) >= J.width && (m.push(k(r)), r = {}), r;
|
|
182
|
+
}, {}), a.push(((P = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.value) === (t == null ? void 0 : t.key))) == null ? void 0 : P.key) + "=" + JSON.stringify(m) + "/r/n");
|
|
181
183
|
}
|
|
182
184
|
else if (Object.keys(i).includes("label")) {
|
|
183
|
-
const
|
|
184
|
-
a.push(((U = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.value) === (t == null ? void 0 : t.key))) == null ? void 0 : U.key) + "=" + JSON.stringify(
|
|
185
|
+
const m = (Q = k(t == null ? void 0 : t.contents)) == null ? void 0 : Q.map((r) => r.label);
|
|
186
|
+
a.push(((U = s == null ? void 0 : s.find((r) => (r == null ? void 0 : r.value) === (t == null ? void 0 : t.key))) == null ? void 0 : U.key) + "=" + JSON.stringify(m) + "/r/n");
|
|
185
187
|
} else
|
|
186
|
-
a.push(((X = s == null ? void 0 : s.find((
|
|
188
|
+
a.push(((X = s == null ? void 0 : s.find((m) => (m == null ? void 0 : m.value) === (t == null ? void 0 : t.key))) == null ? void 0 : X.key) + "=" + JSON.stringify(t == null ? void 0 : t.contents) + "/r/n");
|
|
187
189
|
}
|
|
188
190
|
});
|
|
189
191
|
}), JSON.stringify(a);
|
|
@@ -196,8 +198,8 @@ const x = [
|
|
|
196
198
|
u.onload = (n) => {
|
|
197
199
|
try {
|
|
198
200
|
h.value = n.target.result, T.value = re(n.target.result), l.value++;
|
|
199
|
-
} catch (
|
|
200
|
-
console.error("解析失败:",
|
|
201
|
+
} catch (d) {
|
|
202
|
+
console.error("解析失败:", d);
|
|
201
203
|
}
|
|
202
204
|
}, u.onerror = (n) => {
|
|
203
205
|
console.error("文件读取错误:", n);
|
|
@@ -208,7 +210,7 @@ const x = [
|
|
|
208
210
|
}), V(
|
|
209
211
|
() => [e == null ? void 0 : e.content, e == null ? void 0 : e.jsonContents],
|
|
210
212
|
() => {
|
|
211
|
-
h.value = e == null ? void 0 : e.content,
|
|
213
|
+
h.value = e == null ? void 0 : e.content, p.value = e == null ? void 0 : e.jsonContents;
|
|
212
214
|
},
|
|
213
215
|
{ deep: !0, immediate: !0 }
|
|
214
216
|
), V(
|
|
@@ -226,9 +228,9 @@ const x = [
|
|
|
226
228
|
return JSON.parse(a);
|
|
227
229
|
} catch (u) {
|
|
228
230
|
try {
|
|
229
|
-
const
|
|
230
|
-
if (Array.isArray(
|
|
231
|
-
return
|
|
231
|
+
const d = new Function(`return ${a}`)();
|
|
232
|
+
if (Array.isArray(d) || typeof d == "object")
|
|
233
|
+
return d;
|
|
232
234
|
throw new Error(`解析结果不是有效的数组或对象: ${u}`);
|
|
233
235
|
} catch (n) {
|
|
234
236
|
throw new Error(`无法解析JSON: ${n.message}`);
|
|
@@ -237,7 +239,7 @@ const x = [
|
|
|
237
239
|
};
|
|
238
240
|
return (o, a) => {
|
|
239
241
|
var u;
|
|
240
|
-
return f(), C("div",
|
|
242
|
+
return f(), C("div", be, [
|
|
241
243
|
((u = e == null ? void 0 : e.jsonContents) == null ? void 0 : u.length) === 0 ? (f(), C("div", we, [
|
|
242
244
|
O("div", je, [
|
|
243
245
|
O("input", {
|
|
@@ -257,30 +259,30 @@ const x = [
|
|
|
257
259
|
])) : I("", !0),
|
|
258
260
|
(e == null ? void 0 : e.mode) === "edit" ? (f(), C("div", xe, [
|
|
259
261
|
O("div", Oe, [
|
|
260
|
-
A(
|
|
262
|
+
A(ie)
|
|
261
263
|
]),
|
|
262
264
|
(f(), C("div", {
|
|
263
265
|
class: "model-show",
|
|
264
|
-
key:
|
|
266
|
+
key: b.value
|
|
265
267
|
}, [
|
|
266
|
-
A(
|
|
268
|
+
A(me)
|
|
267
269
|
])),
|
|
268
270
|
O("div", Ie, [
|
|
269
|
-
A(
|
|
271
|
+
A(de)
|
|
270
272
|
])
|
|
271
273
|
])) : I("", !0),
|
|
272
274
|
(e == null ? void 0 : e.mode) === "view" ? (f(), C("div", Ne, [
|
|
273
|
-
(f(), Z(
|
|
275
|
+
(f(), Z(pe, {
|
|
274
276
|
content: h.value,
|
|
275
277
|
onChange: c,
|
|
276
|
-
jsonContents:
|
|
277
|
-
key:
|
|
278
|
+
jsonContents: p.value,
|
|
279
|
+
key: b.value
|
|
278
280
|
}, null, 8, ["content", "jsonContents"]))
|
|
279
281
|
])) : I("", !0)
|
|
280
282
|
]);
|
|
281
283
|
};
|
|
282
284
|
}
|
|
283
|
-
},
|
|
285
|
+
}, Ee = /* @__PURE__ */ ne(Te, [["__scopeId", "data-v-b25bde75"]]);
|
|
284
286
|
export {
|
|
285
|
-
|
|
287
|
+
Ee as default
|
|
286
288
|
};
|