Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-dml
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-dml
Commits
98491905
提交
98491905
authored
2月 23, 2023
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: #3286
上级
fc48b505
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
36 行增加
和
19 行删除
+36
-19
Aside.vue
src/components/layout/Aside.vue
+36
-19
没有找到文件。
src/components/layout/Aside.vue
浏览文件 @
98491905
...
@@ -39,28 +39,35 @@ function findMenu(path: string, menus: IMenuItem[]) {
...
@@ -39,28 +39,35 @@ function findMenu(path: string, menus: IMenuItem[]) {
<nav
class=
"menu"
>
<nav
class=
"menu"
>
<ul>
<ul>
<li
v-for=
"item in menus"
:key=
"item.path"
:class=
"
{ 'is-active': item.path === currentMenu?.path }">
<li
v-for=
"item in menus"
:key=
"item.path"
:class=
"
{ 'is-active': item.path === currentMenu?.path }">
<el-tooltip
:content=
"item.name"
placement=
"right"
>
<div
class=
"menu-item"
>
<template
v-if=
"item.children"
>
<RouterLink
:to=
"item.path"
>
<component
:is=
"item.icon"
class=
"menu-icon"
></component>
</RouterLink>
</
template
>
<el-tooltip
:content=
"item.name"
placement=
"right"
v-else
>
<RouterLink
:to=
"item.path"
>
<RouterLink
:to=
"item.path"
>
<component
:is=
"item.icon"
class=
"menu-icon"
></component>
<component
:is=
"item.icon"
class=
"menu-icon"
></component>
</RouterLink>
</RouterLink>
</el-tooltip>
</el-tooltip>
</li>
</div>
</ul>
<nav
class=
"submenu"
v-if=
"item.children"
>
</nav>
<h1
class=
"submenu-title"
>
{{ item.name }}
</h1>
<nav
class=
"submenu"
v-if=
"currentMenu?.children?.length"
>
<h1
class=
"submenu-title"
>
{{
currentMenu
.
name
}}
</h1>
<ul>
<ul>
<li
<li
v-for=
"item in currentMenu
.children"
v-for=
"submenu in item
.children"
:key=
"item
.path"
:key=
"submenu
.path"
:class=
"
{ 'is-active': item
.path === currentSubmenu?.path }">
:class=
"{ 'is-active': submenu
.path === currentSubmenu?.path }"
>
<RouterLink
:to=
"item
.path"
>
<RouterLink
:to=
"submenu
.path"
>
<component
:is=
"item.icon"
class=
"submenu-icon"
v-if=
"item
.icon"
></component>
<component
:is=
"submenu.icon"
class=
"submenu-icon"
v-if=
"submenu
.icon"
></component>
{{
item
.
name
}}
{{ submenu
.name }}
</RouterLink>
</RouterLink>
</li>
</li>
</ul>
</ul>
</nav>
</nav>
</li>
</ul>
</nav>
</aside>
</aside>
</template>
</template>
...
@@ -70,18 +77,19 @@ function findMenu(path: string, menus: IMenuItem[]) {
...
@@ -70,18 +77,19 @@ function findMenu(path: string, menus: IMenuItem[]) {
top
:
0
;
top
:
0
;
display
:
flex
;
display
:
flex
;
height
:
100vh
;
height
:
100vh
;
overflow-x
:
hidden
;
//
overflow-x: hidden;
overflow-y
:
auto
;
//
overflow-y: auto;
box-sizing
:
content-box
;
box-sizing
:
content-box
;
z-index
:
2001
;
.menu
{
.menu
{
width
:
60px
;
width
:
60px
;
height
:
100%
;
height
:
100%
;
background
:
#fff
;
background
:
#fff
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
overflow-y
:
auto
;
>
ul
>
li
{
overflow-x
:
hidden
;
padding
:
8px
;
li
{
}
margin
:
8px
;
.menu-item
{
height
:
44px
;
height
:
44px
;
text-align
:
center
;
text-align
:
center
;
border-radius
:
4px
;
border-radius
:
4px
;
...
@@ -90,10 +98,10 @@ function findMenu(path: string, menus: IMenuItem[]) {
...
@@ -90,10 +98,10 @@ function findMenu(path: string, menus: IMenuItem[]) {
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
}
svg
{
svg
{
fill
:
var
(
--
main-color
);
fill
:
var
(
--
main-color
);
}
}
}
&
.is-active
{
&
.is-active
{
background-color
:
var
(
--
main-color
);
background-color
:
var
(
--
main-color
);
...
@@ -102,8 +110,17 @@ function findMenu(path: string, menus: IMenuItem[]) {
...
@@ -102,8 +110,17 @@ function findMenu(path: string, menus: IMenuItem[]) {
}
}
}
}
}
}
>
ul
>
li
:hover
{
.submenu
{
display
:
block
;
}
}
}
}
.submenu
{
.submenu
{
display
:
none
;
position
:
absolute
;
left
:
100%
;
top
:
0
;
width
:
200px
;
width
:
200px
;
height
:
100vh
;
height
:
100vh
;
background
:
#efefef
;
background
:
#efefef
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论