Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-baoshen-pc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何远江
topsun-baoshen-pc
Commits
a22a6761
Commit
a22a6761
authored
Nov 01, 2023
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
菜单显示调整
parent
a9c2a054
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
BasicSubMenuItem.vue
src/layouts/default/menu/components/BasicSubMenuItem.vue
+4
-2
No files found.
src/layouts/default/menu/components/BasicSubMenuItem.vue
View file @
a22a6761
<
template
>
<BasicMenuItem
v-if=
"
!menuHasChildren && getShowMenu
"
v-bind=
"$props"
/>
<BasicMenuItem
v-if=
"
(!menuHasChildren && getShowMenu) || oneChildren
"
v-bind=
"$props"
/>
<SubMenu
v-if=
"menuHasChildren && getShowMenu"
:key=
"`submenu-$
{item.path}`"
...
...
@@ -37,10 +37,12 @@ export default defineComponent({
setup
(
props
)
{
const
getShowMenu
=
computed
(()
=>
!
props
.
item
.
meta
?.
hideMenu
)
const
menuHasChildren
=
computed
(()
=>
props
.
item
?.
children
&&
props
.
item
?.
children
.
length
>
0
)
const
oneChildren
=
computed
(()
=>
props
.
item
?.
children
?.
length
===
1
)
const
menuHasChildren
=
computed
(()
=>
props
.
item
?.
children
&&
props
.
item
?.
children
.
length
>
1
)
return
{
getShowMenu
,
oneChildren
,
menuHasChildren
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment