lw-cdp-ui 1.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.
@@ -0,0 +1,475 @@
1
+ import F from "./sideM-OQXV4LfA.js";
2
+ import V from "./aside-D4gRKrXk.js";
3
+ import q from "./topbar-Bm8ZEc4i.js";
4
+ import x from "./tags-CSqKlWtu.js";
5
+ import B from "./NavMenu-5q5cwgxa.js";
6
+ import Q from "./userbar--TC_Vip3.js";
7
+ import K from "./setting-CdKTzN9K.js";
8
+ import W from "./iframeView-BgLGyeZi.js";
9
+ import { resolveComponent as d, openBlock as e, createElementBlock as m, Fragment as f, createElementVNode as i, toDisplayString as h, renderList as L, normalizeClass as y, createVNode as l, withCtx as r, createBlock as o, resolveDynamicComponent as v, createCommentVNode as a, KeepAlive as N } from "vue";
10
+ import { _ as P } from "./logo-BdF7DdEi.js";
11
+ import { _ as j } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ const H = {
13
+ name: "index",
14
+ components: {
15
+ Aside: V,
16
+ SideM: F,
17
+ Topbar: q,
18
+ Tags: x,
19
+ NavMenu: B,
20
+ userbar: Q,
21
+ setting: K,
22
+ iframeView: W
23
+ },
24
+ data() {
25
+ return {
26
+ settingDialog: !1,
27
+ menu: [],
28
+ nextMenu: [],
29
+ pmenu: {},
30
+ active: ""
31
+ };
32
+ },
33
+ computed: {
34
+ ismobile() {
35
+ return this.$store.state.global.ismobile;
36
+ },
37
+ layout() {
38
+ return this.$store.state.global.layout;
39
+ },
40
+ layoutTags() {
41
+ return this.$store.state.global.layoutTags;
42
+ },
43
+ menuIsCollapse() {
44
+ return this.$store.state.global.menuIsCollapse;
45
+ }
46
+ },
47
+ created() {
48
+ this.onLayoutResize(), window.addEventListener("resize", this.onLayoutResize);
49
+ var s = this.$router.sc_getMenu();
50
+ this.menu = this.filterUrl(s), this.showThis(), this.$store.commit("LOAD_USER_FROM_LOCAL_STORAGE");
51
+ },
52
+ watch: {
53
+ $route() {
54
+ this.showThis();
55
+ var s = this.$router.sc_getMenu();
56
+ this.menu = this.filterUrl(s);
57
+ },
58
+ "$i18n.locale"() {
59
+ var s = this.$router.sc_getMenu();
60
+ this.menu = this.filterUrl(s), location.reload();
61
+ },
62
+ layout: {
63
+ handler(s) {
64
+ document.body.setAttribute("data-layout", s);
65
+ },
66
+ immediate: !0
67
+ }
68
+ },
69
+ methods: {
70
+ openSetting() {
71
+ this.settingDialog = !0;
72
+ },
73
+ onLayoutResize() {
74
+ this.$store.commit("SET_ismobile", document.body.clientWidth < 992);
75
+ },
76
+ //路由监听高亮
77
+ showThis() {
78
+ this.pmenu = this.$route.meta.breadcrumb ? this.$route.meta.breadcrumb[0] : {}, this.nextMenu = this.filterUrl(this.pmenu.children), this.$nextTick(() => {
79
+ this.active = this.$route.meta.active || this.$route.fullPath;
80
+ });
81
+ },
82
+ //点击显示
83
+ showMenu(s) {
84
+ this.pmenu = s, this.nextMenu = this.filterUrl(s.children), (!s.children || s.children.length == 0) && s.component && this.$router.push({ path: s.path });
85
+ },
86
+ //转换外部链接的路由
87
+ filterUrl(s) {
88
+ var c = [];
89
+ return s && s.forEach((_) => {
90
+ if (_.meta = _.meta ? _.meta : {}, _.meta.hidden || _.meta.type == "button")
91
+ return !1;
92
+ _.meta.type == "iframe" && (_.path = `/i/${_.name}`), _.children && _.children.length > 0 && (_.children = this.filterUrl(_.children)), c.push(_);
93
+ }), c;
94
+ },
95
+ //退出最大化
96
+ exitMaximize() {
97
+ document.getElementById("app").classList.remove("main-maximize");
98
+ }
99
+ }
100
+ }, J = { class: "adminui-header" }, X = { class: "adminui-header-left" }, Y = { class: "logo-bar" }, Z = /* @__PURE__ */ i("img", {
101
+ class: "logo",
102
+ src: P
103
+ }, null, -1), $ = {
104
+ key: 0,
105
+ class: "nav"
106
+ }, ee = ["onClick"], ie = { class: "adminui-header-right" }, te = { class: "aminui-wrapper" }, se = {
107
+ key: 0,
108
+ class: "adminui-side-top"
109
+ }, le = { class: "adminui-side-scroll" }, ne = { class: "aminui-body el-container" }, oe = {
110
+ class: "adminui-main",
111
+ id: "adminui-main"
112
+ }, ae = {
113
+ key: 1,
114
+ class: "aminui-body-menu"
115
+ }, ue = { class: "aminui-side-split-left" }, re = { class: "aminui-wrapper" }, de = { class: "adminui-side-scroll" }, me = { class: "title-name" }, ce = { class: "aminui-body el-container" }, _e = { class: "aminui-body-menu-top" }, he = { class: "top-bar-title" }, pe = { class: "title" }, ve = {
116
+ class: "adminui-main",
117
+ id: "adminui-main"
118
+ }, fe = { class: "adminui-header" }, ye = { class: "adminui-header-left" }, ke = { class: "logo-bar" }, be = /* @__PURE__ */ i("img", {
119
+ class: "logo",
120
+ src: P
121
+ }, null, -1), ge = { class: "adminui-header-right" }, Ce = {
122
+ key: 0,
123
+ class: "adminui-header-menu"
124
+ }, Me = { class: "aminui-wrapper" }, Ie = { class: "aminui-body el-container" }, Ee = {
125
+ class: "adminui-main",
126
+ id: "adminui-main"
127
+ }, we = {
128
+ key: 3,
129
+ class: "aminui-wrapper"
130
+ }, Ne = {
131
+ key: 0,
132
+ class: "aminui-side-split"
133
+ }, Ae = { class: "aminui-side-split-top" }, Te = { class: "adminui-side-split-scroll" }, Ue = ["onClick"], Oe = {
134
+ key: 0,
135
+ class: "adminui-side-top"
136
+ }, Le = { class: "adminui-side-scroll" }, Pe = { class: "aminui-body el-container" }, Ge = {
137
+ class: "adminui-main",
138
+ id: "adminui-main"
139
+ };
140
+ function Se(s, c, _, ze, u, t) {
141
+ const p = d("el-icon"), k = d("userbar"), b = d("NavMenu"), g = d("el-menu"), C = d("el-scrollbar"), A = d("el-icon-expand"), T = d("el-icon-fold"), M = d("Side-m"), U = d("Topbar"), I = d("Tags"), E = d("router-view"), w = d("iframe-view"), O = d("Aside"), G = d("el-icon-close"), S = d("el-icon-brush-filled"), z = d("setting"), D = d("el-drawer");
142
+ return e(), m(f, null, [
143
+ t.layout == "header" ? (e(), m(f, { key: 0 }, [
144
+ i("header", J, [
145
+ i("div", X, [
146
+ i("div", Y, [
147
+ Z,
148
+ i("span", null, h(s.$CONFIG.APP_NAME), 1)
149
+ ]),
150
+ t.ismobile ? a("", !0) : (e(), m("ul", $, [
151
+ (e(!0), m(f, null, L(u.menu, (n) => (e(), m("li", {
152
+ key: n,
153
+ class: y(u.pmenu.path == n.path ? "active" : ""),
154
+ onClick: (R) => t.showMenu(n)
155
+ }, [
156
+ l(p, null, {
157
+ default: r(() => [
158
+ (e(), o(v(n.meta.icon || "el-icon-menu")))
159
+ ]),
160
+ _: 2
161
+ }, 1024),
162
+ i("span", null, h(n.meta.title), 1)
163
+ ], 10, ee))), 128))
164
+ ]))
165
+ ]),
166
+ i("div", ie, [
167
+ l(k)
168
+ ])
169
+ ]),
170
+ i("section", te, [
171
+ !t.ismobile && u.nextMenu.length > 0 || !u.pmenu.component ? (e(), m("div", {
172
+ key: 0,
173
+ class: y(t.menuIsCollapse ? "aminui-side isCollapse" : "aminui-side")
174
+ }, [
175
+ t.menuIsCollapse ? a("", !0) : (e(), m("div", se, [
176
+ i("h2", null, h(u.pmenu.meta.title), 1)
177
+ ])),
178
+ i("div", le, [
179
+ l(C, null, {
180
+ default: r(() => [
181
+ l(g, {
182
+ "default-active": u.active,
183
+ router: "",
184
+ collapse: t.menuIsCollapse,
185
+ "unique-opened": s.$CONFIG.MENU_UNIQUE_OPENED
186
+ }, {
187
+ default: r(() => [
188
+ l(b, { navMenus: u.nextMenu }, null, 8, ["navMenus"])
189
+ ]),
190
+ _: 1
191
+ }, 8, ["default-active", "collapse", "unique-opened"])
192
+ ]),
193
+ _: 1
194
+ })
195
+ ]),
196
+ i("div", {
197
+ class: "adminui-side-bottom",
198
+ onClick: c[0] || (c[0] = (n) => s.$store.commit("TOGGLE_menuIsCollapse"))
199
+ }, [
200
+ l(p, null, {
201
+ default: r(() => [
202
+ t.menuIsCollapse ? (e(), o(A, { key: 0 })) : (e(), o(T, { key: 1 }))
203
+ ]),
204
+ _: 1
205
+ })
206
+ ])
207
+ ], 2)) : a("", !0),
208
+ t.ismobile ? (e(), o(M, { key: 1 })) : a("", !0),
209
+ i("div", ne, [
210
+ t.ismobile ? a("", !0) : (e(), o(U, { key: 0 })),
211
+ !t.ismobile && t.layoutTags ? (e(), o(I, { key: 1 })) : a("", !0),
212
+ i("div", oe, [
213
+ l(E, null, {
214
+ default: r(({ Component: n }) => [
215
+ (e(), o(N, {
216
+ include: this.$store.state.keepAlive.keepLiveRoute
217
+ }, [
218
+ s.$store.state.keepAlive.routeShow ? (e(), o(v(n), {
219
+ key: s.$route.fullPath
220
+ })) : a("", !0)
221
+ ], 1032, ["include"]))
222
+ ]),
223
+ _: 1
224
+ }),
225
+ l(w)
226
+ ])
227
+ ])
228
+ ])
229
+ ], 64)) : t.layout == "menu" ? (e(), m("section", ae, [
230
+ i("div", ue, [
231
+ l(O)
232
+ ]),
233
+ i("section", re, [
234
+ t.ismobile ? a("", !0) : (e(), m("div", {
235
+ key: 0,
236
+ class: y(t.menuIsCollapse ? "aminui-side isCollapse" : "aminui-side")
237
+ }, [
238
+ i("div", de, [
239
+ l(C, null, {
240
+ default: r(() => [
241
+ i("div", me, h(t.menuIsCollapse ? s.$CONFIG.APP_NAME.charAt(0) : s.$CONFIG.APP_NAME), 1),
242
+ l(g, {
243
+ "default-active": u.active,
244
+ router: "",
245
+ collapse: t.menuIsCollapse,
246
+ "unique-opened": s.$CONFIG.MENU_UNIQUE_OPENED
247
+ }, {
248
+ default: r(() => [
249
+ l(b, { navMenus: u.menu }, null, 8, ["navMenus"])
250
+ ]),
251
+ _: 1
252
+ }, 8, ["default-active", "collapse", "unique-opened"])
253
+ ]),
254
+ _: 1
255
+ })
256
+ ]),
257
+ i("div", {
258
+ class: "adminui-side-bottom",
259
+ onClick: c[1] || (c[1] = (n) => s.$store.commit("TOGGLE_menuIsCollapse"))
260
+ }, [
261
+ l(p, null, {
262
+ default: r(() => [
263
+ t.menuIsCollapse ? (e(), o(A, { key: 0 })) : (e(), o(T, { key: 1 }))
264
+ ]),
265
+ _: 1
266
+ })
267
+ ])
268
+ ], 2)),
269
+ t.ismobile ? (e(), o(M, { key: 1 })) : a("", !0),
270
+ i("div", ce, [
271
+ i("div", _e, [
272
+ i("div", he, [
273
+ i("span", pe, h(s.$t("layout.topbar")) + ":", 1),
274
+ t.ismobile ? a("", !0) : (e(), o(U, { key: 0 }))
275
+ ]),
276
+ l(k)
277
+ ]),
278
+ !t.ismobile && t.layoutTags ? (e(), o(I, { key: 0 })) : a("", !0),
279
+ i("div", ve, [
280
+ l(E, null, {
281
+ default: r(({ Component: n }) => [
282
+ (e(), o(N, {
283
+ include: this.$store.state.keepAlive.keepLiveRoute
284
+ }, [
285
+ s.$store.state.keepAlive.routeShow ? (e(), o(v(n), {
286
+ key: s.$route.fullPath
287
+ })) : a("", !0)
288
+ ], 1032, ["include"]))
289
+ ]),
290
+ _: 1
291
+ }),
292
+ l(w)
293
+ ])
294
+ ])
295
+ ])
296
+ ])) : t.layout == "dock" ? (e(), m(f, { key: 2 }, [
297
+ i("header", fe, [
298
+ i("div", ye, [
299
+ i("div", ke, [
300
+ be,
301
+ i("span", null, h(s.$CONFIG.APP_NAME), 1)
302
+ ])
303
+ ]),
304
+ i("div", ge, [
305
+ t.ismobile ? a("", !0) : (e(), m("div", Ce, [
306
+ l(g, {
307
+ mode: "horizontal",
308
+ "default-active": u.active,
309
+ router: "",
310
+ "background-color": "#222b45",
311
+ "text-color": "#fff",
312
+ "active-text-color": "var(--el-color-primary)"
313
+ }, {
314
+ default: r(() => [
315
+ l(b, { navMenus: u.menu }, null, 8, ["navMenus"])
316
+ ]),
317
+ _: 1
318
+ }, 8, ["default-active"])
319
+ ])),
320
+ t.ismobile ? (e(), o(M, { key: 1 })) : a("", !0),
321
+ l(k)
322
+ ])
323
+ ]),
324
+ i("section", Me, [
325
+ i("div", Ie, [
326
+ !t.ismobile && t.layoutTags ? (e(), o(I, { key: 0 })) : a("", !0),
327
+ i("div", Ee, [
328
+ l(E, null, {
329
+ default: r(({ Component: n }) => [
330
+ (e(), o(N, {
331
+ include: this.$store.state.keepAlive.keepLiveRoute
332
+ }, [
333
+ s.$store.state.keepAlive.routeShow ? (e(), o(v(n), {
334
+ key: s.$route.fullPath
335
+ })) : a("", !0)
336
+ ], 1032, ["include"]))
337
+ ]),
338
+ _: 1
339
+ }),
340
+ l(w)
341
+ ])
342
+ ])
343
+ ])
344
+ ], 64)) : (e(), m("section", we, [
345
+ t.ismobile ? a("", !0) : (e(), m("div", Ne, [
346
+ i("div", Ae, [
347
+ l(O)
348
+ ]),
349
+ i("div", Te, [
350
+ l(C, null, {
351
+ default: r(() => [
352
+ i("ul", null, [
353
+ (e(!0), m(f, null, L(u.menu, (n) => (e(), m("li", {
354
+ key: n,
355
+ class: y(u.pmenu.path == n.path ? "active" : ""),
356
+ onClick: (R) => t.showMenu(n)
357
+ }, [
358
+ l(p, null, {
359
+ default: r(() => [
360
+ (e(), o(v(n.meta.icon || s.el - s.icon - u.menu)))
361
+ ]),
362
+ _: 2
363
+ }, 1024),
364
+ i("p", null, h(n.meta.title), 1)
365
+ ], 10, Ue))), 128))
366
+ ])
367
+ ]),
368
+ _: 1
369
+ })
370
+ ])
371
+ ])),
372
+ !t.ismobile && u.nextMenu.length > 0 || !u.pmenu.component ? (e(), m("div", {
373
+ key: 1,
374
+ class: y(t.menuIsCollapse ? "aminui-side isCollapse" : "aminui-side")
375
+ }, [
376
+ t.menuIsCollapse ? a("", !0) : (e(), m("div", Oe, [
377
+ i("h2", null, h(u.pmenu.meta.title), 1)
378
+ ])),
379
+ i("div", Le, [
380
+ l(C, null, {
381
+ default: r(() => [
382
+ l(g, {
383
+ "default-active": u.active,
384
+ router: "",
385
+ collapse: t.menuIsCollapse,
386
+ "unique-opened": s.$CONFIG.MENU_UNIQUE_OPENED
387
+ }, {
388
+ default: r(() => [
389
+ l(b, { navMenus: u.nextMenu }, null, 8, ["navMenus"])
390
+ ]),
391
+ _: 1
392
+ }, 8, ["default-active", "collapse", "unique-opened"])
393
+ ]),
394
+ _: 1
395
+ })
396
+ ]),
397
+ i("div", {
398
+ class: "adminui-side-bottom",
399
+ onClick: c[2] || (c[2] = (n) => s.$store.commit("TOGGLE_menuIsCollapse"))
400
+ }, [
401
+ l(p, null, {
402
+ default: r(() => [
403
+ t.menuIsCollapse ? (e(), o(A, { key: 0 })) : (e(), o(T, { key: 1 }))
404
+ ]),
405
+ _: 1
406
+ })
407
+ ])
408
+ ], 2)) : a("", !0),
409
+ t.ismobile ? (e(), o(M, { key: 2 })) : a("", !0),
410
+ i("div", Pe, [
411
+ l(U, null, {
412
+ default: r(() => [
413
+ l(k)
414
+ ]),
415
+ _: 1
416
+ }),
417
+ !t.ismobile && t.layoutTags ? (e(), o(I, { key: 0 })) : a("", !0),
418
+ i("div", Ge, [
419
+ l(E, null, {
420
+ default: r(({ Component: n }) => [
421
+ (e(), o(N, {
422
+ include: s.$store.state.keepAlive.keepLiveRoute
423
+ }, [
424
+ s.$store.state.keepAlive.routeShow ? (e(), o(v(n), {
425
+ key: s.$route.fullPath
426
+ })) : a("", !0)
427
+ ], 1032, ["include"]))
428
+ ]),
429
+ _: 1
430
+ }),
431
+ l(w)
432
+ ])
433
+ ])
434
+ ])),
435
+ i("div", {
436
+ class: "main-maximize-exit",
437
+ onClick: c[3] || (c[3] = (...n) => t.exitMaximize && t.exitMaximize(...n))
438
+ }, [
439
+ l(p, null, {
440
+ default: r(() => [
441
+ l(G)
442
+ ]),
443
+ _: 1
444
+ })
445
+ ]),
446
+ i("div", {
447
+ class: "layout-setting",
448
+ onClick: c[4] || (c[4] = (...n) => t.openSetting && t.openSetting(...n))
449
+ }, [
450
+ l(p, null, {
451
+ default: r(() => [
452
+ l(S)
453
+ ]),
454
+ _: 1
455
+ })
456
+ ]),
457
+ l(D, {
458
+ title: "布局实时演示",
459
+ modelValue: u.settingDialog,
460
+ "onUpdate:modelValue": c[5] || (c[5] = (n) => u.settingDialog = n),
461
+ size: 400,
462
+ "append-to-body": "",
463
+ "destroy-on-close": ""
464
+ }, {
465
+ default: r(() => [
466
+ l(z)
467
+ ]),
468
+ _: 1
469
+ }, 8, ["modelValue"])
470
+ ], 64);
471
+ }
472
+ const He = /* @__PURE__ */ j(H, [["render", Se]]);
473
+ export {
474
+ He as default
475
+ };