ss-component-new 1.1.366 → 1.1.367

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.
Files changed (81) hide show
  1. package/dist/{array-B4OYH6uL.cjs → array-Cs_qeJ2m.cjs} +1 -1
  2. package/dist/{array-EGWOD_Yi.js → array-I0ed2wow.js} +2 -2
  3. package/dist/{cloneDeep-BPCav0OY.cjs → cloneDeep-CYcGhlzG.cjs} +1 -1
  4. package/dist/{cloneDeep-D3jWUY57.js → cloneDeep-GOtDTHJH.js} +1 -1
  5. package/dist/{index-DxeIJqcl.js → index-8EjfXioS.js} +1 -1
  6. package/dist/{index-FnUvbwkl.cjs → index-8OLisgK0.cjs} +1 -1
  7. package/dist/{index-BPLD6fuH.js → index-B5VuM8l5.js} +8 -8
  8. package/dist/{index-CAfIBffc.cjs → index-B7Wi5BZf.cjs} +1 -1
  9. package/dist/{index-B7rnt0a7.js → index-BCKmCfQY.js} +3 -3
  10. package/dist/{index-Cj9Wq_7v.cjs → index-BDDKdGJX.cjs} +1 -1
  11. package/dist/{index-Cal7dRFc.js → index-BPWbJd07.js} +1 -1
  12. package/dist/{index-DQewAWSX.js → index-BTsOEEe8.js} +5 -5
  13. package/dist/{index-DsSqH7Ku.js → index-BUmHqNSQ.js} +5 -5
  14. package/dist/{index-CN73stto.cjs → index-BVtKkvlP.cjs} +1 -1
  15. package/dist/{index-KKYTpn-0.js → index-BWLxiwts.js} +4 -4
  16. package/dist/{index-Dy0Bjmrr.js → index-BpmoTHTK.js} +15 -15
  17. package/dist/{index-BSd6lCCf.js → index-BqCSda61.js} +3 -3
  18. package/dist/{index-D0Xtu3c5.js → index-Bt3Ruo-D.js} +4 -4
  19. package/dist/{index-BBvGttI3.cjs → index-BvA8vJuJ.cjs} +1 -1
  20. package/dist/{index-BovJtyyV.cjs → index-Bwgh1tDh.cjs} +1 -1
  21. package/dist/{index-9Kq2L6hA.cjs → index-C4arHEk-.cjs} +1 -1
  22. package/dist/{index-1LyKu48J.cjs → index-CDkcPYW6.cjs} +1 -1
  23. package/dist/{index-Cnigg-Vb.cjs → index-CFOUGn9U.cjs} +1 -1
  24. package/dist/{index-CdrtM6Jl.cjs → index-CKLAjhdz.cjs} +1 -1
  25. package/dist/{index-C_zK0qeZ.js → index-CUw8elUc.js} +3 -3
  26. package/dist/{index-CMza6E0Y.js → index-C_LjwD8t.js} +6 -6
  27. package/dist/{index-Bxt_jC-e.js → index-CdOw3chz.js} +3 -3
  28. package/dist/{index-Dp7ftR-s.cjs → index-CeWS20go.cjs} +1 -1
  29. package/dist/{index-BWoxDyyu.js → index-CpCocC41.js} +1 -1
  30. package/dist/{index-CEVLI-tF.cjs → index-D6rdau3q.cjs} +1 -1
  31. package/dist/{index-CylVtJFa.cjs → index-D7RMQttr.cjs} +1 -1
  32. package/dist/{index-FipljzbJ.cjs → index-D9bPG3j0.cjs} +1 -1
  33. package/dist/{index-Dq0BnanX.js → index-DGFAibP8.js} +6 -6
  34. package/dist/{index-qWPIXtmB.cjs → index-DH0ET7m4.cjs} +1 -1
  35. package/dist/{index-B1KIGMDS.cjs → index-DPBA1Q25.cjs} +1 -1
  36. package/dist/{index-Cks4xBFc.js → index-DPpVsGw9.js} +7 -7
  37. package/dist/{index-DgdlwjkF.js → index-DRUsyai9.js} +5 -5
  38. package/dist/{index-DXu2C7E2.js → index-DTxixBDx.js} +1 -1
  39. package/dist/{index-1mb-R5LL.js → index-Dkb7lD6V.js} +8 -8
  40. package/dist/{index-CTASWvkf.js → index-DmyMy020.js} +9 -9
  41. package/dist/{index-BXO1mk6t.cjs → index-DoPfcd5q.cjs} +1 -1
  42. package/dist/{index-BK34ZIUl.cjs → index-Dqzy8-xb.cjs} +1 -1
  43. package/dist/{index-DPoMcIHZ.js → index-NnlO4vSZ.js} +7 -7
  44. package/dist/{index-r4-byc3l.cjs → index-OCvy-QIo.cjs} +1 -1
  45. package/dist/{index-B6D0Zmro.js → index-Od7_9YnM.js} +4 -4
  46. package/dist/{index-Bo8sDOPU.js → index-PCCtRzDJ.js} +4 -4
  47. package/dist/{index-DQXp-tQk.js → index-Qx0GuwHr.js} +1 -1
  48. package/dist/{index-Cd0GOTJL.cjs → index-UKfyjk2G.cjs} +1 -1
  49. package/dist/{index-BQQE4RO9.js → index-Uzbrsz3o.js} +4 -4
  50. package/dist/{index-CkgqQw5c.js → index-c9nu1Oxk.js} +4 -4
  51. package/dist/{index-DjI83upr.js → index-d44crVNl.js} +6 -6
  52. package/dist/{index-h3vgrWAC.cjs → index-fULzuqL0.cjs} +1 -1
  53. package/dist/{index-Xd0gl2O5.cjs → index-kxN4kJ1s.cjs} +1 -1
  54. package/dist/{index-EgiRVqNe.cjs → index-mhef-1Zo.cjs} +1 -1
  55. package/dist/{index-B8PQq8Z4.cjs → index-sRwTHKAL.cjs} +1 -1
  56. package/dist/{index-C67VR66n.cjs → index-wAG1B1TR.cjs} +1 -1
  57. package/dist/{index-D_80-VnL.cjs → index-xjuo15AK.cjs} +1 -1
  58. package/dist/{index-Dj7KpYhE.cjs → index-zvArGV4H.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_script_setup_true_lang-CEx7p4se.cjs → index.vue_vue_type_script_setup_true_lang-CfJGn5rz.cjs} +1 -1
  60. package/dist/{index.vue_vue_type_script_setup_true_lang-CE6ciJHv.js → index.vue_vue_type_script_setup_true_lang-D8xCoFmH.js} +1 -1
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_23015cb0_lang-BfO2BZm9.js → index.vue_vue_type_style_index_0_scoped_23015cb0_lang-DDredAHL.js} +13 -13
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_23015cb0_lang-_1kiYpwh.cjs → index.vue_vue_type_style_index_0_scoped_23015cb0_lang-Db_d3OS1.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-CpZkvXyX.js → index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-Cs21Q0vD.js} +55 -39
  64. package/dist/index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-i5FsC2rm.cjs +1 -0
  65. package/dist/{login-cDG_pssN.cjs → login-CDUTeSY_.cjs} +1 -1
  66. package/dist/{login-DKf6sQrA.js → login-DMbjMzkS.js} +2 -2
  67. package/dist/{main-BY1dJ_uK.cjs → main-CRtBg87K.cjs} +1 -1
  68. package/dist/{main-DnQRFkkz.js → main-D2KxIY0t.js} +7 -7
  69. package/dist/{menu-eau-OVSc.js → menu-D_3gHkG4.js} +1 -1
  70. package/dist/{menu-Bi2msF1Z.cjs → menu-Da5Ht5hG.cjs} +1 -1
  71. package/dist/ss-component.cjs +1 -1
  72. package/dist/ss-component.css +1 -1
  73. package/dist/ss-component.js +7 -7
  74. package/dist/ss-component3.cjs +1 -1
  75. package/dist/ss-component3.js +1 -1
  76. package/package.json +1 -1
  77. package/dist/index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-BX_0yNEO.cjs +0 -1
  78. package/dist/obj/model.mtl +0 -42
  79. package/dist/obj/model.obj +0 -26110
  80. package/public/obj/model.mtl +0 -42
  81. package/public/obj/model.obj +0 -26110
@@ -1,23 +1,23 @@
1
1
  import { defineAsyncComponent as $, computed as p, onMounted as w, resolveComponent as q, createBlock as C, openBlock as E, withCtx as G, resolveDynamicComponent as Q, defineComponent as X, defineProps as Y, ref as h, watch as y, reactive as Z } from "vue";
2
- import { E as ee } from "./index-CTASWvkf.js";
3
- import { u as ne, s as d, g as ae } from "./menu-eau-OVSc.js";
4
- import { s as te } from "./index-B6D0Zmro.js";
5
- import { u as re } from "./index-CMza6E0Y.js";
6
- import { useRouter as oe } from "vue-router";
7
- import { u as le } from "./login-DKf6sQrA.js";
8
- import { g as se } from "./index-Cks4xBFc.js";
9
- import { c as D } from "./cloneDeep-D3jWUY57.js";
10
- const M = $(() => import("./index-B6D0Zmro.js").then((i) => i.p));
11
- M.install = (i) => {
12
- i.component("ssMenu", M);
2
+ import { E as ee } from "./index-DmyMy020.js";
3
+ import { u as ne, s as d, g as ae } from "./menu-D_3gHkG4.js";
4
+ import { s as te } from "./index-Od7_9YnM.js";
5
+ import { u as re } from "./index-C_LjwD8t.js";
6
+ import { useRouter as le } from "vue-router";
7
+ import { u as oe } from "./login-DMbjMzkS.js";
8
+ import { g as se } from "./index-DPpVsGw9.js";
9
+ import { c as D } from "./cloneDeep-GOtDTHJH.js";
10
+ const M = $(() => import("./index-Od7_9YnM.js").then((u) => u.p));
11
+ M.install = (u) => {
12
+ u.component("ssMenu", M);
13
13
  };
14
- const ie = {
14
+ const ue = {
15
15
  __name: "index",
16
16
  props: {
17
17
  name: String
18
18
  },
19
- setup(i) {
20
- const s = i, b = p(() => ee[s.name]);
19
+ setup(u) {
20
+ const s = u, b = p(() => ee[s.name]);
21
21
  return w(() => {
22
22
  }), (v, m) => {
23
23
  const S = q("el-icon");
@@ -29,7 +29,7 @@ const ie = {
29
29
  });
30
30
  };
31
31
  }
32
- }, ue = [
32
+ }, ie = [
33
33
  {
34
34
  name: "--vertical-menu-bg",
35
35
  value: "#051E37"
@@ -160,6 +160,10 @@ const ie = {
160
160
  name: "--vertical-submenu-hover-bg",
161
161
  value: "#72B02D"
162
162
  },
163
+ {
164
+ name: "--vertical-submenu-active-color",
165
+ value: "#323333"
166
+ },
163
167
  {
164
168
  name: "--vertical-submenu-open-bg",
165
169
  value: "#72B02D"
@@ -168,6 +172,18 @@ const ie = {
168
172
  name: "--vertical-submenu-open-inline-bg",
169
173
  value: "#F6F6F6"
170
174
  },
175
+ {
176
+ name: "--vertical-submenu-color",
177
+ value: "#323333"
178
+ },
179
+ {
180
+ name: "--vertical-submenu-menuitem-color",
181
+ value: "#323333"
182
+ },
183
+ {
184
+ name: "--vertical-submenu-menuitem-active-color",
185
+ value: "#72B02D"
186
+ },
171
187
  {
172
188
  name: "--vertical-menuitem-hover-bg",
173
189
  value: "#72B02D"
@@ -270,7 +286,7 @@ const ie = {
270
286
  name: "--ssbutton-special-bg",
271
287
  value: "rgba(255,255,255,0.2)"
272
288
  }
273
- ], _e = [
289
+ ], Be = [
274
290
  {
275
291
  name: "--ssbutton-theme-color",
276
292
  value: "#323333"
@@ -283,22 +299,22 @@ const ie = {
283
299
  name: "--ssbutton-special-bg",
284
300
  value: "rgba(255, 255, 255, 0.2)"
285
301
  }
286
- ], Be = X({
302
+ ], _e = X({
287
303
  name: "menu",
288
304
  components: {
289
305
  ssMenu: M,
290
- DynamicIcon: ie,
306
+ DynamicIcon: ue,
291
307
  ssDialog: te
292
308
  },
293
309
  setup() {
294
- const i = Y({
310
+ const u = Y({
295
311
  mode: {
296
312
  type: String,
297
313
  default: "vertical"
298
314
  }
299
- }), s = ne(), b = re(), v = h(0), m = oe(), { asideMenus: S, rawMenus: _, menuTriggerType: B, permissionSideMenus: ve, platform: T } = d(s);
315
+ }), s = ne(), b = re(), v = h(0), m = le(), { asideMenus: S, rawMenus: B, menuTriggerType: _, permissionSideMenus: ve, platform: T } = d(s);
300
316
  d(b);
301
- const H = le(), { structureData: ge } = d(H), P = h([]), W = p(() => i == null ? void 0 : i.mode), I = (e) => {
317
+ const H = oe(), { structureData: ge } = d(H), P = h([]), W = p(() => u == null ? void 0 : u.mode), I = (e) => {
302
318
  let n = [], a = [];
303
319
  return e == null || e.forEach((t) => {
304
320
  n = z(t, a);
@@ -308,19 +324,19 @@ const ie = {
308
324
  e == null || e.forEach((r) => {
309
325
  Array.isArray(r) ? t.push({ children: z(r, []) }) : t.push({ title: r });
310
326
  });
311
- let o = t.reduce((r, f) => (Object.entries(f).forEach(([u, l]) => {
312
- r[u] === void 0 ? l != null && l.title ? r[u] = [l] : r[u] = l : (Array.isArray(r[u]) || (r[u] = [{ title: r[u] }]), l != null && l.title || Array.isArray(l) ? r[u].push(l) : r[u].push({ title: l }));
327
+ let l = t.reduce((r, f) => (Object.entries(f).forEach(([i, o]) => {
328
+ r[i] === void 0 ? o != null && o.title ? r[i] = [o] : r[i] = o : (Array.isArray(r[i]) || (r[i] = [{ title: r[i] }]), o != null && o.title || Array.isArray(o) ? r[i].push(o) : r[i].push({ title: o }));
313
329
  }), r), {});
314
- return o = N(D(o)), a.push(o), Array.isArray(a) && (a == null ? void 0 : a.length) > 1 ? a : a == null ? void 0 : a[0];
330
+ return l = N(D(l)), a.push(l), Array.isArray(a) && (a == null ? void 0 : a.length) > 1 ? a : a == null ? void 0 : a[0];
315
331
  }, N = (e) => {
316
332
  var n, a, t;
317
- return Array.isArray(e == null ? void 0 : e.title) && ((n = e == null ? void 0 : e.title) == null ? void 0 : n.length) === ((t = (a = e == null ? void 0 : e.title) == null ? void 0 : a.filter((o) => o.title)) == null ? void 0 : t.length) ? e == null ? void 0 : e.title : Array.isArray(e == null ? void 0 : e.children) ? R(e) : e;
333
+ return Array.isArray(e == null ? void 0 : e.title) && ((n = e == null ? void 0 : e.title) == null ? void 0 : n.length) === ((t = (a = e == null ? void 0 : e.title) == null ? void 0 : a.filter((l) => l.title)) == null ? void 0 : t.length) ? e == null ? void 0 : e.title : Array.isArray(e == null ? void 0 : e.children) ? R(e) : e;
318
334
  }, R = (e) => {
319
335
  var a;
320
336
  const n = e;
321
337
  return n.children = (a = n.children) == null ? void 0 : a.map((t) => {
322
- var o;
323
- return (o = t == null ? void 0 : t.title) != null && o.children ? t == null ? void 0 : t.title : t;
338
+ var l;
339
+ return (l = t == null ? void 0 : t.title) != null && l.children ? t == null ? void 0 : t.title : t;
324
340
  }), n;
325
341
  }, k = p(() => {
326
342
  let e = [...S.value];
@@ -331,7 +347,7 @@ const ie = {
331
347
  }), K = (e) => {
332
348
  s.setMenuTriggerType("click"), s.setActiveMenuPath(e == null ? void 0 : e.path), e.isRouter ? m.push(e.path) : m.push("/");
333
349
  }, L = (e) => {
334
- B.value === "click" ? v.value === 1 ? s.setActiveMenuPath(sessionStorage.getItem("pageKey")) : s.setActiveMenuPath(e) : s.setMenuTriggerType("click"), e != null && e.startsWith("/") ? m.push(e) : m.push("/"), v.value++;
350
+ _.value === "click" ? v.value === 1 ? s.setActiveMenuPath(sessionStorage.getItem("pageKey")) : s.setActiveMenuPath(e) : s.setMenuTriggerType("click"), e != null && e.startsWith("/") ? m.push(e) : m.push("/"), v.value++;
335
351
  }, O = (e) => {
336
352
  s.setActiveMenuPath(e);
337
353
  }, g = (e) => {
@@ -348,8 +364,8 @@ const ie = {
348
364
  return e ? JSON.parse(e) : [];
349
365
  });
350
366
  y(() => T.value, (e) => {
351
- e === "browser" ? g(ue) : e === "client" && (g(ce), g(me));
352
- }, { immediate: !0 }), y(() => _.value, (e) => {
367
+ e === "browser" ? g(ie) : e === "client" && (g(ce), g(me));
368
+ }, { immediate: !0 }), y(() => B.value, (e) => {
353
369
  if (e) {
354
370
  const n = e;
355
371
  P.value = I(n);
@@ -360,8 +376,8 @@ const ie = {
360
376
  });
361
377
  const j = (e, n) => {
362
378
  function a(t) {
363
- t == null || t.forEach((o) => {
364
- o.show = n == null ? void 0 : n.some((r) => r == null ? void 0 : r.includes(o.path)), o.children && a(o.children);
379
+ t == null || t.forEach((l) => {
380
+ l.show = n == null ? void 0 : n.some((r) => r == null ? void 0 : r.includes(l.path)), l.children && a(l.children);
365
381
  });
366
382
  }
367
383
  return a(e), e;
@@ -395,11 +411,11 @@ const ie = {
395
411
  });
396
412
  if (((a = n == null ? void 0 : n.data) == null ? void 0 : a.code) === 200) {
397
413
  const t = D(n.data.result);
398
- F.value = t == null ? void 0 : t.map((o) => {
414
+ F.value = t == null ? void 0 : t.map((l) => {
399
415
  var r, f;
400
416
  return {
401
- id: o == null ? void 0 : o.id,
402
- ...(f = (r = o == null ? void 0 : o.value) == null ? void 0 : r.pageData) == null ? void 0 : f.structure
417
+ id: l == null ? void 0 : l.id,
418
+ ...(f = (r = l == null ? void 0 : l.value) == null ? void 0 : r.pageData) == null ? void 0 : f.structure
403
419
  };
404
420
  }), console.log(4545, F.value);
405
421
  }
@@ -431,11 +447,11 @@ const ie = {
431
447
  }
432
448
  });
433
449
  export {
434
- Be as _,
435
- ie as a,
450
+ _e as _,
451
+ ue as a,
436
452
  we as b,
437
- _e as c,
438
- ue as d,
453
+ Be as c,
454
+ ie as d,
439
455
  De as e,
440
456
  ce as f,
441
457
  me as g,
@@ -0,0 +1 @@
1
+ "use strict";const r=require("vue"),U=require("./index-kxN4kJ1s.cjs"),g=require("./menu-Da5Ht5hG.cjs"),j=require("./index-B7Wi5BZf.cjs"),J=require("./index-zvArGV4H.cjs"),G=require("vue-router"),Q=require("./login-CDUTeSY_.cjs"),X=require("./index-BDDKdGJX.cjs"),C=require("./cloneDeep-CYcGhlzG.cjs"),b=r.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-B7Wi5BZf.cjs")).then(i=>i.index$1));b.install=i=>{i.component("ssMenu",b)};const A={__name:"index",props:{name:String},setup(i){const s=i,d=r.computed(()=>U.ElIcons[s.name]);return r.onMounted(()=>{}),(f,c)=>{const S=r.resolveComponent("el-icon");return r.openBlock(),r.createBlock(S,null,{default:r.withCtx(()=>[(r.openBlock(),r.createBlock(r.resolveDynamicComponent(d.value)))]),_:1})}}},D=[{name:"--vertical-menu-bg",value:"#051E37"},{name:"--vertical-submenu-hover-bg",value:"#3356E8"},{name:"--vertical-submenu-open-bg",value:"#3356E8"},{name:"--vertical-submenu-open-inline-bg",value:"#F6F6F6"},{name:"--vertical-submenu-menuitem-color",value:"#051E37"},{name:"--vertical-submenu-menuitem-active-color",value:"#3356E8"},{name:"--vertical-submenu-color",value:"#ffffff"},{name:"--vertical-submenu-active-color",value:"#ffffff"},{name:"--vertical-menuitem-hover-bg",value:"#3356E8"},{name:"--vertical-menuitem-active-bg",value:"#3356E8"},{name:"--vertical-menuitem-color",value:"#ffffff"},{name:"--vertical-menuitem-active-color",value:"#ffffff"},{name:"--vertical-menuitem-fontSize",value:"16px"},{name:"--vertical-menuitem-fontWeight",value:"400"},{name:"--vertical-menuitem-active-fontWeight",value:"600"},{name:"--vertical-menuitem-font",value:"SourceHanSansCN, SourceHanSansCN"},{name:"--vertical-menuitem-radius",value:"8px"},{name:"--vertical-menu-padding",value:"0.5rem"}],Y=[{name:"--horizontal-menu-bg",value:"#323333"},{name:"--horizontal-submenu-hover-bg",value:"#3356E8"},{name:"--horizontal-submenu-open-bg",value:"#3356E8"},{name:"--horizontal-submenu-open-inline-bg",value:"#3356E8"},{name:"--horizontal-menuitem-hover-bg",value:"#3356E8"},{name:"--horizontal-menuitem-active-bg",value:"#3356E8"},{name:"--horizontal-menuitem-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-active-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-fontSize",value:"1.25rem"},{name:"--horizontal-menuitem-fontWeight",value:"400"},{name:"--horizontal-menuitem-active-fontWeight",value:"600"},{name:"--horizontal-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"}],y=[{name:"--vertical-menu-bg",value:"#ffffff"},{name:"--vertical-submenu-hover-bg",value:"#72B02D"},{name:"--vertical-submenu-active-color",value:"#323333"},{name:"--vertical-submenu-open-bg",value:"#72B02D"},{name:"--vertical-submenu-open-inline-bg",value:"#F6F6F6"},{name:"--vertical-submenu-color",value:"#323333"},{name:"--vertical-submenu-menuitem-color",value:"#323333"},{name:"--vertical-submenu-menuitem-active-color",value:"#72B02D"},{name:"--vertical-menuitem-hover-bg",value:"#72B02D"},{name:"--vertical-menuitem-active-bg",value:"#72B02D"},{name:"--vertical-menuitem-color",value:"#323333"},{name:"--vertical-menuitem-active-color",value:"#323333"},{name:"--vertical-menuitem-fontSize",value:"1rem"},{name:"--vertical-menuitem-fontWeight",value:"400"},{name:"--vertical-menuitem-active-fontWeight",value:"600"},{name:"--vertical-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"},{name:"--vertical-menuitem-radius",value:"8px"},{name:"--vertical-menu-padding",value:"0"}],E=[{name:"--horizontal-menu-bg",value:"#323333"},{name:"--horizontal-submenu-hover-bg",value:"#FFFFFF"},{name:"--horizontal-submenu-open-bg",value:"#72B02D"},{name:"--horizontal-submenu-open-inline-bg",value:"#1C4275"},{name:"--horizontal-menuitem-hover-bg",value:"#72B02D"},{name:"--horizontal-menuitem-active-bg",value:"#72B02D"},{name:"--horizontal-menuitem-color",value:"#FFFFFF"},{name:"--horizontal-menuitem-active-color",value:"#323333"},{name:"--horizontal-menuitem-fontSize",value:"1.25rem"},{name:"--horizontal-menuitem-fontWeight",value:"400"},{name:"--horizontal-menuitem-active-fontWeight",value:"600"},{name:"--horizontal-menuitem-font",value:"SourceHanSansSC, SourceHanSansSC"}],Z=[{name:"--ssbutton-theme-color",value:"#FFFFFF"},{name:"--ssbutton-theme-bg",value:"#3356E8"},{name:"--ssbutton-special-bg",value:"rgba(255,255,255,0.2)"}],ee=[{name:"--ssbutton-theme-color",value:"#323333"},{name:"--ssbutton-theme-bg",value:"#72B02D"},{name:"--ssbutton-special-bg",value:"rgba(255, 255, 255, 0.2)"}],ne=r.defineComponent({name:"menu",components:{ssMenu:b,DynamicIcon:A,ssDialog:j.ssDialog},setup(){const i=r.defineProps({mode:{type:String,default:"vertical"}}),s=g.useMenuState(),d=J.useModelComp(),f=r.ref(0),c=G.useRouter(),{asideMenus:S,rawMenus:w,menuTriggerType:_,permissionSideMenus:ae,platform:B}=g.storeToRefs(s);g.storeToRefs(d);const T=Q.useLoginState(),{structureData:te}=g.storeToRefs(T),H=r.ref([]),P=r.computed(()=>i==null?void 0:i.mode),q=e=>{let n=[],a=[];return e==null||e.forEach(t=>{n=M(t,a)}),n},M=(e,n)=>{const a=n,t=[];e==null||e.forEach(l=>{Array.isArray(l)?t.push({children:M(l,[])}):t.push({title:l})});let o=t.reduce((l,p)=>(Object.entries(p).forEach(([m,u])=>{l[m]===void 0?u!=null&&u.title?l[m]=[u]:l[m]=u:(Array.isArray(l[m])||(l[m]=[{title:l[m]}]),u!=null&&u.title||Array.isArray(u)?l[m].push(u):l[m].push({title:u}))}),l),{});return o=R(C.cloneDeep(o)),a.push(o),Array.isArray(a)&&(a==null?void 0:a.length)>1?a:a==null?void 0:a[0]},R=e=>{var n,a,t;return Array.isArray(e==null?void 0:e.title)&&((n=e==null?void 0:e.title)==null?void 0:n.length)===((t=(a=e==null?void 0:e.title)==null?void 0:a.filter(o=>o.title))==null?void 0:t.length)?e==null?void 0:e.title:Array.isArray(e==null?void 0:e.children)?W(e):e},W=e=>{var a;const n=e;return n.children=(a=n.children)==null?void 0:a.map(t=>{var o;return(o=t==null?void 0:t.title)!=null&&o.children?t==null?void 0:t.title:t}),n},k=r.computed(()=>{let e=[...S.value];if((e==null?void 0:e.length)===0)return c.push("/"),[];const n=L(e,x.value);return n.isFlag||(e=n==null?void 0:n.data),s.setMenus(e),e}),I=e=>{s.setMenuTriggerType("click"),s.setActiveMenuPath(e==null?void 0:e.path),e.isRouter?c.push(e.path):c.push("/")},N=e=>{_.value==="click"?f.value===1?s.setActiveMenuPath(sessionStorage.getItem("pageKey")):s.setActiveMenuPath(e):s.setMenuTriggerType("click"),e!=null&&e.startsWith("/")?c.push(e):c.push("/"),f.value++},$=e=>{s.setActiveMenuPath(e)},h=e=>{const n=document.documentElement;e==null||e.forEach(a=>{n.style.setProperty(a.name,a.value)})};r.onMounted(()=>{f.value=1});const x=r.computed(()=>{const e=sessionStorage.getItem("authority");return e?JSON.parse(e):[]});r.watch(()=>B.value,e=>{e==="browser"?h(D):e==="client"&&(h(E),h(y))},{immediate:!0}),r.watch(()=>w.value,e=>{if(e){const n=e;H.value=q(n)}else s.setActiveMenuPath("")},{immediate:!0});const K=(e,n)=>{function a(t){t==null||t.forEach(o=>{o.show=n==null?void 0:n.some(l=>l==null?void 0:l.includes(o.path)),o.children&&a(o.children)})}return a(e),e},L=(e,n)=>{if(Array.isArray(n)){const a=Array.from(new Set(n==null?void 0:n.map(t=>t.substring(0,t.lastIndexOf("/")))));return{data:K(e,a),isFlag:!1}}else return{isFlag:(n==null?void 0:n.toUpperCase())==="SUPERADMIN"}},v=r.reactive({show:!1,title:"菜单配置",width:"30%"}),O=e=>X.getComponent(e),z=r.ref({}),F=r.ref([]),V=async e=>{var a;const n=await g.getInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:e==null?void 0:e.path,type:"structure",rootNodePath:e==null?void 0:e.rootNodePath,structureBelong:"dialogConfig",parentTable:"",version:1}});if(((a=n==null?void 0:n.data)==null?void 0:a.code)===200){const t=C.cloneDeep(n.data.result);F.value=t==null?void 0:t.map(o=>{var l,p;return{id:o==null?void 0:o.id,...(p=(l=o==null?void 0:o.value)==null?void 0:l.pageData)==null?void 0:p.structure}}),console.log(4545,F.value)}};return{handleCompChange:e=>{console.log("handleCompChange",e)},dialogForm:z,dialogRenderComps:F,getComponents:O,clickSubmitForm:()=>{console.log("clickSubmitForm",z.value),v.show=!1},dialogInfo:v,beforeDialogDestroy:()=>{v.show=!1},clickMenuIcon:async e=>{await V(e),v.show=(e==null?void 0:e.trigger)==="openDialog",console.log("clickMenuIcon",e,v)},mode:P,renderMenuList:k,clickMenu:I,openMenu:N,closeMenu:$,changeMenuStyle:h}}});exports._sfc_main=ne;exports._sfc_main$1=A;exports.browserHorizontalMenuClasses=Y;exports.browserThemeConfig=Z;exports.browserVerticalMenuClasses=D;exports.clientHorizontalMenuClasses=E;exports.clientThemeConfig=ee;exports.clientVerticalMenuClasses=y;exports.ssMenu=b;
@@ -1 +1 @@
1
- "use strict";const i=require("./menu-Bi2msF1Z.cjs"),h=require("./index-BovJtyyV.cjs");function S(e,t,r){for(const n of e){if(n[t]===r)return n;if(n.children&&n.children.length>0){const o=S(n.children,t,r);if(o)return o}}return null}function m(){const e=new Date,t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),o=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0"),a=String(e.getSeconds()).padStart(2,"0");return`${t}-${r}-${n} ${o}:${s}:${a}`}function I(e,t){const r=t.split("/");let n=e,o=null;for(let s of r){const a=n.find(c=>c.title===s);if(!a)return null;o||(o=a),n=a.children??[]}return o}const K=i.useMenuState(h.pinia),{menus:A}=i.storeToRefs(K),v=i.defineStore("loginState",{state:()=>({superAdminInfo:{},cryptoInfo:{publicKey:"",privateKey:""},loginUserInfo:{},structureData:[],isStructureExist:!1}),actions:{setSuperAdminInfo(e){this.superAdminInfo=e},setLoginUserInfo(e){this.loginUserInfo=e},setStructureData(e){this.structureData=e},setIsStructureExist(e){this.isStructureExist=e},async getModelSecretAsync(e){var r,n,o,s,a,c,u,y,l,p,d,f,g;const t=await i.getInsofDataApi({key:{systemKey:e?e.systemKey:sessionStorage.getItem("systemKey"),pageKey:"secret",type:"system"}});return((r=t==null?void 0:t.data)==null?void 0:r.code)===200&&(n=t==null?void 0:t.data)!=null&&n.result&&Array.isArray((o=t==null?void 0:t.data)==null?void 0:o.result)&&((a=(s=t==null?void 0:t.data)==null?void 0:s.result)==null?void 0:a.length)>0&&(this.cryptoInfo.publicKey=(l=(y=(u=(c=t.data)==null?void 0:c.result[0])==null?void 0:u.value)==null?void 0:y.cryptoInfo)==null?void 0:l.publicKey,this.cryptoInfo.privateKey=(g=(f=(d=(p=t.data)==null?void 0:p.result[0])==null?void 0:d.value)==null?void 0:f.cryptoInfo)==null?void 0:g.privateKey),{publicKey:this.cryptoInfo.publicKey,privateKey:this.cryptoInfo.privateKey}},async setLogRecordAsync(e,t,r="operate"){var n;try{const o=S(A.value,"path",t),s=await i.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"/log",type:"system",logType:r},value:{module:o?o.title:t,timeStamp:m(),detail:{...e}}});return((n=s==null?void 0:s.data)==null?void 0:n.code)===200}catch(o){i.ElMessage.error(o)}}},persist:[{key:"loginState",storage:localStorage,pick:["superAdminInfo"]}]});exports.findRootNodeByPath=I;exports.useLoginState=v;
1
+ "use strict";const i=require("./menu-Da5Ht5hG.cjs"),h=require("./index-Bwgh1tDh.cjs");function S(e,t,r){for(const n of e){if(n[t]===r)return n;if(n.children&&n.children.length>0){const o=S(n.children,t,r);if(o)return o}}return null}function m(){const e=new Date,t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),o=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0"),a=String(e.getSeconds()).padStart(2,"0");return`${t}-${r}-${n} ${o}:${s}:${a}`}function I(e,t){const r=t.split("/");let n=e,o=null;for(let s of r){const a=n.find(c=>c.title===s);if(!a)return null;o||(o=a),n=a.children??[]}return o}const K=i.useMenuState(h.pinia),{menus:A}=i.storeToRefs(K),v=i.defineStore("loginState",{state:()=>({superAdminInfo:{},cryptoInfo:{publicKey:"",privateKey:""},loginUserInfo:{},structureData:[],isStructureExist:!1}),actions:{setSuperAdminInfo(e){this.superAdminInfo=e},setLoginUserInfo(e){this.loginUserInfo=e},setStructureData(e){this.structureData=e},setIsStructureExist(e){this.isStructureExist=e},async getModelSecretAsync(e){var r,n,o,s,a,c,u,y,l,p,d,f,g;const t=await i.getInsofDataApi({key:{systemKey:e?e.systemKey:sessionStorage.getItem("systemKey"),pageKey:"secret",type:"system"}});return((r=t==null?void 0:t.data)==null?void 0:r.code)===200&&(n=t==null?void 0:t.data)!=null&&n.result&&Array.isArray((o=t==null?void 0:t.data)==null?void 0:o.result)&&((a=(s=t==null?void 0:t.data)==null?void 0:s.result)==null?void 0:a.length)>0&&(this.cryptoInfo.publicKey=(l=(y=(u=(c=t.data)==null?void 0:c.result[0])==null?void 0:u.value)==null?void 0:y.cryptoInfo)==null?void 0:l.publicKey,this.cryptoInfo.privateKey=(g=(f=(d=(p=t.data)==null?void 0:p.result[0])==null?void 0:d.value)==null?void 0:f.cryptoInfo)==null?void 0:g.privateKey),{publicKey:this.cryptoInfo.publicKey,privateKey:this.cryptoInfo.privateKey}},async setLogRecordAsync(e,t,r="operate"){var n;try{const o=S(A.value,"path",t),s=await i.createInsofDataApi({key:{systemKey:sessionStorage.getItem("systemKey"),pageKey:"/log",type:"system",logType:r},value:{module:o?o.title:t,timeStamp:m(),detail:{...e}}});return((n=s==null?void 0:s.data)==null?void 0:n.code)===200}catch(o){i.ElMessage.error(o)}}},persist:[{key:"loginState",storage:localStorage,pick:["superAdminInfo"]}]});exports.findRootNodeByPath=I;exports.useLoginState=v;
@@ -1,5 +1,5 @@
1
- import { f as S, s as m, c as h, E as I, g as K, u as A } from "./menu-eau-OVSc.js";
2
- import { p as v } from "./index-DQXp-tQk.js";
1
+ import { f as S, s as m, c as h, E as I, g as K, u as A } from "./menu-D_3gHkG4.js";
2
+ import { p as v } from "./index-Qx0GuwHr.js";
3
3
  function g(e, t, o) {
4
4
  for (const n of e) {
5
5
  if (n[t] === o)
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-Cnigg-Vb.cjs"),T=require("./index-BovJtyyV.cjs"),Q=require("./index-Dj7KpYhE.cjs"),I=require("./menu-Bi2msF1Z.cjs"),ee=require("./index-Cj9Wq_7v.cjs"),U=require("./array-B4OYH6uL.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),h=require("./cloneDeep-BPCav0OY.cjs"),b=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],te={key:0,class:"show-content"},ne={class:"item-view-group"},oe={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(j,{emit:x}){const t=j,E=x,g=Q.useModelComp(T.pinia),{itemData:p}=I.storeToRefs(g),_=e.ref([]),C=e.ref([]),F=c=>{E("change",{wholeValue:_.value,editValue:c})},D=c=>{const k=h.cloneDeep(_.value),V=k==null?void 0:k.map((i,B)=>(B===(c==null?void 0:c.index)&&(i.compData=c==null?void 0:c.contents),i));_.value=V};e.watch(()=>p.value,()=>{var c;!p.value||((c=p.value)==null?void 0:c.length)===0||(C.value=p.value,_.value=p.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var k;if(((k=t==null?void 0:t.jsonContents)==null?void 0:k.length)>0){g.setOriginalData(t==null?void 0:t.jsonContents),g.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=U.expandStringToJson(t==null?void 0:t.content);g.setOriginalData(c),g.setItemData(c)},{deep:!0,immediate:!0});const N=c=>ee.getComponent(c);return(c,k)=>{var V;return((V=C.value)==null?void 0:V.length)>0?(e.openBlock(),e.createElementBlock("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(i,B)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:B},[e.createElementVNode("div",ne,e.toDisplayString(i.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(i.comp)),{itemData:i==null?void 0:i.compData,childItemData:i==null?void 0:i.itemChildData,key:B,onChange:F,index:B,onContentChange:D},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ae=X._export_sfc(oe,[["__scopeId","data-v-1c04adc8"]]),re={class:"add-model-content"},le={key:0,class:"model-import-data"},ce={class:"import-button"},se={key:0},ue={key:1,class:"model-operate"},ie={class:"model-select"},de={class:"model-fill"},me={key:2,class:"model-view ssComponent"},fe={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(j,{emit:x}){const t=j,E=x,g=e.ref(""),p=e.ref([]),_=e.ref(0),C=Q.useModelComp(T.pinia);I.useMenuState(T.pinia);const{itemData:F,originalData:D}=I.storeToRefs(C),N=e.ref(null),c=e.ref(0),k=e.ref(""),V=()=>{_.value=window.innerWidth},i=async r=>{var u;const a=(u=h.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(y=>((y==null?void 0:y.key)==="formContent"&&(y.contents=U.arrayToNumberArray(y==null?void 0:y.contents)),y))),o});E("change",{originalContents:D.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:B(h.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},B=r=>{var u;let a=[];return(u=h.cloneDeep(r))==null||u.forEach(o=>{var f,y;b!=null&&b.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=b==null?void 0:b.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(y=o==null?void 0:o.compData)==null||y.forEach(n=>{var $,q,J,A,M,R,L,z,W,H,P,G;if(s!=null&&s.find(d=>(d==null?void 0:d.value)===(n==null?void 0:n.key)))if(!(($=n==null?void 0:n.contents)!=null&&$.length))a.push(((q=s==null?void 0:s.find(d=>(d==null?void 0:d.value)===(n==null?void 0:n.key)))==null?void 0:q.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let d=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!d)return;if(Object.keys(d).includes("label")&&Object.keys(d).includes("key")&&Object.keys(d).includes("width"))if(((M=(A=n.contents)==null?void 0:A.filter(m=>m.width!==1))==null?void 0:M.length)===0){const m=(R=h.cloneDeep(n==null?void 0:n.contents))==null?void 0:R.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(m)+"/r/n")}else{let m=[];(z=h.cloneDeep(n==null?void 0:n.contents))==null||z.reduce((l,S)=>{var K;return l[S.label]=S.key,((K=Object.keys(h.cloneDeep(l)))==null?void 0:K.length)>=S.width&&(m.push(h.cloneDeep(l)),l={}),l},{}),a.push(((W=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:W.key)+"="+JSON.stringify(m)+"/r/n")}else if(Object.keys(d).includes("label")){const m=(H=h.cloneDeep(n==null?void 0:n.contents))==null?void 0:H.map(l=>l.label);a.push(((P=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(m)+"/r/n")}else a.push(((G=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:G.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},w=e.ref([]),Y=()=>{N.value.click()},Z=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{g.value=o.target.result,w.value=v(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",V)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{g.value=t==null?void 0:t.content,p.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=w.value)==null?void 0:r.length)!==0&&(C.setOriginalData(w.value),C.setItemData(w.value))},{deep:!0,immediate:!0});const v=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",re,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",ce,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:N,accept:".txt",onChange:Z,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Y,class:"import-button-content"},"导入文件"),k.value?(e.openBlock(),e.createElementBlock("span",se,e.toDisplayString(k.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",ie,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:_.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",de,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(),e.createBlock(ae,{content:g.value,onChange:i,jsonContents:p.value,key:_.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},ye=X._export_sfc(fe,[["__scopeId","data-v-ceaf6f81"]]);exports.default=ye;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-CFOUGn9U.cjs"),T=require("./index-Bwgh1tDh.cjs"),Q=require("./index-zvArGV4H.cjs"),I=require("./menu-Da5Ht5hG.cjs"),ee=require("./index-BDDKdGJX.cjs"),U=require("./array-Cs_qeJ2m.cjs"),X=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),h=require("./cloneDeep-CYcGhlzG.cjs"),b=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],te={key:0,class:"show-content"},ne={class:"item-view-group"},oe={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(j,{emit:x}){const t=j,E=x,g=Q.useModelComp(T.pinia),{itemData:p}=I.storeToRefs(g),_=e.ref([]),C=e.ref([]),F=c=>{E("change",{wholeValue:_.value,editValue:c})},D=c=>{const k=h.cloneDeep(_.value),V=k==null?void 0:k.map((i,B)=>(B===(c==null?void 0:c.index)&&(i.compData=c==null?void 0:c.contents),i));_.value=V};e.watch(()=>p.value,()=>{var c;!p.value||((c=p.value)==null?void 0:c.length)===0||(C.value=p.value,_.value=p.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var k;if(((k=t==null?void 0:t.jsonContents)==null?void 0:k.length)>0){g.setOriginalData(t==null?void 0:t.jsonContents),g.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=U.expandStringToJson(t==null?void 0:t.content);g.setOriginalData(c),g.setItemData(c)},{deep:!0,immediate:!0});const N=c=>ee.getComponent(c);return(c,k)=>{var V;return((V=C.value)==null?void 0:V.length)>0?(e.openBlock(),e.createElementBlock("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(i,B)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:B},[e.createElementVNode("div",ne,e.toDisplayString(i.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(N(i.comp)),{itemData:i==null?void 0:i.compData,childItemData:i==null?void 0:i.itemChildData,key:B,onChange:F,index:B,onContentChange:D},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ae=X._export_sfc(oe,[["__scopeId","data-v-1c04adc8"]]),re={class:"add-model-content"},le={key:0,class:"model-import-data"},ce={class:"import-button"},se={key:0},ue={key:1,class:"model-operate"},ie={class:"model-select"},de={class:"model-fill"},me={key:2,class:"model-view ssComponent"},fe={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(j,{emit:x}){const t=j,E=x,g=e.ref(""),p=e.ref([]),_=e.ref(0),C=Q.useModelComp(T.pinia);I.useMenuState(T.pinia);const{itemData:F,originalData:D}=I.storeToRefs(C),N=e.ref(null),c=e.ref(0),k=e.ref(""),V=()=>{_.value=window.innerWidth},i=async r=>{var u;const a=(u=h.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(y=>((y==null?void 0:y.key)==="formContent"&&(y.contents=U.arrayToNumberArray(y==null?void 0:y.contents)),y))),o});E("change",{originalContents:D.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:B(h.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},B=r=>{var u;let a=[];return(u=h.cloneDeep(r))==null||u.forEach(o=>{var f,y;b!=null&&b.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=b==null?void 0:b.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(y=o==null?void 0:o.compData)==null||y.forEach(n=>{var $,q,J,A,M,R,L,z,W,H,P,G;if(s!=null&&s.find(d=>(d==null?void 0:d.value)===(n==null?void 0:n.key)))if(!(($=n==null?void 0:n.contents)!=null&&$.length))a.push(((q=s==null?void 0:s.find(d=>(d==null?void 0:d.value)===(n==null?void 0:n.key)))==null?void 0:q.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let d=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!d)return;if(Object.keys(d).includes("label")&&Object.keys(d).includes("key")&&Object.keys(d).includes("width"))if(((M=(A=n.contents)==null?void 0:A.filter(m=>m.width!==1))==null?void 0:M.length)===0){const m=(R=h.cloneDeep(n==null?void 0:n.contents))==null?void 0:R.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(m)+"/r/n")}else{let m=[];(z=h.cloneDeep(n==null?void 0:n.contents))==null||z.reduce((l,S)=>{var K;return l[S.label]=S.key,((K=Object.keys(h.cloneDeep(l)))==null?void 0:K.length)>=S.width&&(m.push(h.cloneDeep(l)),l={}),l},{}),a.push(((W=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:W.key)+"="+JSON.stringify(m)+"/r/n")}else if(Object.keys(d).includes("label")){const m=(H=h.cloneDeep(n==null?void 0:n.contents))==null?void 0:H.map(l=>l.label);a.push(((P=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(m)+"/r/n")}else a.push(((G=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:G.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},w=e.ref([]),Y=()=>{N.value.click()},Z=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{g.value=o.target.result,w.value=v(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",V)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{g.value=t==null?void 0:t.content,p.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=w.value)==null?void 0:r.length)!==0&&(C.setOriginalData(w.value),C.setItemData(w.value))},{deep:!0,immediate:!0});const v=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",re,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",le,[e.createElementVNode("div",ce,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:N,accept:".txt",onChange:Z,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Y,class:"import-button-content"},"导入文件"),k.value?(e.openBlock(),e.createElementBlock("span",se,e.toDisplayString(k.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("div",ie,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:_.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",de,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(),e.createBlock(ae,{content:g.value,onChange:i,jsonContents:p.value,key:_.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},ye=X._export_sfc(fe,[["__scopeId","data-v-ceaf6f81"]]);exports.default=ye;
@@ -1,12 +1,12 @@
1
1
  import { ref as _, watch as V, createElementBlock as C, createCommentVNode as I, openBlock as y, Fragment as le, renderList as se, createElementVNode as O, createBlock as Z, toDisplayString as v, resolveDynamicComponent as ue, onMounted as ce, createVNode as A } from "vue";
2
- import { m as ie, a as me, b as de } from "./index-BPLD6fuH.js";
3
- import { p as E } from "./index-DQXp-tQk.js";
4
- import { u as ee } from "./index-CMza6E0Y.js";
5
- import { s as te, u as fe } from "./menu-eau-OVSc.js";
6
- import { g as ye } from "./index-Cks4xBFc.js";
7
- import { e as ge, a as he } from "./array-EGWOD_Yi.js";
2
+ import { m as ie, a as me, b as de } from "./index-B5VuM8l5.js";
3
+ import { p as E } from "./index-Qx0GuwHr.js";
4
+ import { u as ee } from "./index-C_LjwD8t.js";
5
+ import { s as te, u as fe } from "./menu-D_3gHkG4.js";
6
+ import { g as ye } from "./index-DPpVsGw9.js";
7
+ import { e as ge, a as he } from "./array-I0ed2wow.js";
8
8
  import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- import { c as k } from "./cloneDeep-D3jWUY57.js";
9
+ import { c as k } from "./cloneDeep-GOtDTHJH.js";
10
10
  const x = [
11
11
  {
12
12
  key: "FormName",
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as nt, computed as X, createElementBlock as Wt, openBlock as ce, normalizeClass as fe, unref as D, renderSlot as vt, createVNode as En, Transition as co, withCtx as lt, withDirectives as fo, createElementVNode as Gt, normalizeStyle as po, createTextVNode as Ms, toDisplayString as ho, vShow as _o, watch as Tt, shallowReactive as js, ref as ge, onMounted as $s, createBlock as He, createCommentVNode as it, resolveDynamicComponent as Hs, Fragment as zs, withModifiers as Ks, nextTick as Jt, isVNode as mo, render as Vn, effectScope as Eo, markRaw as ye, toRaw as Pe, isRef as Ne, isReactive as Ct, toRef as ct, hasInjectionContext as qs, inject as Ws, getCurrentInstance as Gs, reactive as Js, getCurrentScope as Ys, onScopeDispose as Xs, toRefs as Un } from "vue";
2
- import { j as gn, m as ue, B as Zs, h as Je, P as Ln, _ as go, J as Qs, af as ei, o as ti, ag as ni, g as yo, n as ri, Z as oi, $ as Bn, y as si, F as ii, G as Mn, Y as ai, ah as ui, K as li, k as jn, A as Yt, z as ci, p as fi, ai as Bt, aj as di } from "./index-CTASWvkf.js";
2
+ import { j as gn, m as ue, B as Zs, h as Je, P as Ln, _ as go, J as Qs, af as ei, o as ti, ag as ni, g as yo, n as ri, Z as oi, $ as Bn, y as si, F as ii, G as Mn, Y as ai, ah as ui, K as li, k as jn, A as Yt, z as ci, p as fi, ai as Bt, aj as di } from "./index-DmyMy020.js";
3
3
  import { m as pi } from "./typescript-BpuhIBuJ.js";
4
4
  const hi = gn({
5
5
  value: {