ss-component-new 1.3.658 → 1.3.660
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-BZ_eTSzz.js +16638 -0
- package/dist/config.js +1 -1
- package/dist/{index-ChNfRlIP.js → index-BofWylNB.js} +42 -18
- package/dist/index-C5rFKP3J.js +1042 -0
- package/dist/index-CLw1Ncst.js +181 -0
- package/dist/index-Cz0F1nRr.js +8236 -0
- package/dist/index-p2dYw5GI.js +49 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-DwbHXtUp.js → index.vue_vue_type_script_setup_true_lang-DRzriV-s.js} +2 -2
- package/dist/ss-component.css +2 -8
- package/dist/ss-component.js +214 -67
- package/dist/ss-component2.js +15 -75
- package/dist/ss-component3.js +785 -9
- package/package.json +4 -4
- package/public/config.js +1 -1
- package/dist/MTLLoader-DI0avKtj.js +0 -657
- package/dist/URDFLoader-PUxvYFDe.js +0 -2304
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/animationData-05aVUytq.js +0 -83
- package/dist/array-ZM04o_us.js +0 -1044
- package/dist/clone-Ddn1p6-1.js +0 -8
- package/dist/eleIcon-BWVKfp5t.js +0 -29
- package/dist/iconfont-BNdGaGPn.js +0 -1018
- package/dist/icons/svg/Update.svg +0 -1
- package/dist/icons/svg/functionList.svg +0 -1
- package/dist/icons/svg/uploadCopy.svg +0 -1
- package/dist/index-9ruiIh9Q.js +0 -30
- package/dist/index-BAenzdfB.js +0 -83
- package/dist/index-BDhIWgKn.js +0 -658
- package/dist/index-BFqUz4pN.js +0 -52
- package/dist/index-BIAWyba9.js +0 -2623
- package/dist/index-BKJ5SfU0.js +0 -98
- package/dist/index-BMr09Ruf.js +0 -107
- package/dist/index-BOGJMjxF.js +0 -117
- package/dist/index-BP1mKUQP.js +0 -627
- package/dist/index-BczRQX8N.js +0 -407
- package/dist/index-BnrvtCYj.js +0 -55
- package/dist/index-Bpr501oZ.js +0 -78
- package/dist/index-Bs7vFXNW.js +0 -93
- package/dist/index-BvbZiTVB.js +0 -342
- package/dist/index-Bvvz41NY.js +0 -44
- package/dist/index-C2YKgxwc.js +0 -61990
- package/dist/index-C9DBY1gg.js +0 -103
- package/dist/index-CFFbhR3G.js +0 -996
- package/dist/index-COr2mcbl.js +0 -48
- package/dist/index-CV_jQDcg.js +0 -9
- package/dist/index-CXe4q28L.js +0 -447
- package/dist/index-CsxH-GEh.js +0 -24847
- package/dist/index-D-5v1Jx7.js +0 -93
- package/dist/index-D4LcEpQ7.js +0 -619
- package/dist/index-DGObzWyL.js +0 -8984
- package/dist/index-DJ59jXR0.js +0 -28483
- package/dist/index-DJrzqi4-.js +0 -209
- package/dist/index-D_kI6aHR.js +0 -98
- package/dist/index-Ddhx18T9.js +0 -864
- package/dist/index-Dr9Wt5nC.js +0 -84
- package/dist/index-Dwt0Wlg_.js +0 -201
- package/dist/index-EGwObkob.js +0 -468
- package/dist/index-WPJbEuld.js +0 -62
- package/dist/index-YVR3acYT.js +0 -61
- package/dist/index-dD-mKgue.js +0 -27
- package/dist/index-lHjuVdOp.js +0 -11773
- package/dist/index-uF-ibwG0.js +0 -9
- package/dist/index.vue_vue_type_style_index_0_scoped_39e1db95_lang-CG9X8aa2.js +0 -137728
- package/dist/isString-CoCw_sp3.js +0 -8
- package/dist/localIcon-CoJHw5ss.js +0 -76
- package/dist/main-Bs7Y7gDm.js +0 -502
- package/dist/menuIndex-Dt0NyAyE.js +0 -159
- package/dist/request-DiogHwkN.js +0 -9465
- package/dist/threeModel-C3x2TmUN.js +0 -1108
- package/dist/threePreview-BHLSA5YS.js +0 -2259
- package/dist/threeSceneView-mfAIunaw.js +0 -1289
- package/dist/threeSceneViewForCPMPIP-DrnsTNPv.js +0 -538
- package/dist/threeTrackPathView-BR8-g2Tr.js +0 -620
- package/dist/threeViewerHost-DbJCLcbz.js +0 -233
- package/dist/urdfTree-IEJgkVzs.js +0 -254
- package/dist/workpieceTreePanel-aZV2ut3W.js +0 -555
- package/public/icons/svg/Update.svg +0 -1
- package/public/icons/svg/functionList.svg +0 -1
- package/public/icons/svg/uploadCopy.svg +0 -1
- /package/dist/icons/svg/{tableClose.svg → table-close.svg} +0 -0
- /package/dist/icons/svg/{tableExpand.svg → table-expand.svg} +0 -0
- /package/public/icons/svg/{tableClose.svg → table-close.svg} +0 -0
- /package/public/icons/svg/{tableExpand.svg → table-expand.svg} +0 -0
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { defineComponent as k, resolveComponent as t, openBlock as o, createElementBlock as s, createVNode as i, withCtx as l, createBlock as c, Fragment as C, renderList as w, createElementVNode as v, normalizeClass as b, createCommentVNode as a } from "vue";
|
|
2
|
-
import { _ as B } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
3
|
-
const I = { class: "icon-selector-warp-row" }, N = ["title"], S = /* @__PURE__ */ k({
|
|
4
|
-
__name: "localIcon",
|
|
5
|
-
props: {
|
|
6
|
-
// 图标列表数据
|
|
7
|
-
list: {
|
|
8
|
-
type: Array,
|
|
9
|
-
default: () => []
|
|
10
|
-
},
|
|
11
|
-
// 自定义空状态描述文字
|
|
12
|
-
empty: {
|
|
13
|
-
type: String,
|
|
14
|
-
default: () => "无相关图标"
|
|
15
|
-
},
|
|
16
|
-
// 高亮当前选中图标
|
|
17
|
-
prefix: {
|
|
18
|
-
type: String,
|
|
19
|
-
default: () => ""
|
|
20
|
-
}
|
|
21
|
-
},
|
|
22
|
-
emits: ["get-icon"],
|
|
23
|
-
setup(e, { emit: m }) {
|
|
24
|
-
const p = e, _ = m, d = (r) => {
|
|
25
|
-
_("get-icon", r);
|
|
26
|
-
};
|
|
27
|
-
return (r, V) => {
|
|
28
|
-
const u = t("svg-icon"), f = t("el-col"), g = t("el-row"), y = t("el-empty"), x = t("el-scrollbar");
|
|
29
|
-
return o(), s("div", I, [
|
|
30
|
-
i(x, { ref: "selectorScrollbarRef" }, {
|
|
31
|
-
default: l(() => [
|
|
32
|
-
p.list.length > 0 ? (o(), c(g, {
|
|
33
|
-
key: 0,
|
|
34
|
-
gutter: 10
|
|
35
|
-
}, {
|
|
36
|
-
default: l(() => [
|
|
37
|
-
(o(!0), s(C, null, w(e.list, (n, h) => (o(), c(f, {
|
|
38
|
-
xs: 6,
|
|
39
|
-
sm: 4,
|
|
40
|
-
md: 4,
|
|
41
|
-
lg: 4,
|
|
42
|
-
xl: 4,
|
|
43
|
-
key: h,
|
|
44
|
-
onClick: (z) => d(n)
|
|
45
|
-
}, {
|
|
46
|
-
default: l(() => [
|
|
47
|
-
v("div", {
|
|
48
|
-
class: b(["icon-selector-warp-item", { "icon-selector-active": e.prefix === n }]),
|
|
49
|
-
title: n
|
|
50
|
-
}, [
|
|
51
|
-
i(u, {
|
|
52
|
-
name: n,
|
|
53
|
-
style: { width: "16px", height: "16px" }
|
|
54
|
-
}, null, 8, ["name"])
|
|
55
|
-
], 10, N)
|
|
56
|
-
]),
|
|
57
|
-
_: 2
|
|
58
|
-
}, 1032, ["onClick"]))), 128))
|
|
59
|
-
]),
|
|
60
|
-
_: 1
|
|
61
|
-
})) : a("", !0),
|
|
62
|
-
e.list.length <= 0 ? (o(), c(y, {
|
|
63
|
-
key: 1,
|
|
64
|
-
"image-size": 100,
|
|
65
|
-
description: e.empty
|
|
66
|
-
}, null, 8, ["description"])) : a("", !0)
|
|
67
|
-
]),
|
|
68
|
-
_: 1
|
|
69
|
-
}, 512)
|
|
70
|
-
]);
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
}), F = /* @__PURE__ */ B(S, [["__scopeId", "data-v-83734c33"]]);
|
|
74
|
-
export {
|
|
75
|
-
F as default
|
|
76
|
-
};
|
package/dist/main-Bs7Y7gDm.js
DELETED
|
@@ -1,502 +0,0 @@
|
|
|
1
|
-
import { ref as U, watch as v, openBlock as I, createElementBlock as E, Fragment as de, renderList as fe, createElementVNode as S, toDisplayString as se, createBlock as oe, resolveDynamicComponent as ye, createCommentVNode as q, onMounted as he, onUnmounted as ke, createVNode as te } from "vue";
|
|
2
|
-
import { m as ge, a as _e, b as Ce, c as be } from "./array-ZM04o_us.js";
|
|
3
|
-
import { c, a as ce, p as re, s as ue, u as Oe } from "./index-DGObzWyL.js";
|
|
4
|
-
import { g as Ae } from "./index-C2YKgxwc.js";
|
|
5
|
-
import { v as H, a as K } from "./index-DJ59jXR0.js";
|
|
6
|
-
import { _ as pe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
|
-
const B = [
|
|
8
|
-
{
|
|
9
|
-
key: "FormName",
|
|
10
|
-
value: "Form"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
key: "TableName",
|
|
14
|
-
value: "Table"
|
|
15
|
-
}
|
|
16
|
-
], A = [
|
|
17
|
-
{
|
|
18
|
-
key: "FormDirect",
|
|
19
|
-
value: "formFlex"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
key: "Form",
|
|
23
|
-
value: "formContent"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
key: "FormButton",
|
|
27
|
-
value: "formButton"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
key: "TableColumns",
|
|
31
|
-
value: "header"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
key: "TableButton",
|
|
35
|
-
value: "extraButton"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
key: "LineButton",
|
|
39
|
-
value: "rowButton"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
key: "Table",
|
|
43
|
-
value: "tableContents"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
key: "TableIndex",
|
|
47
|
-
value: "tableIndex"
|
|
48
|
-
}
|
|
49
|
-
];
|
|
50
|
-
U(0);
|
|
51
|
-
U(0);
|
|
52
|
-
U(1);
|
|
53
|
-
const je = (s) => {
|
|
54
|
-
let i;
|
|
55
|
-
s.replaceAll(" ", `\r
|
|
56
|
-
`).replaceAll(`
|
|
57
|
-
`, `\r
|
|
58
|
-
`).includes(`\r
|
|
59
|
-
`) ? i = s.replaceAll(`
|
|
60
|
-
`, `\r
|
|
61
|
-
`).replaceAll(" ", `\r
|
|
62
|
-
`).split(`\r
|
|
63
|
-
`).filter((l) => l.trim() !== "") : i = s.replaceAll(" ", `\r
|
|
64
|
-
`).split(`
|
|
65
|
-
`).filter((l) => l.trim() !== "");
|
|
66
|
-
const e = [];
|
|
67
|
-
let t = "";
|
|
68
|
-
for (const l of i)
|
|
69
|
-
l.includes("{") || t.includes("{") || l.includes("[") || t.includes("[") || l.includes("【") || t.includes("【") || l.includes("(") || t.includes("(") || l.includes("(") || t.includes("(") || l.includes("/*") || t.includes("/*") ? (t += l.trim(), c(t).split("{").length - 1 === c(t).split("}").length - 1 && c(t).split("【").length - 1 === c(t).split("】").length - 1 && c(t).split("[").length - 1 === c(t).split("]").length - 1 && c(t).split("(").length - 1 === c(t).split(")").length - 1 && c(t).split("(").length - 1 === c(t).split(")").length - 1 && c(t).split("/*").length - 1 === c(t).split("*/").length - 1 && t[t.length - 1] !== "," ? (e.push(t.replace(/\/\*[\s\S]*?\*\//g, "")), t = "") : t != null && t.includes("*/") && (t = t.replace(/\/\*[\s\S]*?\*\//g, ""))) : e.push(l.trim().replace(/\/\*[\s\S]*?\*\//g, ""));
|
|
70
|
-
return e;
|
|
71
|
-
}, X = U(0), ne = U(0), $e = (s) => {
|
|
72
|
-
const i = s.trim().replace(/^'|'$/g, ""), e = /((?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.*?)(?=\s*(?:(?:\$?[a-zA-Z_][a-zA-Z0-9_]*\$?\([^)]*\))|[a-zA-Z_][a-zA-Z0-9_]*)\s*=|$)/g, t = {};
|
|
73
|
-
let l;
|
|
74
|
-
for (; (l = e.exec(i)) !== null; ) {
|
|
75
|
-
const f = l[1];
|
|
76
|
-
let y = l[2].trim();
|
|
77
|
-
(y.match(/\[/g) || []).length !== (y.match(/\]/g) || []).length && (y = y == null ? void 0 : y.replace(/]$/, "")), t[f] ? (t[f + ne.value] && ne.value++, t[f + ne.value] = f + "=" + y) : t[f] = f + "=" + y;
|
|
78
|
-
}
|
|
79
|
-
return t;
|
|
80
|
-
}, ie = (s) => {
|
|
81
|
-
const [i, e] = s.split("=").map((f) => f.trim()), t = i.replace(/['"]/g, ""), l = e.replace(/^['"]|['"]$/g, "");
|
|
82
|
-
return { key: t, value: l };
|
|
83
|
-
}, De = (s) => {
|
|
84
|
-
var y;
|
|
85
|
-
let i = [];
|
|
86
|
-
const [e, t] = s.split(/=(.+)/), l = e.replace(/['"]/g, "").trim(), f = t.replace(/^['"]|['"]$/g, "");
|
|
87
|
-
return (y = Object.values($e(f))) == null || y.forEach((g) => {
|
|
88
|
-
i.push(ie(g));
|
|
89
|
-
}), { key: l, value: i };
|
|
90
|
-
}, Y = (s) => {
|
|
91
|
-
try {
|
|
92
|
-
return JSON.parse(s), !0;
|
|
93
|
-
} catch {
|
|
94
|
-
return !1;
|
|
95
|
-
}
|
|
96
|
-
}, me = (s) => {
|
|
97
|
-
try {
|
|
98
|
-
const i = s.replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",").replace(/:/g, ":").replace(/:\s*(?=,|}|$)/g, ': ""');
|
|
99
|
-
if (c(i).split("{").length - 1 > 1) {
|
|
100
|
-
let e = c(i).replace(/^\{(.*)\}$/, "[$1]");
|
|
101
|
-
if (Y(e) && !e.includes("$") || (e = e.replace(/"([^"]+)"\$([\w\u4e00-\u9fa5]+\([^)]*\))/g, '"$1$$$2"')), Y(e)) {
|
|
102
|
-
const t = JSON.parse(e);
|
|
103
|
-
let l = [];
|
|
104
|
-
return t == null || t.forEach((f) => {
|
|
105
|
-
var y;
|
|
106
|
-
(y = Object.entries(c(f))) == null || y.forEach((g) => {
|
|
107
|
-
X.value++, l.push({
|
|
108
|
-
id: X.value,
|
|
109
|
-
key: (g == null ? void 0 : g[0]) ?? "",
|
|
110
|
-
value: (g == null ? void 0 : g[1]) === "" ? "" : g == null ? void 0 : g[1],
|
|
111
|
-
// 如果值为空,则key设为空字符串,否则保留原值
|
|
112
|
-
width: Object.keys(c(f)).length
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
}), l;
|
|
116
|
-
} else
|
|
117
|
-
return console.error("转换类型不正确:"), [];
|
|
118
|
-
} else if (Y(i)) {
|
|
119
|
-
const e = JSON.parse(i);
|
|
120
|
-
return Object.entries(e).map(([t, l]) => (X.value++, {
|
|
121
|
-
id: X.value,
|
|
122
|
-
key: t,
|
|
123
|
-
value: l === "" ? "" : l,
|
|
124
|
-
// 如果值为空,则key设为空字符串,否则保留原值
|
|
125
|
-
width: 1
|
|
126
|
-
}));
|
|
127
|
-
} else
|
|
128
|
-
return i;
|
|
129
|
-
} catch (i) {
|
|
130
|
-
return console.error("转换失败:", i), [];
|
|
131
|
-
}
|
|
132
|
-
}, Ne = (s, i) => {
|
|
133
|
-
var e;
|
|
134
|
-
try {
|
|
135
|
-
if ((e = H) != null && e.find((t) => (t == null ? void 0 : t.key) === i))
|
|
136
|
-
return JSON.parse(s.replace(/[’]|[‘]|[']/g, '"'));
|
|
137
|
-
if (c(s).split("[").length - 1 > 1) {
|
|
138
|
-
const t = c(s).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
139
|
-
return JSON.parse(t);
|
|
140
|
-
} else {
|
|
141
|
-
const t = c(s).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",");
|
|
142
|
-
if (Y(t)) {
|
|
143
|
-
const l = JSON.parse(t);
|
|
144
|
-
return Array.isArray(l) ? l.map((f) => ({ label: f })) : l;
|
|
145
|
-
} else
|
|
146
|
-
return me(c(s));
|
|
147
|
-
}
|
|
148
|
-
} catch (t) {
|
|
149
|
-
return console.error("解析失败:", t), s;
|
|
150
|
-
}
|
|
151
|
-
}, xe = (s) => ({ [s == null ? void 0 : s.key]: Ne(s == null ? void 0 : s.value, s == null ? void 0 : s.key) }), Ue = (s) => {
|
|
152
|
-
try {
|
|
153
|
-
if (c(s).split("[").length - 1 > 1) {
|
|
154
|
-
const i = c(s).replace(/[’]|[‘]|[']/g, '"').replaceAll(/,/g, ",").replaceAll("(", "[").replaceAll(")", "]").replaceAll("],]", "]]");
|
|
155
|
-
return JSON.parse(i);
|
|
156
|
-
} else
|
|
157
|
-
return JSON.parse(c(s).replace(/[’]|[‘]|[']/g, '"').replace(/,/g, ",")).map((e) => ({ label: e }));
|
|
158
|
-
} catch (i) {
|
|
159
|
-
return console.error("解析失败:", i), s;
|
|
160
|
-
}
|
|
161
|
-
}, Je = (s) => {
|
|
162
|
-
var i, e, t, l, f, y;
|
|
163
|
-
try {
|
|
164
|
-
const g = je((e = (i = c(s)) == null ? void 0 : i.replace("(", "(")) == null ? void 0 : e.replace(")", ")")), Q = (t = c(g)) == null ? void 0 : t.map((n) => {
|
|
165
|
-
var p, u;
|
|
166
|
-
let k = (u = (p = c(n)) == null ? void 0 : p.split("=")) == null ? void 0 : u[0];
|
|
167
|
-
return k != null && k.includes("GroupContents") ? De(n) : ie(n);
|
|
168
|
-
}), b = [];
|
|
169
|
-
(l = c(Q)) == null || l.forEach((n) => {
|
|
170
|
-
var k, p, u, N, C, T, w, F, d;
|
|
171
|
-
(k = H) != null && k.find((a) => {
|
|
172
|
-
var m, o;
|
|
173
|
-
return ((m = a == null ? void 0 : a.key) == null ? void 0 : m.toUpperCase()) === ((o = n == null ? void 0 : n.key) == null ? void 0 : o.toUpperCase());
|
|
174
|
-
}) ? b.push({
|
|
175
|
-
comp: ((u = (p = H) == null ? void 0 : p.find((a) => {
|
|
176
|
-
var m, o;
|
|
177
|
-
return ((m = a == null ? void 0 : a.key) == null ? void 0 : m.toUpperCase()) === ((o = n == null ? void 0 : n.key) == null ? void 0 : o.toUpperCase());
|
|
178
|
-
})) == null ? void 0 : u.value) ?? "",
|
|
179
|
-
name: (N = n == null ? void 0 : n.value) == null ? void 0 : N.replace(/[’]|[‘]|[']/g, ""),
|
|
180
|
-
compData: []
|
|
181
|
-
}) : (C = K) != null && C.find((a) => {
|
|
182
|
-
var m, o;
|
|
183
|
-
return ((m = a == null ? void 0 : a.key) == null ? void 0 : m.toUpperCase()) === ((o = n == null ? void 0 : n.key) == null ? void 0 : o.toUpperCase());
|
|
184
|
-
}) && ((b == null ? void 0 : b.length) === 0 && (T = n.key) != null && T.includes("Menus") && b.push({
|
|
185
|
-
comp: "Menu",
|
|
186
|
-
name: "",
|
|
187
|
-
compData: []
|
|
188
|
-
}), (w = b == null ? void 0 : b[(b == null ? void 0 : b.length) - 1]) != null && w.compData && b[(b == null ? void 0 : b.length) - 1].compData.push({
|
|
189
|
-
key: (d = (F = K) == null ? void 0 : F.find((a) => {
|
|
190
|
-
var m, o;
|
|
191
|
-
return ((m = a == null ? void 0 : a.key) == null ? void 0 : m.toUpperCase()) === ((o = n == null ? void 0 : n.key) == null ? void 0 : o.toUpperCase());
|
|
192
|
-
})) == null ? void 0 : d.value,
|
|
193
|
-
contents: n == null ? void 0 : n.value
|
|
194
|
-
}));
|
|
195
|
-
});
|
|
196
|
-
let z = (f = c(b)) == null ? void 0 : f.map((n) => {
|
|
197
|
-
var k;
|
|
198
|
-
return n != null && n.compData && (n.compData = (k = n == null ? void 0 : n.compData) == null ? void 0 : k.map((p) => {
|
|
199
|
-
var u, N, C, T, w, F, d, a, m, o, j;
|
|
200
|
-
if ((p == null ? void 0 : p.key) === "formFlex")
|
|
201
|
-
p.contents = ((N = (u = p.contents) == null ? void 0 : u.replace(/[’]|[‘]|[']/g, "")) == null ? void 0 : N.toUpperCase()) !== "Vertical".toUpperCase();
|
|
202
|
-
else if ((p == null ? void 0 : p.key) === "groupContents")
|
|
203
|
-
p.contents = (C = c(p.contents)) == null ? void 0 : C.map((x) => xe(c(x)));
|
|
204
|
-
else if (((w = (T = p.contents) == null ? void 0 : T.trim()) != null && w.startsWith("[") || (d = (F = p.contents) == null ? void 0 : F.trim()) != null && d.startsWith("【")) && ((m = (a = p.contents) == null ? void 0 : a.trim()) != null && m.endsWith("]") || (j = (o = p.contents) == null ? void 0 : o.trim()) != null && j.endsWith("】")))
|
|
205
|
-
p.contents = Ue(c(p.contents));
|
|
206
|
-
else {
|
|
207
|
-
if (!p.contents) return;
|
|
208
|
-
p.contents = me(c(p.contents));
|
|
209
|
-
}
|
|
210
|
-
return p;
|
|
211
|
-
})), n;
|
|
212
|
-
});
|
|
213
|
-
return z = (y = c(z)) == null ? void 0 : y.map((n) => {
|
|
214
|
-
var k;
|
|
215
|
-
return (n == null ? void 0 : n.comp) === "Group" && (n.compData = (k = n.compData) == null ? void 0 : k.map((p) => {
|
|
216
|
-
var N;
|
|
217
|
-
let u = [];
|
|
218
|
-
return (N = p.contents) == null || N.forEach((C) => {
|
|
219
|
-
var T, w, F, d, a, m, o, j, x, r, Z, M, W, L, G, P, R;
|
|
220
|
-
if ((T = H) != null && T.find((h) => {
|
|
221
|
-
var O, $, D;
|
|
222
|
-
return ((O = h == null ? void 0 : h.key) == null ? void 0 : O.toUpperCase()) === ((D = ($ = Object.keys(C)) == null ? void 0 : $[0]) == null ? void 0 : D.toUpperCase());
|
|
223
|
-
}))
|
|
224
|
-
u.push({
|
|
225
|
-
comp: (F = (w = H) == null ? void 0 : w.find((h) => {
|
|
226
|
-
var O, $, D;
|
|
227
|
-
return ((O = h == null ? void 0 : h.key) == null ? void 0 : O.toUpperCase()) === ((D = ($ = Object.keys(C)) == null ? void 0 : $[0]) == null ? void 0 : D.toUpperCase());
|
|
228
|
-
})) == null ? void 0 : F.value,
|
|
229
|
-
name: (a = (d = Object.values(C)) == null ? void 0 : d[0]) == null ? void 0 : a.replace(/[’]|[‘]|[']/g, ""),
|
|
230
|
-
compData: []
|
|
231
|
-
});
|
|
232
|
-
else if ((m = K) != null && m.find((h) => {
|
|
233
|
-
var O, $, D;
|
|
234
|
-
return ((O = h == null ? void 0 : h.key) == null ? void 0 : O.toUpperCase()) === ((D = ($ = Object.keys(C)) == null ? void 0 : $[0]) == null ? void 0 : D.toUpperCase());
|
|
235
|
-
})) {
|
|
236
|
-
if ((u == null ? void 0 : u.length) === 0) return;
|
|
237
|
-
(o = u == null ? void 0 : u[(u == null ? void 0 : u.length) - 1]) != null && o.compData && u[(u == null ? void 0 : u.length) - 1].compData.push({
|
|
238
|
-
key: (x = (j = K) == null ? void 0 : j.find((h) => {
|
|
239
|
-
var O, $, D;
|
|
240
|
-
return ((O = h == null ? void 0 : h.key) == null ? void 0 : O.toUpperCase()) === ((D = ($ = Object.keys(C)) == null ? void 0 : $[0]) == null ? void 0 : D.toUpperCase());
|
|
241
|
-
})) == null ? void 0 : x.value,
|
|
242
|
-
contents: (r = Object.values(C)) == null ? void 0 : r[0]
|
|
243
|
-
});
|
|
244
|
-
} else if ((M = (Z = Object.keys(C)) == null ? void 0 : Z[0]) != null && M.includes("$")) {
|
|
245
|
-
const h = (L = (W = Object.keys(c(C))) == null ? void 0 : W[0]) == null ? void 0 : L.split("$");
|
|
246
|
-
u[(u == null ? void 0 : u.length) - 1].compData.push({
|
|
247
|
-
key: (P = (G = K) == null ? void 0 : G.find((O) => {
|
|
248
|
-
var $, D;
|
|
249
|
-
return (($ = O == null ? void 0 : O.key) == null ? void 0 : $.toUpperCase()) === ((D = h == null ? void 0 : h[0]) == null ? void 0 : D.toUpperCase());
|
|
250
|
-
})) == null ? void 0 : P.value,
|
|
251
|
-
contents: (R = Object.values(C)) == null ? void 0 : R[0],
|
|
252
|
-
selectLabel: h == null ? void 0 : h[1]
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
return C;
|
|
256
|
-
}), p.contents = u, p;
|
|
257
|
-
})), n;
|
|
258
|
-
}), z;
|
|
259
|
-
} catch {
|
|
260
|
-
return !1;
|
|
261
|
-
}
|
|
262
|
-
}, Ve = (s) => Je(s), Ie = {
|
|
263
|
-
key: 0,
|
|
264
|
-
class: "show-content"
|
|
265
|
-
}, Te = { class: "item-view-group" }, we = {
|
|
266
|
-
__name: "index",
|
|
267
|
-
props: {
|
|
268
|
-
content: String,
|
|
269
|
-
jsonContents: Array
|
|
270
|
-
},
|
|
271
|
-
emits: ["change"],
|
|
272
|
-
setup(s, { emit: i }) {
|
|
273
|
-
const e = s, t = i, l = ce(re), { itemData: f } = ue(l), y = U([]), g = U([]), Q = (n) => {
|
|
274
|
-
t("change", {
|
|
275
|
-
wholeValue: y.value,
|
|
276
|
-
editValue: n
|
|
277
|
-
});
|
|
278
|
-
}, b = (n) => {
|
|
279
|
-
const k = c(y.value), p = k == null ? void 0 : k.map((u, N) => (N === (n == null ? void 0 : n.index) && (u.compData = n == null ? void 0 : n.contents), u));
|
|
280
|
-
y.value = p;
|
|
281
|
-
};
|
|
282
|
-
v(
|
|
283
|
-
() => f.value,
|
|
284
|
-
() => {
|
|
285
|
-
var n;
|
|
286
|
-
!f.value || ((n = f.value) == null ? void 0 : n.length) === 0 || (g.value = f.value, y.value = f.value);
|
|
287
|
-
},
|
|
288
|
-
{ deep: !0, immediate: !0 }
|
|
289
|
-
), v(
|
|
290
|
-
() => [e == null ? void 0 : e.content, e == null ? void 0 : e.jsonContents],
|
|
291
|
-
() => {
|
|
292
|
-
var k;
|
|
293
|
-
if (((k = e == null ? void 0 : e.jsonContents) == null ? void 0 : k.length) > 0) {
|
|
294
|
-
l.setOriginalData(e == null ? void 0 : e.jsonContents), l.setItemData(e == null ? void 0 : e.jsonContents);
|
|
295
|
-
return;
|
|
296
|
-
}
|
|
297
|
-
if (!(e != null && e.content) || (e == null ? void 0 : e.content) === "") return;
|
|
298
|
-
const n = Ve(e == null ? void 0 : e.content);
|
|
299
|
-
l.setOriginalData(n), l.setItemData(n);
|
|
300
|
-
},
|
|
301
|
-
{ deep: !0, immediate: !0 }
|
|
302
|
-
);
|
|
303
|
-
const z = (n) => Ae(n);
|
|
304
|
-
return (n, k) => {
|
|
305
|
-
var p;
|
|
306
|
-
return ((p = g.value) == null ? void 0 : p.length) > 0 ? (I(), E("div", Ie, [
|
|
307
|
-
(I(!0), E(de, null, fe(g.value, (u, N) => (I(), E("div", {
|
|
308
|
-
class: "item-content",
|
|
309
|
-
key: N
|
|
310
|
-
}, [
|
|
311
|
-
S("div", Te, se(u.name), 1),
|
|
312
|
-
(I(), oe(ye(z(u.comp)), {
|
|
313
|
-
itemData: u == null ? void 0 : u.compData,
|
|
314
|
-
childItemData: u == null ? void 0 : u.itemChildData,
|
|
315
|
-
key: N,
|
|
316
|
-
onChange: Q,
|
|
317
|
-
index: N,
|
|
318
|
-
onContentChange: b
|
|
319
|
-
}, null, 40, ["itemData", "childItemData", "index"]))
|
|
320
|
-
]))), 128))
|
|
321
|
-
])) : q("", !0);
|
|
322
|
-
};
|
|
323
|
-
}
|
|
324
|
-
}, Fe = /* @__PURE__ */ pe(we, [["__scopeId", "data-v-1c04adc8"]]), Ee = { class: "add-model-content" }, ze = {
|
|
325
|
-
key: 0,
|
|
326
|
-
class: "model-import-data"
|
|
327
|
-
}, Be = { class: "import-button" }, Se = { key: 0 }, Ze = {
|
|
328
|
-
key: 1,
|
|
329
|
-
class: "model-operate"
|
|
330
|
-
}, Me = { class: "model-select" }, We = { class: "model-fill" }, Le = {
|
|
331
|
-
key: 2,
|
|
332
|
-
class: "model-view ssComponent"
|
|
333
|
-
}, Ge = {
|
|
334
|
-
__name: "main",
|
|
335
|
-
props: {
|
|
336
|
-
mode: {
|
|
337
|
-
type: String,
|
|
338
|
-
default: "view"
|
|
339
|
-
},
|
|
340
|
-
content: {
|
|
341
|
-
type: String,
|
|
342
|
-
default: ""
|
|
343
|
-
},
|
|
344
|
-
jsonContents: {
|
|
345
|
-
type: Array,
|
|
346
|
-
default: () => []
|
|
347
|
-
},
|
|
348
|
-
showButton: {
|
|
349
|
-
type: Boolean,
|
|
350
|
-
default: !0
|
|
351
|
-
}
|
|
352
|
-
},
|
|
353
|
-
emits: ["change"],
|
|
354
|
-
setup(s, { emit: i }) {
|
|
355
|
-
const e = s, t = i, l = U(""), f = U([]), y = U(0), g = ce(re);
|
|
356
|
-
Oe(re);
|
|
357
|
-
const { itemData: Q, originalData: b } = ue(g), z = U(null), n = U(0), k = U(""), p = () => {
|
|
358
|
-
y.value = window.innerWidth;
|
|
359
|
-
}, u = async (d) => {
|
|
360
|
-
var m;
|
|
361
|
-
const a = (m = c(d == null ? void 0 : d.wholeValue)) == null ? void 0 : m.map((o) => {
|
|
362
|
-
var j;
|
|
363
|
-
return (o == null ? void 0 : o.comp) === "Form" && (o.compData = (j = o.compData) == null ? void 0 : j.map((x) => ((x == null ? void 0 : x.key) === "formContent" && (x.contents = be(x == null ? void 0 : x.contents)), x))), o;
|
|
364
|
-
});
|
|
365
|
-
t("change", {
|
|
366
|
-
originalContents: b.value,
|
|
367
|
-
currentContents: d == null ? void 0 : d.wholeValue,
|
|
368
|
-
editContent: d == null ? void 0 : d.editValue,
|
|
369
|
-
stringContent: N(c(d == null ? void 0 : d.wholeValue)),
|
|
370
|
-
arrayToContents: a
|
|
371
|
-
});
|
|
372
|
-
}, N = (d) => {
|
|
373
|
-
var m;
|
|
374
|
-
let a = [];
|
|
375
|
-
return (m = c(d)) == null || m.forEach((o) => {
|
|
376
|
-
var j, x;
|
|
377
|
-
B != null && B.find((r) => (r == null ? void 0 : r.value) === (o == null ? void 0 : o.comp)) && a.push(((j = B == null ? void 0 : B.find((r) => (r == null ? void 0 : r.value) === (o == null ? void 0 : o.comp))) == null ? void 0 : j.key) + "=" + o.name + "/r/n"), (x = o == null ? void 0 : o.compData) == null || x.forEach((r) => {
|
|
378
|
-
var Z, M, W, L, G, P, R, h, O, $, D, ae;
|
|
379
|
-
if (A != null && A.find((J) => (J == null ? void 0 : J.value) === (r == null ? void 0 : r.key)))
|
|
380
|
-
if (!((Z = r == null ? void 0 : r.contents) != null && Z.length))
|
|
381
|
-
a.push(((M = A == null ? void 0 : A.find((J) => (J == null ? void 0 : J.value) === (r == null ? void 0 : r.key))) == null ? void 0 : M.key) + "=" + (r.contents === !0 ? '""' : "Vertical") + "/r/n");
|
|
382
|
-
else {
|
|
383
|
-
let J = (W = r == null ? void 0 : r.contents) == null ? void 0 : W[0];
|
|
384
|
-
if (!J) return;
|
|
385
|
-
if (Object.keys(J).includes("label") && Object.keys(J).includes("key") && Object.keys(J).includes("width"))
|
|
386
|
-
if (((G = (L = r.contents) == null ? void 0 : L.filter((V) => V.width !== 1)) == null ? void 0 : G.length) === 0) {
|
|
387
|
-
const V = (P = c(r == null ? void 0 : r.contents)) == null ? void 0 : P.map((_) => ({ [_.label]: _.value }));
|
|
388
|
-
a.push(((R = A == null ? void 0 : A.find((_) => (_ == null ? void 0 : _.value) === (r == null ? void 0 : r.key))) == null ? void 0 : R.key) + "=" + JSON.stringify(V) + "/r/n");
|
|
389
|
-
} else {
|
|
390
|
-
let V = [];
|
|
391
|
-
(h = c(r == null ? void 0 : r.contents)) == null || h.reduce((_, ee) => {
|
|
392
|
-
var le;
|
|
393
|
-
return _[ee.label] = ee.key, ((le = Object.keys(c(_))) == null ? void 0 : le.length) >= ee.width && (V.push(c(_)), _ = {}), _;
|
|
394
|
-
}, {}), a.push(((O = A == null ? void 0 : A.find((_) => (_ == null ? void 0 : _.value) === (r == null ? void 0 : r.key))) == null ? void 0 : O.key) + "=" + JSON.stringify(V) + "/r/n");
|
|
395
|
-
}
|
|
396
|
-
else if (Object.keys(J).includes("label")) {
|
|
397
|
-
const V = ($ = c(r == null ? void 0 : r.contents)) == null ? void 0 : $.map((_) => _.label);
|
|
398
|
-
a.push(((D = A == null ? void 0 : A.find((_) => (_ == null ? void 0 : _.value) === (r == null ? void 0 : r.key))) == null ? void 0 : D.key) + "=" + JSON.stringify(V) + "/r/n");
|
|
399
|
-
} else
|
|
400
|
-
a.push(((ae = A == null ? void 0 : A.find((V) => (V == null ? void 0 : V.value) === (r == null ? void 0 : r.key))) == null ? void 0 : ae.key) + "=" + JSON.stringify(r == null ? void 0 : r.contents) + "/r/n");
|
|
401
|
-
}
|
|
402
|
-
});
|
|
403
|
-
}), JSON.stringify(a);
|
|
404
|
-
}, C = U([]), T = () => {
|
|
405
|
-
z.value.click();
|
|
406
|
-
}, w = (d) => {
|
|
407
|
-
const a = d.target.files[0];
|
|
408
|
-
if (!a) return;
|
|
409
|
-
const m = new FileReader();
|
|
410
|
-
m.onload = (o) => {
|
|
411
|
-
try {
|
|
412
|
-
l.value = o.target.result, C.value = F(o.target.result), n.value++;
|
|
413
|
-
} catch (j) {
|
|
414
|
-
console.error("解析失败:", j);
|
|
415
|
-
}
|
|
416
|
-
}, m.onerror = (o) => {
|
|
417
|
-
console.error("文件读取错误:", o);
|
|
418
|
-
}, m.readAsText(a);
|
|
419
|
-
};
|
|
420
|
-
he(() => {
|
|
421
|
-
window.addEventListener("resize", p);
|
|
422
|
-
}), ke(() => {
|
|
423
|
-
window.removeEventListener("resize", p);
|
|
424
|
-
}), v(
|
|
425
|
-
() => [e == null ? void 0 : e.content, e == null ? void 0 : e.jsonContents],
|
|
426
|
-
() => {
|
|
427
|
-
l.value = e == null ? void 0 : e.content, f.value = e == null ? void 0 : e.jsonContents;
|
|
428
|
-
},
|
|
429
|
-
{ deep: !0, immediate: !0 }
|
|
430
|
-
), v(
|
|
431
|
-
() => n.value,
|
|
432
|
-
() => {
|
|
433
|
-
var d;
|
|
434
|
-
((d = C.value) == null ? void 0 : d.length) !== 0 && (g.setOriginalData(C.value), g.setItemData(C.value));
|
|
435
|
-
},
|
|
436
|
-
{ deep: !0, immediate: !0 }
|
|
437
|
-
);
|
|
438
|
-
const F = (d) => {
|
|
439
|
-
let a = d.replace(/,/g, ",").replace(/;/g, ";").replace(/:/g, ":");
|
|
440
|
-
a = a.replace(/(\w+)\s*:/g, "$1:"), a = a.replace(/\r\n/g, "").replace(/\n/g, "").replace(/\t/g, "").replace(/\s+/g, " ").trim(), a = a.replace(/,\s*([}\]])/g, "$1"), a = a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g, ": $2$4");
|
|
441
|
-
try {
|
|
442
|
-
return JSON.parse(a);
|
|
443
|
-
} catch (m) {
|
|
444
|
-
try {
|
|
445
|
-
const j = new Function(`return ${a}`)();
|
|
446
|
-
if (Array.isArray(j) || typeof j == "object")
|
|
447
|
-
return j;
|
|
448
|
-
throw new Error(`解析结果不是有效的数组或对象: ${m}`);
|
|
449
|
-
} catch (o) {
|
|
450
|
-
throw new Error(`无法解析JSON: ${o.message}`);
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
};
|
|
454
|
-
return (d, a) => {
|
|
455
|
-
var m;
|
|
456
|
-
return I(), E("div", Ee, [
|
|
457
|
-
((m = e == null ? void 0 : e.jsonContents) == null ? void 0 : m.length) === 0 ? (I(), E("div", ze, [
|
|
458
|
-
S("div", Be, [
|
|
459
|
-
S("input", {
|
|
460
|
-
type: "file",
|
|
461
|
-
ref_key: "fileInput",
|
|
462
|
-
ref: z,
|
|
463
|
-
accept: ".txt",
|
|
464
|
-
onChange: w,
|
|
465
|
-
style: { display: "none" }
|
|
466
|
-
}, null, 544),
|
|
467
|
-
S("button", {
|
|
468
|
-
onClick: T,
|
|
469
|
-
class: "import-button-content"
|
|
470
|
-
}, "导入文件"),
|
|
471
|
-
k.value ? (I(), E("span", Se, se(k.value), 1)) : q("", !0)
|
|
472
|
-
])
|
|
473
|
-
])) : q("", !0),
|
|
474
|
-
(e == null ? void 0 : e.mode) === "edit" ? (I(), E("div", Ze, [
|
|
475
|
-
S("div", Me, [
|
|
476
|
-
te(ge)
|
|
477
|
-
]),
|
|
478
|
-
(I(), E("div", {
|
|
479
|
-
class: "model-show",
|
|
480
|
-
key: y.value
|
|
481
|
-
}, [
|
|
482
|
-
te(_e)
|
|
483
|
-
])),
|
|
484
|
-
S("div", We, [
|
|
485
|
-
te(Ce)
|
|
486
|
-
])
|
|
487
|
-
])) : q("", !0),
|
|
488
|
-
(e == null ? void 0 : e.mode) === "view" ? (I(), E("div", Le, [
|
|
489
|
-
(I(), oe(Fe, {
|
|
490
|
-
content: l.value,
|
|
491
|
-
onChange: u,
|
|
492
|
-
jsonContents: f.value,
|
|
493
|
-
key: y.value
|
|
494
|
-
}, null, 8, ["content", "jsonContents"]))
|
|
495
|
-
])) : q("", !0)
|
|
496
|
-
]);
|
|
497
|
-
};
|
|
498
|
-
}
|
|
499
|
-
}, Xe = /* @__PURE__ */ pe(Ge, [["__scopeId", "data-v-91ce80be"]]);
|
|
500
|
-
export {
|
|
501
|
-
Xe as default
|
|
502
|
-
};
|