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 个修改的文件
包含
45 行增加
和
28 行删除
+45
-28
Aside.vue
src/components/layout/Aside.vue
+45
-28
没有找到文件。
src/components/layout/Aside.vue
浏览文件 @
98491905
...
@@ -39,25 +39,32 @@ function findMenu(path: string, menus: IMenuItem[]) {
...
@@ -39,25 +39,32 @@ 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"
>
<RouterLink
:to=
"item.path"
>
<template
v-if=
"item.children"
>
<component
:is=
"item.icon"
class=
"menu-icon"
></component>
<RouterLink
:to=
"item.path"
>
</RouterLink>
<component
:is=
"item.icon"
class=
"menu-icon"
></component>
</el-tooltip>
</RouterLink>
</li>
</
template
>
</ul>
<el-tooltip
:content=
"item.name"
placement=
"right"
v-else
>
</nav>
<RouterLink
:to=
"item.path"
>
<nav
class=
"submenu"
v-if=
"currentMenu?.children?.length"
>
<component
:is=
"item.icon"
class=
"menu-icon"
></component>
<h1
class=
"submenu-title"
>
{{
currentMenu
.
name
}}
</h1>
</RouterLink>
<ul>
</el-tooltip>
<li
</div>
v-for=
"item in currentMenu.children"
<nav
class=
"submenu"
v-if=
"item.children"
>
:key=
"item.path"
<h1
class=
"submenu-title"
>
{{ item.name }}
</h1>
:class=
"
{ 'is-active': item.path === currentSubmenu?.path }">
<ul>
<RouterLink
:to=
"item.path"
>
<li
<component
:is=
"item.icon"
class=
"submenu-icon"
v-if=
"item.icon"
></component>
v-for=
"submenu in item.children"
{{
item
.
name
}}
:key=
"submenu.path"
</RouterLink>
:class=
"{ 'is-active': submenu.path === currentSubmenu?.path }"
>
<RouterLink
:to=
"submenu.path"
>
<component
:is=
"submenu.icon"
class=
"submenu-icon"
v-if=
"submenu.icon"
></component>
{{ submenu.name }}
</RouterLink>
</li>
</ul>
</nav>
</li>
</li>
</ul>
</ul>
</nav>
</nav>
...
@@ -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,9 +98,9 @@ function findMenu(path: string, menus: IMenuItem[]) {
...
@@ -90,9 +98,9 @@ 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
{
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论