ss-component-new 1.1.23 → 1.1.25
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-KB6iHH4f.js → array-CCatJXLj.js} +804 -815
- package/dist/{index-D4WSigM-.js → index-1-TQVDeQ.js} +4 -4
- package/dist/{index-Dlzjm4o2.js → index-DDF0bV9x.js} +46 -46
- package/dist/{index-CYJSOYY9.js → index-PZfaz4od.js} +5 -5
- package/dist/{index-DSOL_SLh.js → index-aPaHHdps.js} +1141 -1085
- package/dist/{main-Bqxy4hrc.js → main-DwaIKK8y.js} +3 -3
- package/dist/{menu-V9qTN_Cu.js → menu-CU4pLrIB.js} +2 -1
- package/dist/{modelComp-5PDCbl8W.js → modelComp-CJyvRdLJ.js} +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +4 -4
- package/dist/ss-component.umd.cjs +14 -14
- package/package.json +2 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as D, onMounted as ee, createElementBlock as m, openBlock as i, Fragment as z, renderList as H, createElementVNode as N, createCommentVNode as T, toDisplayString as U, watch as O, createVNode as R, unref as E, createBlock as G, resolveDynamicComponent as te } from "vue";
|
|
2
|
-
import { p as J, u as ae, d as ne, e as oe, g as se, m as le, a as ce, b as re, c as ue } from "./array-
|
|
3
|
-
import { u as Q } from "./modelComp-
|
|
4
|
-
import { _ as V, u as X, s as P, c as B } from "./menu-
|
|
5
|
-
import ie from "./index-
|
|
2
|
+
import { p as J, u as ae, d as ne, e as oe, g as se, m as le, a as ce, b as re, c as ue } from "./array-CCatJXLj.js";
|
|
3
|
+
import { u as Q } from "./modelComp-CJyvRdLJ.js";
|
|
4
|
+
import { _ as V, u as X, s as P, c as B } from "./menu-CU4pLrIB.js";
|
|
5
|
+
import ie from "./index-DDF0bV9x.js";
|
|
6
6
|
const de = { class: "bread-content" }, me = ["onClick"], fe = { key: 0 }, he = {
|
|
7
7
|
__name: "index",
|
|
8
8
|
props: {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { defineAsyncComponent as j, computed as E, onMounted as O, resolveComponent as A, createBlock as
|
|
2
|
-
import { E as y, u as H, s as v, c as _, _ as J } from "./menu-
|
|
3
|
-
import { u as K } from "./modelComp-
|
|
4
|
-
const D = j(() => import("./index-
|
|
5
|
-
D.install = (
|
|
6
|
-
|
|
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 $, watch as G, createVNode as V, createElementVNode as q, toDisplayString as z } from "vue";
|
|
2
|
+
import { E as y, u as H, s as v, c as _, _ as J } from "./menu-CU4pLrIB.js";
|
|
3
|
+
import { u as K } from "./modelComp-CJyvRdLJ.js";
|
|
4
|
+
const D = j(() => import("./index-PZfaz4od.js"));
|
|
5
|
+
D.install = (r) => {
|
|
6
|
+
r.component("ssMenu", D);
|
|
7
7
|
};
|
|
8
8
|
const Q = {
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
11
11
|
name: String
|
|
12
12
|
},
|
|
13
|
-
setup(
|
|
14
|
-
const c =
|
|
13
|
+
setup(r) {
|
|
14
|
+
const c = r, p = E(() => y[c.name]);
|
|
15
15
|
return O(() => {
|
|
16
16
|
const m = Object.keys(y);
|
|
17
17
|
console.log("iconComponent", p.value, c.name, y, m);
|
|
18
18
|
}), (m, f) => {
|
|
19
19
|
const d = A("el-icon");
|
|
20
|
-
return
|
|
20
|
+
return b(), C(d, null, {
|
|
21
21
|
default: F(() => [
|
|
22
|
-
(
|
|
22
|
+
(b(), C(B(p.value)))
|
|
23
23
|
]),
|
|
24
24
|
_: 1
|
|
25
25
|
});
|
|
@@ -32,18 +32,18 @@ const Q = {
|
|
|
32
32
|
DynamicIcon: Q
|
|
33
33
|
},
|
|
34
34
|
setup() {
|
|
35
|
-
const
|
|
35
|
+
const r = H(), c = K(), { rawMenu: p, menuTriggerType: m } = v(r), { itemData: f } = v(c), d = $([]);
|
|
36
36
|
let M;
|
|
37
37
|
((e) => {
|
|
38
38
|
e[e.Menu = 0] = "Menu", e[e.FolderOpened = 1] = "FolderOpened";
|
|
39
39
|
})(M || (M = {}));
|
|
40
40
|
const g = (e) => {
|
|
41
|
-
let
|
|
41
|
+
let o = [], n = [];
|
|
42
42
|
return e == null || e.forEach((s) => {
|
|
43
|
-
|
|
44
|
-
}), console.log("splitMenu",
|
|
45
|
-
}, h = (e,
|
|
46
|
-
const n =
|
|
43
|
+
o = h(s, n);
|
|
44
|
+
}), console.log("splitMenu", o), o;
|
|
45
|
+
}, h = (e, o) => {
|
|
46
|
+
const n = o, s = [];
|
|
47
47
|
e == null || e.forEach((t) => {
|
|
48
48
|
Array.isArray(t) ? s.push({ children: h(t, []) }) : s.push({ title: t });
|
|
49
49
|
});
|
|
@@ -52,23 +52,23 @@ const Q = {
|
|
|
52
52
|
}), t), {});
|
|
53
53
|
return u = I(_(u)), n.push(u), Array.isArray(n) && (n == null ? void 0 : n.length) > 1 ? n : n == null ? void 0 : n[0];
|
|
54
54
|
}, I = (e) => {
|
|
55
|
-
var
|
|
56
|
-
return Array.isArray(e == null ? void 0 : e.title) && ((
|
|
55
|
+
var o, n, s;
|
|
56
|
+
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;
|
|
57
57
|
}, P = (e) => {
|
|
58
58
|
var n;
|
|
59
|
-
const
|
|
60
|
-
return
|
|
59
|
+
const o = e;
|
|
60
|
+
return o.children = (n = o.children) == null ? void 0 : n.map((s) => {
|
|
61
61
|
var u;
|
|
62
62
|
return (u = s == null ? void 0 : s.title) != null && u.children ? s == null ? void 0 : s.title : s;
|
|
63
|
-
}),
|
|
64
|
-
}, S = (e,
|
|
63
|
+
}), o;
|
|
64
|
+
}, S = (e, o = "", n = 0) => {
|
|
65
65
|
var t;
|
|
66
66
|
const s = _(f.value), u = (t = s == null ? void 0 : s.filter((a) => {
|
|
67
67
|
var i;
|
|
68
68
|
return ((i = a.comp) == null ? void 0 : i.toUpperCase()) === "GROUP";
|
|
69
69
|
})) == null ? void 0 : t.map((a) => a.name);
|
|
70
70
|
return e == null ? void 0 : e.map((a) => {
|
|
71
|
-
const i =
|
|
71
|
+
const i = o ? `${o}/${a.title}` : a.title, l = {
|
|
72
72
|
...a,
|
|
73
73
|
path: i,
|
|
74
74
|
level: n,
|
|
@@ -79,53 +79,53 @@ const Q = {
|
|
|
79
79
|
});
|
|
80
80
|
}, T = E(() => {
|
|
81
81
|
const e = S(d.value);
|
|
82
|
-
return console.log("temps", e),
|
|
82
|
+
return console.log("temps", e), r.setMenus(e), e;
|
|
83
83
|
}), k = (e) => {
|
|
84
|
-
console.log("clickMenu", e),
|
|
84
|
+
console.log("clickMenu", e), r.setMenuTriggerType("click"), r.setActiveMenuPath(e == null ? void 0 : e.path);
|
|
85
85
|
}, w = (e) => {
|
|
86
|
-
m.value === "click" ?
|
|
86
|
+
m.value === "click" ? r.setActiveMenuPath(e) : r.setMenuTriggerType("click");
|
|
87
87
|
}, L = (e) => {
|
|
88
|
-
|
|
88
|
+
r.setActiveMenuPath(e);
|
|
89
89
|
}, N = $([
|
|
90
90
|
{
|
|
91
|
-
name: "--
|
|
91
|
+
name: "--ssComponent-menu-bg",
|
|
92
92
|
value: "#426ec4"
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
|
-
name: "--
|
|
95
|
+
name: "--ssComponent-submenu-hover-bg",
|
|
96
96
|
value: "#00000033"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
|
-
name: "--
|
|
99
|
+
name: "--ssComponent-submenu-open-bg",
|
|
100
100
|
value: "#2DA0FF"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
|
-
name: "--
|
|
103
|
+
name: "--ssComponent-submenu-open-inline-bg",
|
|
104
104
|
value: "#1C4275"
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
|
-
name: "--
|
|
107
|
+
name: "--ssComponent-menuitem-hover-bg",
|
|
108
108
|
value: "#1d7bef"
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
|
-
name: "--
|
|
111
|
+
name: "--ssComponent-menuitem-active-bg",
|
|
112
112
|
value: "#1d7bef"
|
|
113
113
|
}
|
|
114
114
|
]), R = () => {
|
|
115
|
-
var
|
|
115
|
+
var o;
|
|
116
116
|
const e = document.documentElement;
|
|
117
|
-
(
|
|
117
|
+
(o = N.value) == null || o.forEach((n) => {
|
|
118
118
|
e.style.setProperty(n.name, n.value);
|
|
119
119
|
});
|
|
120
120
|
};
|
|
121
121
|
return O(() => {
|
|
122
122
|
}), G(() => p.value, (e) => {
|
|
123
|
-
var
|
|
123
|
+
var o, n, s;
|
|
124
124
|
if (e) {
|
|
125
|
-
const u = (s = (n = (
|
|
125
|
+
const u = (s = (n = (o = _(e)) == null ? void 0 : o.compData) == null ? void 0 : n[0]) == null ? void 0 : s.contents;
|
|
126
126
|
d.value = g(u), console.log("rawMenu", T.value);
|
|
127
127
|
} else
|
|
128
|
-
|
|
128
|
+
r.setActiveMenuPath("");
|
|
129
129
|
}, {
|
|
130
130
|
immediate: !0
|
|
131
131
|
}), {
|
|
@@ -137,14 +137,14 @@ const Q = {
|
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
|
-
function X(
|
|
140
|
+
function X(r, c, p, m, f, d) {
|
|
141
141
|
const M = A("DynamicIcon"), g = A("ssMenu");
|
|
142
|
-
return
|
|
143
|
-
menuList:
|
|
144
|
-
onClickMenu:
|
|
145
|
-
onOpenMenu:
|
|
146
|
-
onCloseMenu:
|
|
147
|
-
onChangeMenuStyle:
|
|
142
|
+
return b(), C(g, {
|
|
143
|
+
menuList: r.renderMenuList,
|
|
144
|
+
onClickMenu: r.clickMenu,
|
|
145
|
+
onOpenMenu: r.openMenu,
|
|
146
|
+
onCloseMenu: r.closeMenu,
|
|
147
|
+
onChangeMenuStyle: r.changeMenuStyle,
|
|
148
148
|
class: "menuList-wrap"
|
|
149
149
|
}, {
|
|
150
150
|
title: F(({ menu: h }) => [
|
|
@@ -156,7 +156,7 @@ function X(o, c, p, m, f, d) {
|
|
|
156
156
|
_: 1
|
|
157
157
|
}, 8, ["menuList", "onClickMenu", "onOpenMenu", "onCloseMenu", "onChangeMenuStyle"]);
|
|
158
158
|
}
|
|
159
|
-
const ee = /* @__PURE__ */ J(W, [["render", X], ["__scopeId", "data-v-
|
|
159
|
+
const ee = /* @__PURE__ */ J(W, [["render", X], ["__scopeId", "data-v-dc84a8f7"]]);
|
|
160
160
|
export {
|
|
161
161
|
ee as default
|
|
162
162
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as g, onMounted as A, resolveComponent as l, createElementBlock as
|
|
2
|
-
import { u as q, s as E, _ as F } from "./menu-
|
|
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, _ as F } from "./menu-CU4pLrIB.js";
|
|
3
3
|
const R = /* @__PURE__ */ g({
|
|
4
4
|
__name: "menuItem",
|
|
5
5
|
props: {
|
|
@@ -21,7 +21,7 @@ const R = /* @__PURE__ */ g({
|
|
|
21
21
|
return A(() => {
|
|
22
22
|
}), (n, y) => {
|
|
23
23
|
const k = l("MenuItem", !0), v = l("el-sub-menu"), C = l("el-menu-item");
|
|
24
|
-
return o(!0), d
|
|
24
|
+
return o(!0), _(d, null, m(M.menuList, (e) => (o(), _(d, null, [
|
|
25
25
|
e.children && e.children.length > 0 ? (o(), r(v, {
|
|
26
26
|
index: e.path,
|
|
27
27
|
key: e.path
|
|
@@ -90,7 +90,7 @@ const R = /* @__PURE__ */ g({
|
|
|
90
90
|
onClose: k
|
|
91
91
|
}, {
|
|
92
92
|
default: s(() => [
|
|
93
|
-
(o(!0), d
|
|
93
|
+
(o(!0), _(d, null, m(M.menuList, (t) => (o(), _(d, null, [
|
|
94
94
|
t.children && t.children.length > 0 ? (o(), r(p, {
|
|
95
95
|
index: t.path,
|
|
96
96
|
key: t.path
|
|
@@ -128,7 +128,7 @@ const R = /* @__PURE__ */ g({
|
|
|
128
128
|
}, 8, ["default-active", "default-openeds"]);
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
}), z = /* @__PURE__ */ F(T, [["__scopeId", "data-v-
|
|
131
|
+
}), z = /* @__PURE__ */ F(T, [["__scopeId", "data-v-2cbe7506"]]);
|
|
132
132
|
export {
|
|
133
133
|
z as default
|
|
134
134
|
};
|