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.
@@ -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-KB6iHH4f.js";
3
- import { u as Q } from "./modelComp-5PDCbl8W.js";
4
- import { _ as V, u as X, s as P, c as B } from "./menu-V9qTN_Cu.js";
5
- import ie from "./index-Dlzjm4o2.js";
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 b, openBlock as C, 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-V9qTN_Cu.js";
3
- import { u as K } from "./modelComp-5PDCbl8W.js";
4
- const D = j(() => import("./index-CYJSOYY9.js"));
5
- D.install = (o) => {
6
- o.component("ssMenu", D);
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(o) {
14
- const c = o, p = E(() => y[c.name]);
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 C(), b(d, null, {
20
+ return b(), C(d, null, {
21
21
  default: F(() => [
22
- (C(), b(B(p.value)))
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 o = H(), c = K(), { rawMenu: p, menuTriggerType: m } = v(o), { itemData: f } = v(c), d = $([]);
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 r = [], n = [];
41
+ let o = [], n = [];
42
42
  return e == null || e.forEach((s) => {
43
- r = h(s, n);
44
- }), console.log("splitMenu", r), r;
45
- }, h = (e, r) => {
46
- const n = r, s = [];
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 r, n, s;
56
- return Array.isArray(e == null ? void 0 : e.title) && ((r = e == null ? void 0 : e.title) == null ? void 0 : r.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;
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 r = e;
60
- return r.children = (n = r.children) == null ? void 0 : n.map((s) => {
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
- }), r;
64
- }, S = (e, r = "", n = 0) => {
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 = r ? `${r}/${a.title}` : a.title, l = {
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), o.setMenus(e), e;
82
+ return console.log("temps", e), r.setMenus(e), e;
83
83
  }), k = (e) => {
84
- console.log("clickMenu", e), o.setMenuTriggerType("click"), o.setActiveMenuPath(e == null ? void 0 : e.path);
84
+ console.log("clickMenu", e), r.setMenuTriggerType("click"), r.setActiveMenuPath(e == null ? void 0 : e.path);
85
85
  }, w = (e) => {
86
- m.value === "click" ? o.setActiveMenuPath(e) : o.setMenuTriggerType("click");
86
+ m.value === "click" ? r.setActiveMenuPath(e) : r.setMenuTriggerType("click");
87
87
  }, L = (e) => {
88
- o.setActiveMenuPath(e);
88
+ r.setActiveMenuPath(e);
89
89
  }, N = $([
90
90
  {
91
- name: "--el-menu-bg",
91
+ name: "--ssComponent-menu-bg",
92
92
  value: "#426ec4"
93
93
  },
94
94
  {
95
- name: "--el-submenu-hover-bg",
95
+ name: "--ssComponent-submenu-hover-bg",
96
96
  value: "#00000033"
97
97
  },
98
98
  {
99
- name: "--el-submenu-open-bg",
99
+ name: "--ssComponent-submenu-open-bg",
100
100
  value: "#2DA0FF"
101
101
  },
102
102
  {
103
- name: "--el-submenu-open-inline-bg",
103
+ name: "--ssComponent-submenu-open-inline-bg",
104
104
  value: "#1C4275"
105
105
  },
106
106
  {
107
- name: "--el-menuitem-hover-bg",
107
+ name: "--ssComponent-menuitem-hover-bg",
108
108
  value: "#1d7bef"
109
109
  },
110
110
  {
111
- name: "--el-menuitem-active-bg",
111
+ name: "--ssComponent-menuitem-active-bg",
112
112
  value: "#1d7bef"
113
113
  }
114
114
  ]), R = () => {
115
- var r;
115
+ var o;
116
116
  const e = document.documentElement;
117
- (r = N.value) == null || r.forEach((n) => {
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 r, n, s;
123
+ var o, n, s;
124
124
  if (e) {
125
- const u = (s = (n = (r = _(e)) == null ? void 0 : r.compData) == null ? void 0 : n[0]) == null ? void 0 : s.contents;
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
- o.setActiveMenuPath("");
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(o, c, p, m, f, d) {
140
+ function X(r, c, p, m, f, d) {
141
141
  const M = A("DynamicIcon"), g = A("ssMenu");
142
- return C(), b(g, {
143
- menuList: o.renderMenuList,
144
- onClickMenu: o.clickMenu,
145
- onOpenMenu: o.openMenu,
146
- onCloseMenu: o.closeMenu,
147
- onChangeMenuStyle: o.changeMenuStyle,
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-f74d7f0d"]]);
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 d, openBlock as o, Fragment as _, 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-V9qTN_Cu.js";
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(_, null, m(M.menuList, (e) => (o(), d(_, null, [
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(_, null, m(M.menuList, (t) => (o(), d(_, null, [
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-af84dbc4"]]);
131
+ }), z = /* @__PURE__ */ F(T, [["__scopeId", "data-v-2cbe7506"]]);
132
132
  export {
133
133
  z as default
134
134
  };