ss-component-new 1.1.69 → 1.1.71
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-BtcGNRWC.js +3233 -0
- package/dist/cloneDeep-BcUiE4Tq.js +318 -0
- package/dist/{index-DiAssal2.js → index-BQ18EzV6.js} +2 -2
- package/dist/{index-10n3uNlg.js → index-BcPDXPQB.js} +4 -3
- package/dist/index-CN2pLnQT.js +131 -0
- package/dist/index-C_SGjB9P.js +36 -0
- package/dist/{index-CEq6IRIE.js → index-M_agR_mA.js} +171 -877
- package/dist/{menu-D6yKPqgS.js → index-NvpJBKaz.js} +3821 -1790
- package/dist/index-O_TF6Fp4.js +351 -0
- package/dist/index-btKSK4k7.js +26 -0
- package/dist/index-mnlbBMqr.js +3133 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_876d48c6_lang-CeS9mECH.js +254 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_dc84a8f7_lang-KVrulMLC.js +144 -0
- package/dist/{main-DqI34-Cq.js → main-C7f7YVTf.js} +46 -44
- package/dist/menu-Dez5HOn4.js +924 -0
- package/dist/{modelComp-Cr1QF6ip.js → modelComp-BdUI1DVP.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
package/dist/index-K2751gew.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { defineAsyncComponent as j, computed as E, onMounted as O, resolveComponent as A, createBlock as C, openBlock as b, withCtx as F, resolveDynamicComponent as B, defineComponent as U, ref as T, watch as G, createVNode as V, createElementVNode as q, toDisplayString as z } from "vue";
|
|
2
|
-
import { E as y, u as H, s as $ } from "./menu-D6yKPqgS.js";
|
|
3
|
-
import { u as J } from "./modelComp-Cr1QF6ip.js";
|
|
4
|
-
import { c as _, _ as K } from "./_plugin-vue_export-helper-B7R8Jogt.js";
|
|
5
|
-
const v = j(() => import("./index-DiAssal2.js"));
|
|
6
|
-
v.install = (r) => {
|
|
7
|
-
r.component("ssMenu", v);
|
|
8
|
-
};
|
|
9
|
-
const Q = {
|
|
10
|
-
__name: "index",
|
|
11
|
-
props: {
|
|
12
|
-
name: String
|
|
13
|
-
},
|
|
14
|
-
setup(r) {
|
|
15
|
-
const c = r, p = E(() => y[c.name]);
|
|
16
|
-
return O(() => {
|
|
17
|
-
const m = Object.keys(y);
|
|
18
|
-
console.log("iconComponent", p.value, c.name, y, m);
|
|
19
|
-
}), (m, f) => {
|
|
20
|
-
const d = A("el-icon");
|
|
21
|
-
return b(), C(d, null, {
|
|
22
|
-
default: F(() => [
|
|
23
|
-
(b(), C(B(p.value)))
|
|
24
|
-
]),
|
|
25
|
-
_: 1
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}, W = U({
|
|
30
|
-
name: "menu",
|
|
31
|
-
components: {
|
|
32
|
-
ssMenu: v,
|
|
33
|
-
DynamicIcon: Q
|
|
34
|
-
},
|
|
35
|
-
setup() {
|
|
36
|
-
const r = H(), c = J(), { rawMenu: p, menuTriggerType: m } = $(r), { itemData: f } = $(c), d = T([]);
|
|
37
|
-
let M;
|
|
38
|
-
((e) => {
|
|
39
|
-
e[e.Menu = 0] = "Menu", e[e.FolderOpened = 1] = "FolderOpened";
|
|
40
|
-
})(M || (M = {}));
|
|
41
|
-
const g = (e) => {
|
|
42
|
-
let o = [], n = [];
|
|
43
|
-
return e == null || e.forEach((s) => {
|
|
44
|
-
o = h(s, n);
|
|
45
|
-
}), console.log("splitMenu", o), o;
|
|
46
|
-
}, h = (e, o) => {
|
|
47
|
-
const n = o, s = [];
|
|
48
|
-
e == null || e.forEach((t) => {
|
|
49
|
-
Array.isArray(t) ? s.push({ children: h(t, []) }) : s.push({ title: t });
|
|
50
|
-
});
|
|
51
|
-
let u = s.reduce((t, a) => (Object.entries(a).forEach(([l, i]) => {
|
|
52
|
-
t[l] === void 0 ? i != null && i.title ? t[l] = [i] : t[l] = i : (Array.isArray(t[l]) || (t[l] = [{ title: t[l] }]), i != null && i.title || Array.isArray(i) ? t[l].push(i) : t[l].push({ title: i }));
|
|
53
|
-
}), t), {});
|
|
54
|
-
return u = I(_(u)), n.push(u), Array.isArray(n) && (n == null ? void 0 : n.length) > 1 ? n : n == null ? void 0 : n[0];
|
|
55
|
-
}, I = (e) => {
|
|
56
|
-
var o, n, s;
|
|
57
|
-
return Array.isArray(e == null ? void 0 : e.title) && ((o = e == null ? void 0 : e.title) == null ? void 0 : o.length) === ((s = (n = e == null ? void 0 : e.title) == null ? void 0 : n.filter((u) => u.title)) == null ? void 0 : s.length) ? e == null ? void 0 : e.title : Array.isArray(e == null ? void 0 : e.children) ? P(e) : e;
|
|
58
|
-
}, P = (e) => {
|
|
59
|
-
var n;
|
|
60
|
-
const o = e;
|
|
61
|
-
return o.children = (n = o.children) == null ? void 0 : n.map((s) => {
|
|
62
|
-
var u;
|
|
63
|
-
return (u = s == null ? void 0 : s.title) != null && u.children ? s == null ? void 0 : s.title : s;
|
|
64
|
-
}), o;
|
|
65
|
-
}, D = (e, o = "", n = 0) => {
|
|
66
|
-
var t;
|
|
67
|
-
const s = _(f.value), u = (t = s == null ? void 0 : s.filter((a) => {
|
|
68
|
-
var l;
|
|
69
|
-
return ((l = a.comp) == null ? void 0 : l.toUpperCase()) === "GROUP";
|
|
70
|
-
})) == null ? void 0 : t.map((a) => a.name);
|
|
71
|
-
return e == null ? void 0 : e.map((a) => {
|
|
72
|
-
const l = o ? `${o}/${a.title}` : a.title, i = {
|
|
73
|
-
...a,
|
|
74
|
-
path: l,
|
|
75
|
-
level: n,
|
|
76
|
-
icon: M[`${n}`],
|
|
77
|
-
carryData: u == null ? void 0 : u.includes(l)
|
|
78
|
-
};
|
|
79
|
-
return a.children && a.children.length > 0 && (i.children = D(a.children, l, n + 1)), i;
|
|
80
|
-
});
|
|
81
|
-
}, S = E(() => {
|
|
82
|
-
const e = D(d.value);
|
|
83
|
-
return console.log("temps", e), r.setMenus(e), e;
|
|
84
|
-
}), k = (e) => {
|
|
85
|
-
console.log("clickMenu", e), r.setMenuTriggerType("click"), r.setActiveMenuPath(e == null ? void 0 : e.path);
|
|
86
|
-
}, w = (e) => {
|
|
87
|
-
m.value === "click" ? r.setActiveMenuPath(e) : r.setMenuTriggerType("click");
|
|
88
|
-
}, L = (e) => {
|
|
89
|
-
r.setActiveMenuPath(e);
|
|
90
|
-
}, N = T([
|
|
91
|
-
{
|
|
92
|
-
name: "--ssComponent-menu-bg",
|
|
93
|
-
value: "#426ec4"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: "--ssComponent-submenu-hover-bg",
|
|
97
|
-
value: "#00000033"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
name: "--ssComponent-submenu-open-bg",
|
|
101
|
-
value: "#2DA0FF"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
name: "--ssComponent-submenu-open-inline-bg",
|
|
105
|
-
value: "#1C4275"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
name: "--ssComponent-menuitem-hover-bg",
|
|
109
|
-
value: "#1d7bef"
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
name: "--ssComponent-menuitem-active-bg",
|
|
113
|
-
value: "#1d7bef"
|
|
114
|
-
}
|
|
115
|
-
]), R = () => {
|
|
116
|
-
var o;
|
|
117
|
-
const e = document.documentElement;
|
|
118
|
-
(o = N.value) == null || o.forEach((n) => {
|
|
119
|
-
e.style.setProperty(n.name, n.value);
|
|
120
|
-
});
|
|
121
|
-
};
|
|
122
|
-
return O(() => {
|
|
123
|
-
}), G(() => p.value, (e) => {
|
|
124
|
-
var o, n, s;
|
|
125
|
-
if (e) {
|
|
126
|
-
const u = (s = (n = (o = _(e)) == null ? void 0 : o.compData) == null ? void 0 : n[0]) == null ? void 0 : s.contents;
|
|
127
|
-
d.value = g(u), console.log("rawMenu", S.value);
|
|
128
|
-
} else
|
|
129
|
-
r.setActiveMenuPath("");
|
|
130
|
-
}, {
|
|
131
|
-
immediate: !0
|
|
132
|
-
}), {
|
|
133
|
-
renderMenuList: S,
|
|
134
|
-
clickMenu: k,
|
|
135
|
-
openMenu: w,
|
|
136
|
-
closeMenu: L,
|
|
137
|
-
changeMenuStyle: R
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
function X(r, c, p, m, f, d) {
|
|
142
|
-
const M = A("DynamicIcon"), g = A("ssMenu");
|
|
143
|
-
return b(), C(g, {
|
|
144
|
-
menuList: r.renderMenuList,
|
|
145
|
-
onClickMenu: r.clickMenu,
|
|
146
|
-
onOpenMenu: r.openMenu,
|
|
147
|
-
onCloseMenu: r.closeMenu,
|
|
148
|
-
onChangeMenuStyle: r.changeMenuStyle,
|
|
149
|
-
class: "menuList-wrap"
|
|
150
|
-
}, {
|
|
151
|
-
title: F(({ menu: h }) => [
|
|
152
|
-
V(M, {
|
|
153
|
-
name: h.icon ?? ""
|
|
154
|
-
}, null, 8, ["name"]),
|
|
155
|
-
q("span", null, z(h.title ?? ""), 1)
|
|
156
|
-
]),
|
|
157
|
-
_: 1
|
|
158
|
-
}, 8, ["menuList", "onClickMenu", "onOpenMenu", "onCloseMenu", "onChangeMenuStyle"]);
|
|
159
|
-
}
|
|
160
|
-
const ne = /* @__PURE__ */ K(W, [["render", X], ["__scopeId", "data-v-dc84a8f7"]]);
|
|
161
|
-
export {
|
|
162
|
-
ne as default
|
|
163
|
-
};
|