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] =?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,