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.
@@ -0,0 +1,131 @@
1
+ import { createElementBlock as r, openBlock as n, Fragment as k, renderList as y, unref as F, createElementVNode as c, createBlock as f, resolveDynamicComponent as $, toDisplayString as C, ref as I, watch as L, resolveComponent as b, createVNode as R, withCtx as g, createCommentVNode as T } from "vue";
2
+ import { p as V, s as U, g as M } from "./array-BAin2LgZ.js";
3
+ import { E as j } from "./index-BiRoo_a0.js";
4
+ import { u as w } from "./modelComp-CvlV4fLW.js";
5
+ import { s as x } from "./menu-R7bFdGaV.js";
6
+ import { _ as E } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
+ import { c as v } from "./cloneDeep-D5Kd1l4C.js";
8
+ const q = { class: "type-select" }, z = ["onClick"], A = { class: "list-icon" }, G = {
9
+ __name: "index",
10
+ setup(N) {
11
+ const m = w(V), { itemData: o } = x(m), p = (t) => j[t], _ = (t) => {
12
+ const d = v(o.value);
13
+ d.push({
14
+ comp: t.comp,
15
+ name: t.name,
16
+ compData: []
17
+ }), m.setItemData(d);
18
+ };
19
+ return (t, d) => (n(), r("div", q, [
20
+ (n(!0), r(k, null, y(F(U), (l, e) => (n(), r("div", {
21
+ class: "type-list",
22
+ key: e
23
+ }, [
24
+ c("div", {
25
+ class: "list-content",
26
+ onClick: (s) => _(l)
27
+ }, [
28
+ c("div", A, [
29
+ (n(), f($(p(l.icon))))
30
+ ]),
31
+ c("div", null, C(l.name), 1)
32
+ ], 8, z)
33
+ ]))), 128))
34
+ ]));
35
+ }
36
+ }, se = /* @__PURE__ */ E(G, [["__scopeId", "data-v-fe4aecc8"]]), H = { class: "fill-content" }, J = { class: "operate-content" }, K = { class: "collapse-title" }, P = { class: "comp-child" }, Q = {
37
+ __name: "index",
38
+ setup(N) {
39
+ const m = w(V), { itemData: o, originalData: p } = x(m), _ = I([]), t = I([]);
40
+ L(
41
+ () => o.value,
42
+ () => {
43
+ var e;
44
+ !o.value || ((e = o.value) == null ? void 0 : e.length) === 0 || (_.value = v(o.value));
45
+ },
46
+ { deep: !0, immediate: !0 }
47
+ );
48
+ const d = (e) => M(e), l = (e, s, D) => {
49
+ if (!e || e.length === 0) return;
50
+ let i = v(o.value);
51
+ const a = v(s);
52
+ a.compData = e, i = i == null ? void 0 : i.map((u, h) => (h === D && (u = a), u)), m.setItemData(i);
53
+ };
54
+ return (e, s) => {
55
+ const D = b("el-collapse-item"), i = b("el-collapse");
56
+ return n(), r("div", H, [
57
+ s[1] || (s[1] = c("div", { class: "fill-operate" }, C("操作栏"), -1)),
58
+ c("div", J, [
59
+ R(i, {
60
+ modelValue: t.value,
61
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => t.value = a),
62
+ class: "collapse-content"
63
+ }, {
64
+ default: g(() => [
65
+ (n(!0), r(k, null, y(_.value, (a, u) => (n(), f(D, {
66
+ key: u,
67
+ name: u
68
+ }, {
69
+ title: g(() => [
70
+ c("div", K, C(a.name), 1)
71
+ ]),
72
+ default: g(() => {
73
+ var h, B;
74
+ return [
75
+ c("div", P, [
76
+ (n(), f($(d(a.comp + "Operate")), {
77
+ itemContents: a == null ? void 0 : a.compData,
78
+ originalItemContents: (B = (h = F(p)) == null ? void 0 : h.find((S, O) => O === u)) == null ? void 0 : B.compData,
79
+ onChange: (S) => l(S, a, u)
80
+ }, null, 40, ["itemContents", "originalItemContents", "onChange"]))
81
+ ])
82
+ ];
83
+ }),
84
+ _: 2
85
+ }, 1032, ["name"]))), 128))
86
+ ]),
87
+ _: 1
88
+ }, 8, ["modelValue"])
89
+ ])
90
+ ]);
91
+ };
92
+ }
93
+ }, le = /* @__PURE__ */ E(Q, [["__scopeId", "data-v-a216b035"]]), W = {
94
+ key: 0,
95
+ class: "show-content"
96
+ }, X = {
97
+ __name: "index",
98
+ setup(N) {
99
+ const m = w(V), { itemData: o } = x(m), p = I([]);
100
+ L(
101
+ () => o.value,
102
+ () => {
103
+ var t;
104
+ !o.value || ((t = o.value) == null ? void 0 : t.length) === 0 || (p.value = v(o.value));
105
+ },
106
+ { deep: !0, immediate: !0 }
107
+ );
108
+ const _ = (t) => M(t);
109
+ return (t, d) => {
110
+ var l;
111
+ return ((l = p.value) == null ? void 0 : l.length) > 0 ? (n(), r("div", W, [
112
+ (n(!0), r(k, null, y(p.value, (e, s) => (n(), r("div", {
113
+ class: "item-content",
114
+ key: s
115
+ }, [
116
+ c("div", null, C(e.name), 1),
117
+ (n(), f($(_(e.comp)), {
118
+ itemData: e == null ? void 0 : e.compData,
119
+ childItemData: e == null ? void 0 : e.itemChildData,
120
+ key: s
121
+ }, null, 8, ["itemData", "childItemData"]))
122
+ ]))), 128))
123
+ ])) : T("", !0);
124
+ };
125
+ }
126
+ }, ce = /* @__PURE__ */ E(X, [["__scopeId", "data-v-79320497"]]);
127
+ export {
128
+ ce as a,
129
+ le as b,
130
+ se as m
131
+ };
@@ -0,0 +1,36 @@
1
+ import { ref as e, resolveComponent as o, createBlock as r, openBlock as n } from "vue";
2
+ /* empty css */
3
+ import { _ as p } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import "./array-BAin2LgZ.js";
5
+ import "./index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-BO-d1Oip.js";
6
+ import "./index.vue_vue_type_style_index_0_scoped_876d48c6_lang-nK36fXfd.js";
7
+ const a = {
8
+ __name: "index",
9
+ props: {
10
+ mode: {
11
+ type: String,
12
+ default: "view"
13
+ },
14
+ content: {
15
+ type: String,
16
+ default: ""
17
+ },
18
+ jsonContents: {
19
+ type: Array,
20
+ default: () => []
21
+ },
22
+ showButton: {
23
+ type: Boolean,
24
+ default: !0
25
+ }
26
+ },
27
+ setup(c) {
28
+ return e(!1), (s, _) => {
29
+ const t = o("router-view");
30
+ return n(), r(t);
31
+ };
32
+ }
33
+ }, v = /* @__PURE__ */ p(a, [["__scopeId", "data-v-c06bb5c0"]]);
34
+ export {
35
+ v as default
36
+ };
@@ -1,5 +1,6 @@
1
1
  import { ref as Sp, onMounted as Ab, watch as vL, onUnmounted as cL, createElementBlock as Mb, openBlock as Ib, createVNode as pL } from "vue";
2
- import { _ as Lb, c as Ki } from "./_plugin-vue_export-helper-B7R8Jogt.js";
2
+ import { _ as Lb } from "./_plugin-vue_export-helper-CHgC5LLL.js";
3
+ import { c as Ki } from "./cloneDeep-D5Kd1l4C.js";
3
4
  /*! *****************************************************************************
4
5
  Copyright (c) Microsoft Corporation.
5
6
 
@@ -44004,7 +44005,7 @@ const d7 = {
44004
44005
  pL(g7, { optionContents: t.value }, null, 8, ["optionContents"])
44005
44006
  ]));
44006
44007
  }
44007
- }, w7 = /* @__PURE__ */ Lb(_7, [["__scopeId", "data-v-0440fac3"]]);
44008
+ }, b7 = /* @__PURE__ */ Lb(_7, [["__scopeId", "data-v-0440fac3"]]);
44008
44009
  export {
44009
- w7 as default
44010
+ b7 as default
44010
44011
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as g, onMounted as A, resolveComponent as l, createElementBlock as _, openBlock as o, Fragment as d, 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
- import { u as q, s as E } from "./menu-D6yKPqgS.js";
3
- import { _ as F } from "./_plugin-vue_export-helper-B7R8Jogt.js";
2
+ import { u as q, s as E } from "./menu-R7bFdGaV.js";
3
+ import { _ as F } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const R = /* @__PURE__ */ g({
5
5
  __name: "menuItem",
6
6
  props: {
@@ -0,0 +1,254 @@
1
+ import { v as M, c as x } from "./array-BAin2LgZ.js";
2
+ import { ref as Y } from "vue";
3
+ import { c as l } from "./cloneDeep-D5Kd1l4C.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
+ };
@@ -0,0 +1,144 @@
1
+ import { defineAsyncComponent as U, computed as D, onMounted as O, resolveComponent as G, createBlock as v, openBlock as C, withCtx as I, resolveDynamicComponent as N, defineComponent as k, ref as T, watch as q } from "vue";
2
+ import { E as M } from "./index-BiRoo_a0.js";
3
+ import { u as z, s as E } from "./menu-R7bFdGaV.js";
4
+ import { u as H } from "./modelComp-CvlV4fLW.js";
5
+ import { c as f } from "./cloneDeep-D5Kd1l4C.js";
6
+ const g = U(() => import("./index-qo-kPc5S.js"));
7
+ g.install = (u) => {
8
+ u.component("ssMenu", g);
9
+ };
10
+ const J = {
11
+ __name: "index",
12
+ props: {
13
+ name: String
14
+ },
15
+ setup(u) {
16
+ const m = u, p = D(() => M[m.name]);
17
+ return O(() => {
18
+ const c = Object.keys(M);
19
+ console.log("iconComponent", p.value, m.name, M, c);
20
+ }), (c, A) => {
21
+ const d = G("el-icon");
22
+ return C(), v(d, null, {
23
+ default: I(() => [
24
+ (C(), v(N(p.value)))
25
+ ]),
26
+ _: 1
27
+ });
28
+ };
29
+ }
30
+ }, Z = k({
31
+ name: "menu",
32
+ components: {
33
+ ssMenu: g,
34
+ DynamicIcon: J
35
+ },
36
+ setup() {
37
+ const u = z(), m = H(), { rawMenu: p, menuTriggerType: c } = E(u), { itemData: A } = E(m), d = T([]);
38
+ let h;
39
+ ((e) => {
40
+ e[e.Menu = 0] = "Menu", e[e.FolderOpened = 1] = "FolderOpened";
41
+ })(h || (h = {}));
42
+ const S = (e) => {
43
+ let o = [], s = [];
44
+ return e == null || e.forEach((r) => {
45
+ o = y(r, s);
46
+ }), console.log("splitMenu", o), o;
47
+ }, y = (e, o) => {
48
+ const s = o, r = [];
49
+ e == null || e.forEach((n) => {
50
+ Array.isArray(n) ? r.push({ children: y(n, []) }) : r.push({ title: n });
51
+ });
52
+ let i = r.reduce((n, a) => (Object.entries(a).forEach(([t, l]) => {
53
+ n[t] === void 0 ? l != null && l.title ? n[t] = [l] : n[t] = l : (Array.isArray(n[t]) || (n[t] = [{ title: n[t] }]), l != null && l.title || Array.isArray(l) ? n[t].push(l) : n[t].push({ title: l }));
54
+ }), n), {});
55
+ return i = F(f(i)), s.push(i), Array.isArray(s) && (s == null ? void 0 : s.length) > 1 ? s : s == null ? void 0 : s[0];
56
+ }, F = (e) => {
57
+ var o, s, r;
58
+ return Array.isArray(e == null ? void 0 : e.title) && ((o = e == null ? void 0 : e.title) == null ? void 0 : o.length) === ((r = (s = e == null ? void 0 : e.title) == null ? void 0 : s.filter((i) => i.title)) == null ? void 0 : r.length) ? e == null ? void 0 : e.title : Array.isArray(e == null ? void 0 : e.children) ? P(e) : e;
59
+ }, P = (e) => {
60
+ var s;
61
+ const o = e;
62
+ return o.children = (s = o.children) == null ? void 0 : s.map((r) => {
63
+ var i;
64
+ return (i = r == null ? void 0 : r.title) != null && i.children ? r == null ? void 0 : r.title : r;
65
+ }), o;
66
+ }, b = (e, o = "", s = 0) => {
67
+ var n;
68
+ const r = f(A.value), i = (n = r == null ? void 0 : r.filter((a) => {
69
+ var t;
70
+ return ((t = a.comp) == null ? void 0 : t.toUpperCase()) === "GROUP";
71
+ })) == null ? void 0 : n.map((a) => a.name);
72
+ return e == null ? void 0 : e.map((a) => {
73
+ const t = o ? `${o}/${a.title}` : a.title, l = {
74
+ ...a,
75
+ path: t,
76
+ level: s,
77
+ icon: h[`${s}`],
78
+ carryData: i == null ? void 0 : i.includes(t)
79
+ };
80
+ return a.children && a.children.length > 0 && (l.children = b(a.children, t, s + 1)), l;
81
+ });
82
+ }, _ = D(() => {
83
+ const e = b(d.value);
84
+ return console.log("temps", e), u.setMenus(e), e;
85
+ }), $ = (e) => {
86
+ console.log("clickMenu", e), u.setMenuTriggerType("click"), u.setActiveMenuPath(e == null ? void 0 : e.path);
87
+ }, R = (e) => {
88
+ c.value === "click" ? u.setActiveMenuPath(e) : u.setMenuTriggerType("click");
89
+ }, j = (e) => {
90
+ u.setActiveMenuPath(e);
91
+ }, w = T([
92
+ {
93
+ name: "--ssComponent-menu-bg",
94
+ value: "#426ec4"
95
+ },
96
+ {
97
+ name: "--ssComponent-submenu-hover-bg",
98
+ value: "#00000033"
99
+ },
100
+ {
101
+ name: "--ssComponent-submenu-open-bg",
102
+ value: "#2DA0FF"
103
+ },
104
+ {
105
+ name: "--ssComponent-submenu-open-inline-bg",
106
+ value: "#1C4275"
107
+ },
108
+ {
109
+ name: "--ssComponent-menuitem-hover-bg",
110
+ value: "#1d7bef"
111
+ },
112
+ {
113
+ name: "--ssComponent-menuitem-active-bg",
114
+ value: "#1d7bef"
115
+ }
116
+ ]), B = () => {
117
+ var o;
118
+ const e = document.documentElement;
119
+ (o = w.value) == null || o.forEach((s) => {
120
+ e.style.setProperty(s.name, s.value);
121
+ });
122
+ };
123
+ return O(() => {
124
+ }), q(() => p.value, (e) => {
125
+ var o, s, r;
126
+ if (e) {
127
+ const i = (r = (s = (o = f(e)) == null ? void 0 : o.compData) == null ? void 0 : s[0]) == null ? void 0 : r.contents;
128
+ d.value = S(i), console.log("rawMenu", _.value);
129
+ } else
130
+ u.setActiveMenuPath("");
131
+ }, {
132
+ immediate: !0
133
+ }), {
134
+ renderMenuList: _,
135
+ clickMenu: $,
136
+ openMenu: R,
137
+ closeMenu: j,
138
+ changeMenuStyle: B
139
+ };
140
+ }
141
+ });
142
+ export {
143
+ Z as _
144
+ };