From ef1f9569e5c146fbdd796137bc30e13a13ae9fef Mon Sep 17 00:00:00 2001 From: 张晓波 <bingbo1993@126.com> Date: 星期四, 19 十月 2023 13:26:24 +0800 Subject: [PATCH] 苏州配置文件简 化 --- web/src/views/LayoutIndex/components/LayoutAside.vue | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/web/src/views/LayoutIndex/components/LayoutAside.vue b/web/src/views/LayoutIndex/components/LayoutAside.vue index a62ae11..8d29a32 100644 --- a/web/src/views/LayoutIndex/components/LayoutAside.vue +++ b/web/src/views/LayoutIndex/components/LayoutAside.vue @@ -21,7 +21,7 @@ <template v-for="three in item.children"> <template v-if="three.children && three.children.length > 1"> - <el-submenu :key="three.name" :index="three.path"> + <el-submenu :key="three.name" :index="three.path" class="titles_two"> <template slot="title"> <span>{{three.meta.title}}</span> </template> @@ -31,9 +31,15 @@ </el-submenu> </template> <template v-else-if="three.children && three.children.length === 1"> - <el-menu-item :index="three.children[0].path" :key="three.children[0].name"> + <el-submenu :key="three.name" :index="three.path"> + <template slot="title"> + <span>{{three.meta.title}}</span> + </template> + <el-menu-item :index="three.children[0].path" :key="three.children[0].name">{{three.children[0].meta.title}}</el-menu-item> + </el-submenu> + <!-- <el-menu-item :index="three.children[0].path" :key="three.children[0].name"> <span slot="title">{{three.children[0].meta.title}}</span> - </el-menu-item> + </el-menu-item> --> </template> <template v-else> <el-menu-item :index="three.path" :key="three.name"> @@ -111,6 +117,10 @@ } } +.titles_two{ + padding-left: 15px; +} + /deep/ .el-menu { border-right: 0; } @@ -121,6 +131,7 @@ } /deep/ .el-menu-item.is-active { + padding-left: 45px!important; position: relative; margin-left: 10px; color: #3DC8FF; -- Gitblit v1.9.3