Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nse-ui
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
nse-ui
Commits
9a28220f
Commit
9a28220f
authored
Sep 25, 2025
by
ningjihai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单修改
parent
903c29de
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
24 行增加
和
4 行删除
+24
-4
src/assets/styles/sidebar.scss
+3
-0
src/layout/components/Navbar.vue
+3
-1
src/layout/components/Sidebar/index.vue
+18
-3
没有找到文件。
src/assets/styles/sidebar.scss
View file @
9a28220f
...
@@ -270,6 +270,9 @@
...
@@ -270,6 +270,9 @@
background-color
:
rgba
(
33
,
103
,
217
,
1
);
background-color
:
rgba
(
33
,
103
,
217
,
1
);
}
}
}
}
.el-menu-item
{
border-bottom
:
2px
solid
transparent
;
}
.el-menu-item.is-active
{
.el-menu-item.is-active
{
border-bottom
:
2px
solid
rgba
(
17
,
200
,
250
,
1
);
border-bottom
:
2px
solid
rgba
(
17
,
200
,
250
,
1
);
}
}
...
...
src/layout/components/Navbar.vue
View file @
9a28220f
...
@@ -95,7 +95,9 @@ function logout() {
...
@@ -95,7 +95,9 @@ function logout() {
appStore
.
setQueryData
({
appStore
.
setQueryData
({
projectId
:
''
projectId
:
''
})
})
window
.
location
.
replace
(
`
${
import
.
meta
.
env
.
BASE_URL
}
`
)
sessionStorage
.
removeItem
(
'subMenuPath'
)
sessionStorage
.
removeItem
(
'submenuItems'
)
window
.
location
.
replace
(
`
${
import
.
meta
.
env
.
BASE_URL
}
`
)
})
})
}).
catch
(()
=>
{
})
}).
catch
(()
=>
{
})
...
...
src/layout/components/Sidebar/index.vue
View file @
9a28220f
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<div
v-if=
"submenuItems.length > 0"
class=
"submenu-container"
>
<div
v-if=
"submenuItems.length > 0"
class=
"submenu-container"
>
<div
class=
"submenu-wrapper"
>
<div
class=
"submenu-wrapper"
>
<template
v-for=
"(child, index) in submenuItems"
:key=
"child.path + index"
>
<template
v-for=
"(child, index) in submenuItems"
:key=
"child.path + index"
>
<div
v-if=
"!child.hidden"
class=
"submenu-item"
:class=
"[child.fullPath === route.fullPath ? 'active-submenu-item' : '']"
>
<div
v-if=
"!child.hidden"
class=
"submenu-item"
:class=
"[child.fullPath === route.fullPath ? 'active-submenu-item' : '']"
@
click=
"remberChild(child)"
>
<app-link
:to=
"child.fullPath"
>
<!-- 使用完整路径 -->
<app-link
:to=
"child.fullPath"
>
<!-- 使用完整路径 -->
<div
class=
"submenu-link"
>
<div
class=
"submenu-link"
>
<svg-icon
:icon-class=
"child.meta.icon"
/>
<svg-icon
:icon-class=
"child.meta.icon"
/>
...
@@ -75,7 +75,7 @@ import useAppStore from '@/store/modules/app'
...
@@ -75,7 +75,7 @@ import useAppStore from '@/store/modules/app'
import
useSettingsStore
from
'@/store/modules/settings'
import
useSettingsStore
from
'@/store/modules/settings'
import
useUserStore
from
'@/store/modules/user'
import
useUserStore
from
'@/store/modules/user'
import
usePermissionStore
from
'@/store/modules/permission'
import
usePermissionStore
from
'@/store/modules/permission'
import
{
ref
,
computed
}
from
'vue'
import
{
ref
,
computed
,
onMounted
}
from
'vue'
import
{
getNormalPath
}
from
'@/utils/ruoyi'
import
{
getNormalPath
}
from
'@/utils/ruoyi'
import
{
useRoute
}
from
'vue-router'
import
{
useRoute
}
from
'vue-router'
const
route
=
useRoute
()
const
route
=
useRoute
()
...
@@ -84,6 +84,8 @@ const appStore = useAppStore()
...
@@ -84,6 +84,8 @@ const appStore = useAppStore()
const
userStore
=
useUserStore
()
const
userStore
=
useUserStore
()
const
settingsStore
=
useSettingsStore
()
const
settingsStore
=
useSettingsStore
()
const
permissionStore
=
usePermissionStore
()
const
permissionStore
=
usePermissionStore
()
// 转换接口数据为组件需要的格式
// 转换接口数据为组件需要的格式
const
processedRouters
=
computed
(()
=>
{
const
processedRouters
=
computed
(()
=>
{
return
permissionStore
.
sidebarRouters
return
permissionStore
.
sidebarRouters
...
@@ -95,14 +97,27 @@ const navType = computed(() => {
...
@@ -95,14 +97,27 @@ const navType = computed(() => {
const
type
=
navStatus
.
type
===
'project'
?
'2'
:
'1'
const
type
=
navStatus
.
type
===
'project'
?
'2'
:
'1'
return
type
return
type
})
})
onMounted
(()
=>
{
if
(
sessionStorage
.
getItem
(
'subMenuPath'
)){
submenuItems
.
value
=
sessionStorage
.
getItem
(
'submenuItems'
)
?
JSON
.
parse
(
sessionStorage
.
getItem
(
'submenuItems'
))
:
[]
}
else
{
submenuItems
.
value
=
[]
}
})
function
handleParentClick
(
children
)
{
function
handleParentClick
(
children
)
{
submenuItems
.
value
=
children
submenuItems
.
value
=
children
}
}
function
remberChild
(
child
)
{
sessionStorage
.
setItem
(
'subMenuPath'
,
JSON
.
stringify
(
child
.
fullPath
))
sessionStorage
.
setItem
(
'submenuItems'
,
JSON
.
stringify
(
submenuItems
.
value
))
}
function
handleNoChildrenClick
()
{
function
handleNoChildrenClick
()
{
sessionStorage
.
removeItem
(
'subMenuPath'
)
submenuItems
.
value
=
[]
submenuItems
.
value
=
[]
sessionStorage
.
removeItem
(
'submenuItems'
)
}
}
const
activeMenuItem
=
ref
(
null
)
const
activeMenuItem
=
ref
(
null
)
function
handleChild
(
child
)
{
function
handleChild
(
child
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论