ss-component-new 1.1.17 → 1.1.18

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,5 +1,5 @@
1
1
  import { defineComponent as S, onMounted as A, resolveComponent as l, createElementBlock as d, openBlock as o, Fragment as m, renderList as M, createBlock as r, withCtx as s, createVNode as b, createSlots as g, renderSlot as u, mergeProps as O, computed as I } from "vue";
2
- import { u as R, s as q, _ as E } from "./menu-3a4UTvU1.js";
2
+ import { u as R, s as q, _ as E } from "./menu-hS9inuNL.js";
3
3
  const F = /* @__PURE__ */ S({
4
4
  __name: "menuItem",
5
5
  props: {
@@ -1,7 +1,7 @@
1
1
  import { defineAsyncComponent as B, computed as E, onMounted as F, resolveComponent as L, createBlock as f, openBlock as _, withCtx as S, resolveDynamicComponent as N, defineComponent as U, ref as G, watch as V, unref as q, createVNode as v, createElementVNode as z, toDisplayString as H } from "vue";
2
- import { E as M, u as J, s as C, c as D, _ as K } from "./menu-3a4UTvU1.js";
3
- import { u as Q } from "./modelComp-CFwQm9Yp.js";
4
- const A = B(() => import("./index-hjkvqVVf.js"));
2
+ import { E as M, u as J, s as C, c as D, _ as K } from "./menu-hS9inuNL.js";
3
+ import { u as Q } from "./modelComp-Eh2O6nl8.js";
4
+ const A = B(() => import("./index-BFdnTJMh.js"));
5
5
  A.install = (n) => {
6
6
  n.component("ssMenu", A);
7
7
  };
@@ -1,49 +1,52 @@
1
- import { ref as y, watch as M, createElementBlock as h, openBlock as i, createVNode as N, createCommentVNode as S, Fragment as G, renderList as K, createBlock as B, unref as J, resolveDynamicComponent as L, createElementVNode as x, toDisplayString as W } from "vue";
2
- import { p as w, u as Y, d as q, e as z, g as H, m as Q, a as X, b as Z, c as ee, s as ae } from "./array-BeEcIEzJ.js";
3
- import { u as P } from "./modelComp-CFwQm9Yp.js";
4
- import { _ as E, u as U, s as j, c as I } from "./menu-3a4UTvU1.js";
5
- import te from "./index-CeOZHsL0.js";
1
+ import { ref as y, watch as M, createElementBlock as m, openBlock as u, createVNode as F, createCommentVNode as D, Fragment as K, renderList as L, createBlock as E, unref as N, toDisplayString as P, resolveDynamicComponent as W, createElementVNode as x } from "vue";
2
+ import { p as j, u as Y, d as q, e as z, g as H, m as Q, a as X, b as Z, c as ee, s as ae } from "./array-DLhSgLgc.js";
3
+ import { u as U } from "./modelComp-Eh2O6nl8.js";
4
+ import { _ as O, u as R, s as A, c as I } from "./menu-hS9inuNL.js";
5
+ import te from "./index-DM0qZDHo.js";
6
6
  const se = { class: "system-wrap" }, oe = {
7
7
  key: 0,
8
8
  class: "show-content"
9
9
  }, ne = {
10
+ key: 0,
11
+ class: "item-view-group"
12
+ }, le = {
10
13
  __name: "index",
11
14
  props: {
12
15
  content: String,
13
16
  jsonContents: Array
14
17
  },
15
18
  emits: ["change"],
16
- setup(A, { emit: T }) {
17
- const a = A, F = T, g = P(w);
18
- Y(w);
19
- const C = U(), { itemData: m } = j(g), p = q(w), { selectIndex: $ } = j(p), { activeMenuPath: k, activeMenuOpenPaths: O, menuTriggerType: R } = j(C), v = y([]), _ = y([]), b = (t) => {
20
- F("change", {
19
+ setup(T, { emit: $ }) {
20
+ const a = T, V = $, g = U(j);
21
+ Y(j);
22
+ const C = R(), { itemData: d } = A(g), p = q(j), { selectIndex: S } = A(p), { activeMenuPath: w, activeMenuOpenPaths: J, menuTriggerType: G } = A(C), v = y([]), _ = y([]), b = (t) => {
23
+ V("change", {
21
24
  wholeValue: v.value,
22
25
  editValue: t
23
26
  });
24
- }, V = (t) => {
27
+ }, B = (t) => {
25
28
  const r = I(v.value), l = r == null ? void 0 : r.map((e, s) => (s === (t == null ? void 0 : t.index) && (e.compData = t == null ? void 0 : t.contents), e));
26
29
  v.value = l;
27
30
  };
28
31
  M(
29
- () => m.value,
32
+ () => d.value,
30
33
  () => {
31
- var r, l, e, s, o, n, u, f;
32
- if (!m.value || ((r = m.value) == null ? void 0 : r.length) === 0) return;
34
+ var r, l, e, s, o, n, i, f;
35
+ if (!d.value || ((r = d.value) == null ? void 0 : r.length) === 0) return;
33
36
  let t = null;
34
- if (!k.value)
35
- t = (e = (l = I(m.value)) == null ? void 0 : l.filter((d) => (d == null ? void 0 : d.comp) === "Group")) == null ? void 0 : e[0], C.setActiveMenuPath(t == null ? void 0 : t.name);
37
+ if (!w.value)
38
+ t = (e = (l = I(d.value)) == null ? void 0 : l.filter((h) => (h == null ? void 0 : h.comp) === "Group")) == null ? void 0 : e[0], C.setActiveMenuPath(t == null ? void 0 : t.name);
36
39
  else {
37
- const d = (s = I(m.value)) == null ? void 0 : s.filter((c) => (c == null ? void 0 : c.comp) === "Group");
38
- t = d == null ? void 0 : d.find((c) => c.name === k.value);
40
+ const h = (s = I(d.value)) == null ? void 0 : s.filter((c) => (c == null ? void 0 : c.comp) === "Group");
41
+ t = h == null ? void 0 : h.find((c) => c.name === w.value);
39
42
  }
40
- _.value = (n = (o = t == null ? void 0 : t.compData) == null ? void 0 : o[0]) == null ? void 0 : n.contents, v.value = (f = (u = t == null ? void 0 : t.compData) == null ? void 0 : u[0]) == null ? void 0 : f.contents, console.log("itemData监听", k.value, m.value);
43
+ _.value = (n = (o = t == null ? void 0 : t.compData) == null ? void 0 : o[0]) == null ? void 0 : n.contents, v.value = (f = (i = t == null ? void 0 : t.compData) == null ? void 0 : i[0]) == null ? void 0 : f.contents, console.log("itemData监听", w.value, d.value);
41
44
  },
42
45
  { deep: !0, immediate: !0 }
43
- ), M(() => k.value, (t) => {
46
+ ), M(() => w.value, (t) => {
44
47
  var r, l, e, s, o;
45
48
  if (console.log("点击-新-data2:", t), t) {
46
- const n = (r = I(m.value)) == null ? void 0 : r.find((u) => u.name === t);
49
+ const n = (r = I(d.value)) == null ? void 0 : r.find((i) => i.name === t);
47
50
  t && n ? (_.value = (e = (l = n == null ? void 0 : n.compData) == null ? void 0 : l[0]) == null ? void 0 : e.contents, v.value = (o = (s = n == null ? void 0 : n.compData) == null ? void 0 : s[0]) == null ? void 0 : o.contents, console.log("点击-新-data:", t, _.value)) : (_.value = [], v.value = []), p.setSelectIndex(""), p.setSelectMenu("");
48
51
  }
49
52
  }), M(
@@ -70,39 +73,40 @@ const se = { class: "system-wrap" }, oe = {
70
73
  },
71
74
  { deep: !0, immediate: !0 }
72
75
  );
73
- const D = (t) => H(t);
76
+ const k = (t) => H(t);
74
77
  return (t, r) => {
75
78
  var l;
76
- return i(), h("div", se, [
77
- N(te, { class: "sys-aside" }),
78
- ((l = _.value) == null ? void 0 : l.length) > 0 ? (i(), h("div", oe, [
79
- (i(!0), h(G, null, K(_.value, (e, s) => (i(), h("div", {
79
+ return u(), m("div", se, [
80
+ F(te, { class: "sys-aside" }),
81
+ ((l = _.value) == null ? void 0 : l.length) > 0 ? (u(), m("div", oe, [
82
+ (u(!0), m(K, null, L(_.value, (e, s) => (u(), m("div", {
80
83
  class: "item-content",
81
84
  key: s
82
85
  }, [
83
- J($) === "" || s.toString() === J($) ? (i(), B(L(D(e.comp)), {
86
+ N(S) === "" || s.toString() === N(S) ? (u(), m("div", ne, P(e.name), 1)) : D("", !0),
87
+ N(S) === "" || s.toString() === N(S) ? (u(), E(W(k(e.comp)), {
84
88
  itemData: e == null ? void 0 : e.compData,
85
89
  childItemData: e == null ? void 0 : e.itemChildData,
86
90
  key: s,
87
91
  onChange: b,
88
92
  index: s,
89
- onContentChange: V
90
- }, null, 40, ["itemData", "childItemData", "index"])) : S("", !0)
93
+ onContentChange: B
94
+ }, null, 40, ["itemData", "childItemData", "index"])) : D("", !0)
91
95
  ]))), 128))
92
- ])) : S("", !0)
96
+ ])) : D("", !0)
93
97
  ]);
94
98
  };
95
99
  }
96
- }, le = /* @__PURE__ */ E(ne, [["__scopeId", "data-v-0cd75f36"]]), re = { class: "add-model-content" }, ce = {
100
+ }, re = /* @__PURE__ */ O(le, [["__scopeId", "data-v-979a28e7"]]), ce = { class: "add-model-content" }, ue = {
97
101
  key: 0,
98
102
  class: "model-import-data"
99
- }, ue = { class: "import-button" }, ie = { key: 0 }, me = {
103
+ }, ie = { class: "import-button" }, me = { key: 0 }, de = {
100
104
  key: 1,
101
105
  class: "model-operate"
102
- }, de = { class: "model-select" }, he = { class: "model-fill" }, ge = {
106
+ }, he = { class: "model-select" }, ge = { class: "model-fill" }, ve = {
103
107
  key: 2,
104
108
  class: "model-view"
105
- }, ve = {
109
+ }, _e = {
106
110
  __name: "index",
107
111
  props: {
108
112
  mode: {
@@ -123,20 +127,20 @@ const se = { class: "system-wrap" }, oe = {
123
127
  }
124
128
  },
125
129
  emits: ["change"],
126
- setup(A, { emit: T }) {
127
- const a = A, F = T, g = y(""), C = y([]), m = y(0), p = P(w), $ = U(w), { itemData: k, originalData: O } = j(p), { activeMenuPath: R } = j($), v = y(null), _ = y(0), b = y(""), V = (e) => {
128
- var o, n, u;
130
+ setup(T, { emit: $ }) {
131
+ const a = T, V = $, g = y(""), C = y([]), d = y(0), p = U(j), S = R(j), { itemData: w, originalData: J } = A(p), { activeMenuPath: G } = A(S), v = y(null), _ = y(0), b = y(""), B = (e) => {
132
+ var o, n, i;
129
133
  const s = (o = I(e == null ? void 0 : e.wholeValue)) == null ? void 0 : o.map((f) => {
130
- var d;
131
- return (f == null ? void 0 : f.comp) === "Form" && (f.compData = (d = f.compData) == null ? void 0 : d.map((c) => ((c == null ? void 0 : c.key) === "formContent" && (c.contents = ee(c == null ? void 0 : c.contents)), c))), f;
134
+ var h;
135
+ return (f == null ? void 0 : f.comp) === "Form" && (f.compData = (h = f.compData) == null ? void 0 : h.map((c) => ((c == null ? void 0 : c.key) === "formContent" && (c.contents = ee(c == null ? void 0 : c.contents)), c))), f;
132
136
  });
133
- F("change", {
134
- originalContents: O.value,
137
+ V("change", {
138
+ originalContents: J.value,
135
139
  currentContents: e == null ? void 0 : e.wholeValue,
136
140
  editContent: e == null ? void 0 : e.editValue,
137
141
  arrayToContents: s
138
- }), ae(e == null ? void 0 : e.wholeValue, (n = e == null ? void 0 : e.editValue) == null ? void 0 : n.content, (u = e == null ? void 0 : e.editValue) == null ? void 0 : u.buttonName), console.log("change123", e == null ? void 0 : e.editValue, e == null ? void 0 : e.wholeValue);
139
- }, D = y([]), t = () => {
142
+ }), ae(e == null ? void 0 : e.wholeValue, (n = e == null ? void 0 : e.editValue) == null ? void 0 : n.content, (i = e == null ? void 0 : e.editValue) == null ? void 0 : i.buttonName), console.log("change123", e == null ? void 0 : e.editValue, e == null ? void 0 : e.wholeValue);
143
+ }, k = y([]), t = () => {
140
144
  v.value.click();
141
145
  }, r = (e) => {
142
146
  const s = e.target.files[0];
@@ -144,9 +148,9 @@ const se = { class: "system-wrap" }, oe = {
144
148
  const o = new FileReader();
145
149
  o.onload = (n) => {
146
150
  try {
147
- g.value = n.target.result, D.value = l(n.target.result), _.value++;
148
- } catch (u) {
149
- console.error("解析失败:", u);
151
+ g.value = n.target.result, k.value = l(n.target.result), _.value++;
152
+ } catch (i) {
153
+ console.error("解析失败:", i);
150
154
  }
151
155
  }, o.onerror = (n) => {
152
156
  console.error("文件读取错误:", n);
@@ -162,7 +166,7 @@ const se = { class: "system-wrap" }, oe = {
162
166
  () => _.value,
163
167
  () => {
164
168
  var e;
165
- ((e = D.value) == null ? void 0 : e.length) !== 0 && (p.setOriginalData(D.value), p.setItemData(D.value));
169
+ ((e = k.value) == null ? void 0 : e.length) !== 0 && (p.setOriginalData(k.value), p.setItemData(k.value));
166
170
  },
167
171
  { deep: !0, immediate: !0 }
168
172
  );
@@ -173,9 +177,9 @@ const se = { class: "system-wrap" }, oe = {
173
177
  return JSON.parse(s);
174
178
  } catch (o) {
175
179
  try {
176
- const u = new Function(`return ${s}`)();
177
- if (Array.isArray(u) || typeof u == "object")
178
- return u;
180
+ const i = new Function(`return ${s}`)();
181
+ if (Array.isArray(i) || typeof i == "object")
182
+ return i;
179
183
  throw new Error(`解析结果不是有效的数组或对象: ${o}`);
180
184
  } catch (n) {
181
185
  throw new Error(`无法解析JSON: ${n.message}`);
@@ -184,9 +188,9 @@ const se = { class: "system-wrap" }, oe = {
184
188
  };
185
189
  return (e, s) => {
186
190
  var o;
187
- return i(), h("div", re, [
188
- ((o = a == null ? void 0 : a.jsonContents) == null ? void 0 : o.length) === 0 && (a != null && a.showButton) ? (i(), h("div", ce, [
189
- x("div", ue, [
191
+ return u(), m("div", ce, [
192
+ ((o = a == null ? void 0 : a.jsonContents) == null ? void 0 : o.length) === 0 && (a != null && a.showButton) ? (u(), m("div", ue, [
193
+ x("div", ie, [
190
194
  x("input", {
191
195
  type: "file",
192
196
  ref_key: "fileInput",
@@ -199,40 +203,40 @@ const se = { class: "system-wrap" }, oe = {
199
203
  onClick: t,
200
204
  class: "import-button-content"
201
205
  }, "导入文件"),
202
- b.value ? (i(), h("span", ie, W(b.value), 1)) : S("", !0)
206
+ b.value ? (u(), m("span", me, P(b.value), 1)) : D("", !0)
203
207
  ])
204
- ])) : S("", !0),
205
- (a == null ? void 0 : a.mode) === "edit" ? (i(), h("div", me, [
206
- x("div", de, [
207
- N(Q)
208
+ ])) : D("", !0),
209
+ (a == null ? void 0 : a.mode) === "edit" ? (u(), m("div", de, [
210
+ x("div", he, [
211
+ F(Q)
208
212
  ]),
209
- (i(), h("div", {
213
+ (u(), m("div", {
210
214
  class: "model-show",
211
- key: m.value
215
+ key: d.value
212
216
  }, [
213
- N(X)
217
+ F(X)
214
218
  ])),
215
- x("div", he, [
216
- N(Z)
219
+ x("div", ge, [
220
+ F(Z)
217
221
  ])
218
- ])) : S("", !0),
219
- (a == null ? void 0 : a.mode) === "view" ? (i(), h("div", ge, [
220
- (i(), B(le, {
222
+ ])) : D("", !0),
223
+ (a == null ? void 0 : a.mode) === "view" ? (u(), m("div", ve, [
224
+ (u(), E(re, {
221
225
  content: g.value,
222
- onChange: V,
226
+ onChange: B,
223
227
  jsonContents: C.value,
224
- key: m.value
228
+ key: d.value
225
229
  }, null, 8, ["content", "jsonContents"]))
226
- ])) : S("", !0)
230
+ ])) : D("", !0)
227
231
  ]);
228
232
  };
229
233
  }
230
- }, _e = /* @__PURE__ */ E(ve, [["__scopeId", "data-v-073c3b72"]]), fe = {
234
+ }, fe = /* @__PURE__ */ O(_e, [["__scopeId", "data-v-c8a54bd8"]]), ye = {
231
235
  __name: "index",
232
- setup(A) {
233
- return (T, a) => (i(), B(_e, { class: "ssComponent" }));
236
+ setup(T) {
237
+ return ($, a) => (u(), E(fe, { class: "ssComponent" }));
234
238
  }
235
- }, ke = /* @__PURE__ */ E(fe, [["__scopeId", "data-v-f196ec9f"]]);
239
+ }, we = /* @__PURE__ */ O(ye, [["__scopeId", "data-v-f196ec9f"]]);
236
240
  export {
237
- ke as default
241
+ we as default
238
242
  };