From 39d2c4a95920bf08cee4506c8a3c7d815b1f8ad1 Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Wed, 20 Dec 2023 14:11:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Sidebar/Item.vue | 2 + src/layout/components/Sidebar/Logo.vue | 10 +- src/layout/components/Sidebar/SidebarItem.vue | 9 +- .../components/Sidebar/SidebarItemSub.vue | 96 +++++++++++++++++++ src/layout/components/Sidebar/index.vue | 8 +- src/views/system/menu/index.vue | 16 ++-- 6 files changed, 122 insertions(+), 19 deletions(-) create mode 100644 src/layout/components/Sidebar/SidebarItemSub.vue diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index be3285df..07dca92a 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -18,6 +18,8 @@ export default { if (icon) { vnodes.push() + } else { + vnodes.push() } if (title) { diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index 91a437be..c02cd648 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -15,7 +15,7 @@ key="collapse" class="sidebar-logo-link" to="/"> - +

- + - +
+ + + + + + +
+ + + diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index bac19f28..5c46634d 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -28,10 +28,10 @@ mode="vertical"> + :base-path="routeList.path+ '/'+ route.path" /> @@ -49,9 +49,7 @@ export default { ...mapState(['settings']), ...mapGetters(['sidebarRouters', 'sidebar', 'choicepart']), routeList() { - // return [this.partList[this.choicepart]] - // return [this.sidebarRouters[29]] - return [this.sidebarRouters[this.choicepart]] + return this.sidebarRouters[this.choicepart] }, activeMenu() { const route = this.$route; diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index efb4df49..082db5a8 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -32,11 +32,11 @@ - + @@ -76,7 +76,7 @@ - + @@ -263,9 +263,9 @@ export default { }, methods: { // 选择图标 - selected(name) { - this.form.icon = name; - }, + // selected(name) { + // this.form.icon = name; + // }, /** 查询菜单列表 */ getList() { this.loading = true; @@ -305,7 +305,7 @@ export default { id: undefined, parentId: 0, name: undefined, - icon: undefined, + // icon: undefined, type: SystemMenuTypeEnum.DIR, sort: undefined, status: CommonStatusEnum.ENABLE, -- 2.45.2 From 4c99d39f8a2dea42289a641d91c7c9d754d54856 Mon Sep 17 00:00:00 2001 From: juzi <819872918@qq.com> Date: Wed, 20 Dec 2023 14:22:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Sidebar/Item.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index 07dca92a..30873bd5 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -17,7 +17,7 @@ export default { const vnodes = [] if (icon) { - vnodes.push() + vnodes.push() } else { vnodes.push() } -- 2.45.2