Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cb3f9668
authored
Jul 28, 2025
by
Jin Mao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 修复双列布局模式下,路由为hideInMenu时,空白右列
1 parent
5b75e5e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletions
packages/effects/layouts/src/basic/layout.vue
packages/effects/layouts/src/basic/layout.vue
View file @
cb3f966
<
script
lang=
"ts"
setup
>
import
type
{
SetupContext
}
from
'vue'
;
import
type
{
RouteLocationNormalizedLoaded
}
from
'vue-router'
;
import
type
{
MenuRecordRaw
}
from
'@vben/types'
;
import
{
computed
,
useSlots
,
watch
}
from
'vue'
;
import
{
computed
,
onMounted
,
useSlots
,
watch
}
from
'vue'
;
import
{
useRoute
}
from
'vue-router'
;
import
{
useRefresh
}
from
'@vben/hooks'
;
import
{
$t
,
i18n
}
from
'@vben/locales'
;
...
...
@@ -153,6 +155,23 @@ function clickLogo() {
emit
(
'clickLogo'
);
}
function
autoCollapseMenuByRouteMeta
(
route
:
RouteLocationNormalizedLoaded
)
{
// 只在双列模式下生效
if
(
preferences
.
app
.
layout
===
'sidebar-mixed-nav'
&&
route
.
meta
&&
route
.
meta
.
hideInMenu
)
{
sidebarExtraVisible
.
value
=
false
;
}
}
const
route
=
useRoute
();
onMounted
(()
=>
{
autoCollapseMenuByRouteMeta
(
route
);
});
watch
(
()
=>
preferences
.
app
.
layout
,
async
(
val
)
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment