cc1-admin-front 1.0.6 → 2.0.0

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 (41) hide show
  1. package/README.md +5 -1
  2. package/dist/apis/auth/ApiAuthPermission.d.ts +4 -0
  3. package/dist/apis/auth/ApiAuthRole.d.ts +4 -6
  4. package/dist/apis/auth/ApiAuthSession.d.ts +4 -0
  5. package/dist/apis/auth/ApiAuthUser.d.ts +2 -0
  6. package/dist/cc1-admin-front.css +1 -1
  7. package/dist/cc1-admin-front.js +25 -959
  8. package/dist/cc1-admin-front.umd.cjs +1 -1
  9. package/dist/{index-CatA5C4N.js → index-BHBDmhpM.js} +19 -15
  10. package/dist/{index-Aa_qAwSq.js → index-BKc52gsM.js} +69 -68
  11. package/dist/{index-DWmZQOPc.js → index-BNytnHfT.js} +62 -56
  12. package/dist/index-BbdDqL4R.js +106 -0
  13. package/dist/{index-D8U8yEvx.js → index-Bh99swBg.js} +9 -9
  14. package/dist/index-BsUQc1tS.js +72 -0
  15. package/dist/index-C0dTAIw4.js +182 -0
  16. package/dist/{index-pxgBPi_e.js → index-CEaedSLk.js} +21 -19
  17. package/dist/{index-DU5RPuKk.js → index-Cb9bja8p.js} +11 -11
  18. package/dist/index-CsUs4AR_.js +42 -0
  19. package/dist/{index-C8fkVOS0.js → index-CvtY70Y6.js} +16 -12
  20. package/dist/{index-rOyW50AB.js → index-CwyxJHDj.js} +34 -29
  21. package/dist/index-D3OkO10X.js +933 -0
  22. package/dist/{index-D6cX_pp2.js → index-DIRWVvKY.js} +27 -22
  23. package/dist/index-DPSZh1Ve.js +123 -0
  24. package/dist/{index-DzI5GwAU.js → index-E8d5Pz2_.js} +29 -25
  25. package/dist/{index-D47lvu37.js → index-SLpgD5v0.js} +81 -89
  26. package/dist/{index-DvZhYqrw.js → index-t7D_zBIH.js} +13 -12
  27. package/dist/index.d.ts +3 -3
  28. package/dist/plugins/directive.d.ts +1 -1
  29. package/dist/sstore/ssys.d.ts +0 -3
  30. package/dist/sstore/suser.d.ts +52 -9
  31. package/package.json +1 -1
  32. package/dist/apis/auth/ApiAuthApi.d.ts +0 -7
  33. package/dist/apis/system/ApiSystemTenant.d.ts +0 -6
  34. package/dist/index-BTuR22Wh.js +0 -41
  35. package/dist/index-CRagZR_l.js +0 -160
  36. package/dist/index-D7Xyt6lh.js +0 -180
  37. package/dist/index-DFNCjb_F.js +0 -69
  38. package/dist/index-Dejkixap.js +0 -181
  39. package/dist/index-uPQ6O40Q.js +0 -180
  40. package/dist/views/pages/system/tenant/index.vue.d.ts +0 -2
  41. /package/dist/views/pages/auth/{api → permission}/index.vue.d.ts +0 -0
@@ -1,9 +1,9 @@
1
- import { defineComponent as C, ref as D, reactive as N, onMounted as j, onUnmounted as E, resolveComponent as p, openBlock as u, createElementBlock as h, normalizeStyle as R, createBlock as x, createCommentVNode as w, watch as $, Fragment as k, renderList as L, withDirectives as M, vModelText as O, nextTick as z, withCtx as f, createElementVNode as a, createVNode as m, createTextVNode as g, toDisplayString as y } from "vue";
2
- import { ApiAuthMenu as A, scurd as F, ssys as H } from "./cc1-admin-front.js";
1
+ import { defineComponent as N, ref as j, reactive as I, onMounted as E, onUnmounted as M, resolveComponent as p, openBlock as u, createElementBlock as h, normalizeStyle as T, createBlock as x, createCommentVNode as w, watch as L, Fragment as V, renderList as U, withDirectives as O, vModelText as A, nextTick as F, withCtx as f, createElementVNode as a, createVNode as m, createTextVNode as g, toDisplayString as y } from "vue";
2
+ import { d as H, h as k, e as R, s as P } from "./index-D3OkO10X.js";
3
3
  import { Scope as W } from "cc1-vue3";
4
- import { TSys as V } from "cc1-form";
5
- import { _ as T } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- const q = /* @__PURE__ */ C({
4
+ import { TSys as C } from "cc1-form";
5
+ import { _ as S } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ const q = /* @__PURE__ */ N({
7
7
  __name: "addIconItem",
8
8
  props: {
9
9
  isbig: { default: !1 },
@@ -13,11 +13,11 @@ const q = /* @__PURE__ */ C({
13
13
  nofill: { default: !1 }
14
14
  },
15
15
  setup(_) {
16
- const n = D({}), l = N({
16
+ const n = j({}), l = I({
17
17
  show: !1,
18
18
  observer: {}
19
19
  });
20
- return j(() => {
20
+ return E(() => {
21
21
  l.observer = new IntersectionObserver(
22
22
  (r, e) => {
23
23
  r.forEach((i) => {
@@ -26,12 +26,12 @@ const q = /* @__PURE__ */ C({
26
26
  },
27
27
  { threshold: 0 }
28
28
  ), l.observer.observe(n.value);
29
- }), E(() => {
29
+ }), M(() => {
30
30
  l.observer.disconnect();
31
31
  }), (r, e) => {
32
32
  const i = p("VIcon");
33
33
  return u(), h("span", {
34
- style: R({ minHeight: _.isbig ? "40px" : "20px" }),
34
+ style: T({ minHeight: _.isbig ? "40px" : "20px" }),
35
35
  ref_key: "_dom",
36
36
  ref: n
37
37
  }, [
@@ -49,7 +49,7 @@ const q = /* @__PURE__ */ C({
49
49
  }), G = {
50
50
  class: "row items-center",
51
51
  style: { gap: "10px" }
52
- }, J = ["onUpdate:modelValue"], K = /* @__PURE__ */ C({
52
+ }, J = ["onUpdate:modelValue"], K = /* @__PURE__ */ N({
53
53
  __name: "colorChoose",
54
54
  props: {
55
55
  colors: { default: [] },
@@ -57,7 +57,7 @@ const q = /* @__PURE__ */ C({
57
57
  },
58
58
  emits: ["update:colors"],
59
59
  setup(_, { emit: n }) {
60
- const l = _, r = n, e = N({
60
+ const l = _, r = n, e = I({
61
61
  color: []
62
62
  });
63
63
  for (let d = 0; d < l.length; d++)
@@ -69,7 +69,7 @@ const q = /* @__PURE__ */ C({
69
69
  i();
70
70
  const o = W.Timer();
71
71
  let c = null;
72
- return $(
72
+ return L(
73
73
  () => e.color,
74
74
  () => {
75
75
  o.un(c), c = o.once(() => {
@@ -78,33 +78,33 @@ const q = /* @__PURE__ */ C({
78
78
  },
79
79
  { deep: !0 }
80
80
  ), (d, t) => (u(), h("div", G, [
81
- (u(!0), h(k, null, L(e.color, (v, b) => M((u(), h("input", {
81
+ (u(!0), h(V, null, U(e.color, (v, b) => O((u(), h("input", {
82
82
  type: "color",
83
- "onUpdate:modelValue": (I) => e.color[b].value = I
83
+ "onUpdate:modelValue": ($) => e.color[b].value = $
84
84
  }, null, 8, J)), [
85
- [O, e.color[b].value]
85
+ [A, e.color[b].value]
86
86
  ])), 256))
87
87
  ]));
88
88
  }
89
- }), P = {
89
+ }), Q = {
90
90
  class: "row items-center",
91
91
  style: { height: "60px", overflow: "auto" }
92
- }, Q = {
92
+ }, X = {
93
93
  class: "row items-center",
94
94
  style: { gap: "10px", margin: "15px 0" }
95
- }, X = {
95
+ }, Y = {
96
96
  class: "row items-center",
97
97
  style: { gap: "10px", "margin-bottom": "15px" }
98
- }, Y = { class: "row items-center" }, Z = {
98
+ }, Z = { class: "row items-center" }, ee = {
99
99
  class: "flex items-center",
100
100
  style: { "margin-bottom": "10px" }
101
- }, ee = { style: { "margin-left": "10px" } }, oe = {
101
+ }, oe = { style: { "margin-left": "10px" } }, le = {
102
102
  key: 0,
103
103
  class: "row"
104
- }, le = ["onClick"], te = {
104
+ }, te = ["onClick"], ne = {
105
105
  style: { width: "0px" },
106
106
  class: "flex flex-center"
107
- }, ne = { style: { "text-wrap": "nowrap" } }, ie = { class: "dialog-footer" }, se = /* @__PURE__ */ C({
107
+ }, ie = { style: { "text-wrap": "nowrap" } }, se = { class: "dialog-footer" }, ae = /* @__PURE__ */ N({
108
108
  __name: "addDialog",
109
109
  props: {
110
110
  show: { default: !1 },
@@ -115,13 +115,13 @@ const q = /* @__PURE__ */ C({
115
115
  emits: ["close", "update:show"],
116
116
  setup(_, { emit: n }) {
117
117
  const l = _;
118
- $(
118
+ L(
119
119
  () => l.show,
120
120
  () => {
121
121
  e.show = l.show, e.show && e.open();
122
122
  }
123
123
  );
124
- const r = n, e = N({
124
+ const r = n, e = I({
125
125
  libs: [],
126
126
  lib: "",
127
127
  size: 0,
@@ -153,14 +153,14 @@ const q = /* @__PURE__ */ C({
153
153
  show: !1,
154
154
  showIcon: !1,
155
155
  open: async (i = !0) => {
156
- V.loading(!0);
156
+ C.loading(!0);
157
157
  const o = VConf.vicon;
158
158
  await e.getlibs(), i && e.init(), e.showIcon = !1;
159
159
  const c = e.lib, d = `${o.url}/${c}/_all.json`;
160
160
  if (e.list[c] || (e.list[c] = []), e.list[c].length) {
161
- z(() => {
161
+ F(() => {
162
162
  e.showIcon = !0;
163
- }), V.loading(!1);
163
+ }), C.loading(!1);
164
164
  return;
165
165
  }
166
166
  let t = await o.fun.getRes(d);
@@ -171,9 +171,9 @@ const q = /* @__PURE__ */ C({
171
171
  e.list[c].push({
172
172
  name: v[b]
173
173
  });
174
- z(() => {
174
+ F(() => {
175
175
  e.showIcon = !0;
176
- }), V.loading(!1);
176
+ }), C.loading(!1);
177
177
  },
178
178
  choose: async (i) => {
179
179
  e.item.lib = e.lib, e.item.name = i.name, await StrUtil.copyText(`${e.lib}-${i.name}`);
@@ -185,14 +185,14 @@ const q = /* @__PURE__ */ C({
185
185
  r("close", { lib: e.item.lib, name: e.item.name, color: e.color }), e.close();
186
186
  }
187
187
  });
188
- return $(
188
+ return L(
189
189
  () => e.show,
190
190
  () => {
191
191
  r("update:show", e.show);
192
192
  }
193
193
  ), (i, o) => {
194
- const c = p("el-radio"), d = p("el-radio-group"), t = p("el-input"), v = p("el-switch"), b = p("el-tooltip"), I = p("VIcon"), S = p("el-scrollbar"), U = p("el-button"), B = p("el-dialog");
195
- return u(), x(B, {
194
+ const c = p("el-radio"), d = p("el-radio-group"), t = p("el-input"), v = p("el-switch"), b = p("el-tooltip"), $ = p("VIcon"), B = p("el-scrollbar"), z = p("el-button"), D = p("el-dialog");
195
+ return u(), x(D, {
196
196
  modelValue: e.show,
197
197
  "onUpdate:modelValue": o[5] || (o[5] = (s) => e.show = s),
198
198
  title: e.title,
@@ -201,8 +201,8 @@ const q = /* @__PURE__ */ C({
201
201
  "z-index": 1e4
202
202
  }, {
203
203
  footer: f(() => [
204
- a("span", ie, [
205
- m(U, {
204
+ a("span", se, [
205
+ m(z, {
206
206
  onClick: e.close
207
207
  }, {
208
208
  default: f(() => o[15] || (o[15] = [
@@ -211,7 +211,7 @@ const q = /* @__PURE__ */ C({
211
211
  _: 1,
212
212
  __: [15]
213
213
  }, 8, ["onClick"]),
214
- m(U, {
214
+ m(z, {
215
215
  type: "primary",
216
216
  onClick: e.closeItem
217
217
  }, {
@@ -224,14 +224,14 @@ const q = /* @__PURE__ */ C({
224
224
  ])
225
225
  ]),
226
226
  default: f(() => [
227
- a("div", P, [
227
+ a("div", Q, [
228
228
  m(d, {
229
229
  modelValue: e.lib,
230
230
  "onUpdate:modelValue": o[0] || (o[0] = (s) => e.lib = s),
231
231
  onChange: e.changeLib
232
232
  }, {
233
233
  default: f(() => [
234
- (u(!0), h(k, null, L(e.libs, (s) => (u(), x(c, {
234
+ (u(!0), h(V, null, U(e.libs, (s) => (u(), x(c, {
235
235
  value: s,
236
236
  size: "small"
237
237
  }, {
@@ -244,7 +244,7 @@ const q = /* @__PURE__ */ C({
244
244
  _: 1
245
245
  }, 8, ["modelValue", "onChange"])
246
246
  ]),
247
- a("div", Q, [
247
+ a("div", X, [
248
248
  o[6] || (o[6] = a("div", null, "条件:", -1)),
249
249
  m(t, {
250
250
  modelValue: e.findName,
@@ -259,7 +259,7 @@ const q = /* @__PURE__ */ C({
259
259
  o[9] || (o[9] = a("div", null, "总大小:", -1)),
260
260
  o[10] || (o[10] = g(" 43.49M ", -1))
261
261
  ]),
262
- a("div", X, [
262
+ a("div", Y, [
263
263
  o[13] || (o[13] = a("div", null, "放大:", -1)),
264
264
  m(v, {
265
265
  modelValue: e.isbig,
@@ -271,7 +271,7 @@ const q = /* @__PURE__ */ C({
271
271
  placement: "top"
272
272
  }, {
273
273
  default: f(() => [
274
- a("div", Y, [
274
+ a("div", Z, [
275
275
  o[11] || (o[11] = a("div", null, "颜色控制:", -1)),
276
276
  m(v, {
277
277
  modelValue: e.nofill,
@@ -281,7 +281,7 @@ const q = /* @__PURE__ */ C({
281
281
  ]),
282
282
  _: 1
283
283
  }),
284
- !e.nofill && e.showIcon ? (u(), h(k, { key: 0 }, [
284
+ !e.nofill && e.showIcon ? (u(), h(V, { key: 0 }, [
285
285
  o[12] || (o[12] = a("div", null, "颜色:", -1)),
286
286
  m(K, {
287
287
  colors: e.color,
@@ -289,24 +289,24 @@ const q = /* @__PURE__ */ C({
289
289
  }, null, 8, ["colors"])
290
290
  ], 64)) : w("", !0)
291
291
  ]),
292
- a("div", Z, [
292
+ a("div", ee, [
293
293
  o[14] || (o[14] = a("div", null, "当前选中:", -1)),
294
- m(I, {
294
+ m($, {
295
295
  lib: e.item.lib,
296
296
  name: e.item.name,
297
297
  color: e.color
298
298
  }, null, 8, ["lib", "name", "color"]),
299
- a("div", ee, y(e.item.lib) + "-" + y(e.item.name), 1)
299
+ a("div", oe, y(e.item.lib) + "-" + y(e.item.name), 1)
300
300
  ]),
301
- m(S, { "max-height": "400px" }, {
301
+ m(B, { "max-height": "400px" }, {
302
302
  default: f(() => [
303
- e.showIcon ? (u(), h("div", oe, [
304
- (u(!0), h(k, null, L(e.list[e.lib], (s) => (u(), h(k, null, [
303
+ e.showIcon ? (u(), h("div", le, [
304
+ (u(!0), h(V, null, U(e.list[e.lib], (s) => (u(), h(V, null, [
305
305
  !e.findName || s.name.indexOf(e.findName) != -1 ? (u(), h("div", {
306
306
  key: 0,
307
307
  class: "iconlist column flex-center",
308
- onClick: (me) => e.choose(s),
309
- style: R({
308
+ onClick: (pe) => e.choose(s),
309
+ style: T({
310
310
  background: s.name === e.item.name && e.lib === e.item.lib ? "#c8ebff" : void 0,
311
311
  height: e.isbig ? "80px" : "60px",
312
312
  width: e.isbig ? "180px" : "90px"
@@ -319,10 +319,10 @@ const q = /* @__PURE__ */ C({
319
319
  nofill: e.nofill,
320
320
  lib: e.lib
321
321
  }, null, 8, ["isbig", "el", "color", "nofill", "lib"]),
322
- a("div", te, [
323
- a("div", ne, y(s.name), 1)
322
+ a("div", ne, [
323
+ a("div", ie, y(s.name), 1)
324
324
  ])
325
- ], 12, le)) : w("", !0)
325
+ ], 12, te)) : w("", !0)
326
326
  ], 64))), 256))
327
327
  ])) : w("", !0)
328
328
  ]),
@@ -333,10 +333,10 @@ const q = /* @__PURE__ */ C({
333
333
  }, 8, ["modelValue", "title"]);
334
334
  };
335
335
  }
336
- }), ae = /* @__PURE__ */ T(se, [["__scopeId", "data-v-b9c727d4"]]), re = { class: "flex flex-center" }, ce = { class: "row" }, ue = ["onClick"], de = /* @__PURE__ */ C({
336
+ }), re = /* @__PURE__ */ S(ae, [["__scopeId", "data-v-b9c727d4"]]), ce = { class: "flex flex-center" }, ue = { class: "row" }, de = ["onClick"], me = /* @__PURE__ */ N({
337
337
  __name: "index",
338
338
  setup(_) {
339
- const n = N({
339
+ const n = I({
340
340
  routers: [],
341
341
  initRouters: () => {
342
342
  n.routers = [];
@@ -353,7 +353,7 @@ const q = /* @__PURE__ */ C({
353
353
  i.children && l(i.children, e);
354
354
  });
355
355
  };
356
- l(V.routes, n.routers);
356
+ l(C.routes, n.routers);
357
357
  },
358
358
  icon: {
359
359
  visible: !1,
@@ -372,13 +372,13 @@ const q = /* @__PURE__ */ C({
372
372
  },
373
373
  data: [],
374
374
  option: {
375
- api: A,
375
+ api: H,
376
376
  data(l) {
377
- return n.data = H.getTableTree(l), n.data;
377
+ return n.data = P.getTableTree(l), n.data;
378
378
  },
379
379
  form: {
380
380
  openBefore: async (l, r) => {
381
- F.form.openBefore.parentId(l.title ? l : null, r, n.data, n.option), F.setOptionsData(n.option, "url", n.routers), r.type === V.EDialog.Add && (l.title = "");
381
+ R.form.openBefore.parentId(l.title ? l : null, r, n.data, n.option), R.setOptionsData(n.option, "url", n.routers), r.type === C.EDialog.Add && (l.title = "");
382
382
  },
383
383
  submitBefore(l, r) {
384
384
  l.iconName?.length || (l.iconLib = "", l.iconName = "", l.iconFill = []);
@@ -390,7 +390,9 @@ const q = /* @__PURE__ */ C({
390
390
  table: {
391
391
  border: !0,
392
392
  index: !1,
393
- add: (l) => l?.type === 0,
393
+ add: (l) => l?.type === 0 && k("/auth/menu/create"),
394
+ update: () => k("/auth/menu/update"),
395
+ delete: () => k("/auth/menu/delete"),
394
396
  operate: {
395
397
  width: 160
396
398
  }
@@ -513,9 +515,8 @@ const q = /* @__PURE__ */ C({
513
515
  }
514
516
  ],
515
517
  tools: {
516
- add: (l) => l === void 0 ? !0 : l.type === 0,
517
- update: !0,
518
- delete: !0,
518
+ add: (l) => k("/auth/menu/create") ? l === void 0 ? !0 : l.type === 0 : !1,
519
+ delete: () => k("/auth/menu/delete"),
519
520
  export: {
520
521
  show: !1
521
522
  },
@@ -529,7 +530,7 @@ const q = /* @__PURE__ */ C({
529
530
  option: n.option
530
531
  }, {
531
532
  "table-icon": f(({ row: t }) => [
532
- a("div", re, [
533
+ a("div", ce, [
533
534
  t.iconName ? (u(), x(e, {
534
535
  key: 0,
535
536
  lib: t.iconLib,
@@ -559,7 +560,7 @@ const q = /* @__PURE__ */ C({
559
560
  }, null, 8, ["modelValue", "onUpdate:modelValue"])) : w("", !0)
560
561
  ]),
561
562
  "form-icon": f(({ row: t, item: v }) => [
562
- a("div", ce, [
563
+ a("div", ue, [
563
564
  m(c, {
564
565
  style: { "margin-right": "16px" },
565
566
  onClick: (b) => n.icon.show(t)
@@ -581,11 +582,11 @@ const q = /* @__PURE__ */ C({
581
582
  color: t.iconFill,
582
583
  size: "26"
583
584
  }, null, 8, ["lib", "name", "color"])
584
- ], 8, ue)) : w("", !0)
585
+ ], 8, de)) : w("", !0)
585
586
  ])
586
587
  ]),
587
588
  "tools-right": f(() => [
588
- m(ae, {
589
+ m(re, {
589
590
  iconName: n.icon.form.iconName,
590
591
  iconLib: n.icon.form.iconLib,
591
592
  iconFill: n.icon.form.iconFill,
@@ -598,7 +599,7 @@ const q = /* @__PURE__ */ C({
598
599
  }, 8, ["option"]);
599
600
  };
600
601
  }
601
- }), ve = /* @__PURE__ */ T(de, [["__scopeId", "data-v-72a09943"]]);
602
+ }), ge = /* @__PURE__ */ S(me, [["__scopeId", "data-v-1f7cf949"]]);
602
603
  export {
603
- ve as default
604
+ ge as default
604
605
  };
@@ -1,25 +1,31 @@
1
- import { defineComponent as S, reactive as N, onMounted as A, resolveComponent as c, openBlock as l, createElementBlock as a, createElementVNode as e, createVNode as s, normalizeStyle as V, withCtx as o, createTextVNode as h, toDisplayString as d, unref as w, computed as H, normalizeClass as M, Fragment as v, renderList as b, createBlock as f, Transition as R, KeepAlive as W, resolveDynamicComponent as j } from "vue";
2
- import { ssys as k, suser as T, System as $ } from "./cc1-admin-front.js";
3
- import { TSys as C } from "cc1-form";
1
+ import { defineComponent as C, reactive as N, onMounted as T, resolveComponent as c, openBlock as l, createElementBlock as a, createElementVNode as e, createVNode as s, normalizeStyle as V, withCtx as o, createTextVNode as h, toDisplayString as d, unref as w, computed as H, normalizeClass as M, Fragment as v, renderList as b, createBlock as f, Transition as R, KeepAlive as W, resolveDynamicComponent as j } from "vue";
2
+ import { s as k, a as L, S, A as q } from "./index-D3OkO10X.js";
3
+ import { TSys as $ } from "cc1-form";
4
4
  import { _ as z } from "./_plugin-vue_export-helper-CHgC5LLL.js";
5
- const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = { class: "header-user-con" }, P = { class: "el-dropdown-link row items-center" }, Z = { class: "user-avator" }, G = ["src"], I = /* @__PURE__ */ S({
5
+ const F = { class: "header row no-wrap" }, K = { class: "header-right" }, P = { class: "header-user-con" }, Z = { class: "el-dropdown-link row items-center" }, G = { class: "user-avator" }, I = ["src"], J = /* @__PURE__ */ C({
6
6
  __name: "Header",
7
- setup(B) {
8
- const r = N({
7
+ setup(A) {
8
+ const i = N({
9
9
  layout: k.layout,
10
10
  message: 2
11
11
  }), m = () => {
12
- r.layout.collapse = !r.layout.collapse;
12
+ i.layout.collapse = !i.layout.collapse;
13
13
  };
14
- A(() => {
14
+ T(() => {
15
15
  document.body.clientWidth < 1500 && m();
16
16
  });
17
- const y = (u) => {
18
- u == "loginout" ? (T.clearInfo(), C.router.push("/login")) : u == "user" && C.router.push("/profile");
17
+ const y = async (u) => {
18
+ if (u == "loginout")
19
+ try {
20
+ await q.logout();
21
+ } finally {
22
+ L.clearInfo(), $.router.push("/login");
23
+ }
24
+ else u == "user" && $.router.push("/profile");
19
25
  };
20
26
  return (u, n) => {
21
- const x = c("v-icon"), _ = c("el-dropdown-item"), i = c("el-dropdown-menu"), g = c("el-dropdown");
22
- return l(), a("div", q, [
27
+ const x = c("v-icon"), _ = c("el-dropdown-item"), r = c("el-dropdown-menu"), g = c("el-dropdown");
28
+ return l(), a("div", F, [
23
29
  e("div", {
24
30
  class: "collapse-btn",
25
31
  onClick: m
@@ -28,7 +34,7 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
28
34
  name: "menu",
29
35
  size: "32",
30
36
  color: ["#34B0E5"],
31
- style: V([{ transition: "all 0.3s" }, { transform: `rotateZ(${r.layout.collapse ? 90 : 0}deg)` }])
37
+ style: V([{ transition: "all 0.3s" }, { transform: `rotateZ(${i.layout.collapse ? 90 : 0}deg)` }])
32
38
  }, null, 8, ["style"])
33
39
  ]),
34
40
  n[2] || (n[2] = e("i", {
@@ -36,15 +42,15 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
36
42
  style: { "font-size": "30px", color: "#ff5900" }
37
43
  }, null, -1)),
38
44
  n[3] || (n[3] = e("div", { class: "logo col" }, "后台管理", -1)),
39
- e("div", F, [
40
- e("div", K, [
45
+ e("div", K, [
46
+ e("div", P, [
41
47
  s(g, {
42
48
  class: "user-name",
43
49
  trigger: "click",
44
50
  onCommand: y
45
51
  }, {
46
52
  dropdown: o(() => [
47
- s(i, null, {
53
+ s(r, null, {
48
54
  default: o(() => [
49
55
  s(_, { command: "user" }, {
50
56
  default: o(() => n[0] || (n[0] = [
@@ -68,12 +74,12 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
68
74
  })
69
75
  ]),
70
76
  default: o(() => [
71
- e("span", P, [
72
- h(d(w(T).userInfo.nickname) + " ", 1),
73
- e("div", Z, [
77
+ e("span", Z, [
78
+ h(d(w(L).userInfo.nickname) + " ", 1),
79
+ e("div", G, [
74
80
  e("img", {
75
- src: w($).staticDir + "/images/head.jpg"
76
- }, null, 8, G)
81
+ src: w(S).staticDir + "/images/head.jpg"
82
+ }, null, 8, I)
77
83
  ])
78
84
  ])
79
85
  ]),
@@ -84,29 +90,29 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
84
90
  ]);
85
91
  };
86
92
  }
87
- }), J = /* @__PURE__ */ z(I, [["__scopeId", "data-v-d5ae6f3f"]]), O = { class: "flex items-center vicon" }, Q = { class: "flex items-center vicon" }, X = /* @__PURE__ */ S({
93
+ }), O = /* @__PURE__ */ z(J, [["__scopeId", "data-v-3d11c24f"]]), Q = { class: "flex items-center vicon" }, X = { class: "flex items-center vicon" }, Y = /* @__PURE__ */ C({
88
94
  __name: "Sidebar",
89
- setup(B) {
90
- const r = N({
95
+ setup(A) {
96
+ const i = N({
91
97
  layout: k.layout,
92
98
  menu: []
93
99
  }), m = async () => {
94
100
  let n = await k.getMenuList();
95
- const x = (_) => _.filter((i) => (i.type === 0 && (i.url = "/" + StrUtil.getId()), StrUtil.isNull(i.children) || (i.children = x(i.children)), i.show));
96
- n = x(n), r.menu = n;
101
+ const x = (_) => _.filter((r) => (r.type === 0 && (r.url = "/" + StrUtil.getId()), StrUtil.isNull(r.children) || (r.children = x(r.children)), r.show));
102
+ n = x(n), i.menu = n;
97
103
  };
98
- A(() => {
104
+ T(() => {
99
105
  m();
100
106
  });
101
- const y = H(() => C.router.currentRoute.value.path), u = (n) => {
107
+ const y = H(() => $.router.currentRoute.value.path), u = (n) => {
102
108
  y.value !== n && window.innerWidth < 900 && Timer.once(() => {
103
- r.layout.collapse = !r.layout.collapse;
109
+ i.layout.collapse = !i.layout.collapse;
104
110
  }, 300);
105
111
  };
106
112
  return (n, x) => {
107
- const _ = c("v-icon"), i = c("el-menu-item"), g = c("el-sub-menu"), D = c("el-menu"), E = c("el-scrollbar");
113
+ const _ = c("v-icon"), r = c("el-menu-item"), g = c("el-sub-menu"), D = c("el-menu"), E = c("el-scrollbar");
108
114
  return l(), a("div", {
109
- class: M(["sidebar", [r.layout.collapse ? "sidebar-hideen" : "sidebar-show"]])
115
+ class: M(["sidebar", [i.layout.collapse ? "sidebar-hideen" : "sidebar-show"]])
110
116
  }, [
111
117
  s(E, {
112
118
  height: "100%",
@@ -116,7 +122,7 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
116
122
  s(D, {
117
123
  class: "sidebar-el-menu",
118
124
  "default-active": y.value,
119
- collapse: r.layout.collapse,
125
+ collapse: i.layout.collapse,
120
126
  "text-color": "#bfcbd9",
121
127
  "active-text-color": "#20a0ff",
122
128
  "unique-opened": "",
@@ -124,13 +130,13 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
124
130
  onSelect: u
125
131
  }, {
126
132
  default: o(() => [
127
- (l(!0), a(v, null, b(r.menu, (t) => (l(), a(v, null, [
133
+ (l(!0), a(v, null, b(i.menu, (t) => (l(), a(v, null, [
128
134
  t.children && t.children?.length > 0 ? (l(), f(g, {
129
135
  index: t.url,
130
136
  key: t.url
131
137
  }, {
132
138
  title: o(() => [
133
- e("div", O, [
139
+ e("div", Q, [
134
140
  s(_, {
135
141
  lib: t.iconLib,
136
142
  name: t.iconName,
@@ -150,18 +156,18 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
150
156
  h(d(p.title), 1)
151
157
  ]),
152
158
  default: o(() => [
153
- (l(!0), a(v, null, b(p.children, (L, U) => (l(), f(i, {
159
+ (l(!0), a(v, null, b(p.children, (B, U) => (l(), f(r, {
154
160
  key: U,
155
- index: L.url
161
+ index: B.url
156
162
  }, {
157
163
  default: o(() => [
158
- h(d(L.title), 1)
164
+ h(d(B.title), 1)
159
165
  ]),
160
166
  _: 2
161
167
  }, 1032, ["index"]))), 128))
162
168
  ]),
163
169
  _: 2
164
- }, 1032, ["index"])) : (l(), f(i, {
170
+ }, 1032, ["index"])) : (l(), f(r, {
165
171
  key: 1,
166
172
  index: p.url
167
173
  }, {
@@ -173,7 +179,7 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
173
179
  ], 64))), 256))
174
180
  ]),
175
181
  _: 2
176
- }, 1032, ["index"])) : (l(), f(i, {
182
+ }, 1032, ["index"])) : (l(), f(r, {
177
183
  index: t.url,
178
184
  key: t.url
179
185
  }, {
@@ -181,7 +187,7 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
181
187
  e("span", null, d(t.title), 1)
182
188
  ]),
183
189
  default: o(() => [
184
- e("div", Q, [
190
+ e("div", X, [
185
191
  s(_, {
186
192
  lib: t.iconLib,
187
193
  name: t.iconName,
@@ -202,24 +208,24 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
202
208
  ], 2);
203
209
  };
204
210
  }
205
- }), Y = /* @__PURE__ */ z(X, [["__scopeId", "data-v-ac094262"]]), ee = { style: { display: "flex", height: "calc(100% - 70px)" } }, ne = { class: "content" }, oe = { class: "view" }, le = {
211
+ }), ee = /* @__PURE__ */ z(Y, [["__scopeId", "data-v-ac094262"]]), ne = { style: { display: "flex", height: "calc(100% - 70px)" } }, oe = { class: "content" }, le = { class: "view" }, te = {
206
212
  class: "row flex-center",
207
213
  style: { gap: "10px", "font-size": "12px" }
208
- }, te = /* @__PURE__ */ S({
214
+ }, se = /* @__PURE__ */ C({
209
215
  __name: "index",
210
- setup(B) {
211
- const r = N({
212
- keepAlive: ["/auth/role", "/auth/api"]
216
+ setup(A) {
217
+ const i = N({
218
+ keepAlive: ["/auth/role", "/auth/permission"]
213
219
  });
214
220
  return (m, y) => {
215
221
  const u = c("router-view");
216
222
  return l(), a(v, null, [
217
- s(J),
218
- e("div", ee, [
219
- s(Y),
220
- e("div", ne, [
223
+ s(O),
224
+ e("div", ne, [
225
+ s(ee),
226
+ e("div", oe, [
221
227
  e("div", null, [
222
- e("div", oe, [
228
+ e("div", le, [
223
229
  s(u, null, {
224
230
  default: o(({ Component: n }) => [
225
231
  s(R, {
@@ -228,7 +234,7 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
228
234
  }, {
229
235
  default: o(() => [
230
236
  (l(), f(W, {
231
- include: r.keepAlive
237
+ include: i.keepAlive
232
238
  }, [
233
239
  (l(), f(j(n), {
234
240
  key: m.$route.fullPath
@@ -240,9 +246,9 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
240
246
  ]),
241
247
  _: 1
242
248
  }),
243
- e("div", le, [
244
- e("div", null, d(w($).config.website.author), 1),
245
- e("div", null, d(w($).config.website.recordNumber), 1)
249
+ e("div", te, [
250
+ e("div", null, d(w(S).config.website.author), 1),
251
+ e("div", null, d(w(S).config.website.recordNumber), 1)
246
252
  ])
247
253
  ])
248
254
  ])
@@ -251,7 +257,7 @@ const q = { class: "header row no-wrap" }, F = { class: "header-right" }, K = {
251
257
  ], 64);
252
258
  };
253
259
  }
254
- }), ae = /* @__PURE__ */ z(te, [["__scopeId", "data-v-7d2c2356"]]);
260
+ }), de = /* @__PURE__ */ z(se, [["__scopeId", "data-v-fd10422c"]]);
255
261
  export {
256
- ae as default
262
+ de as default
257
263
  };