Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
55dafabd
authored
Mar 23, 2023
by
xingyuv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 面包屑:1.修复使用动态路由的时候,无法显示的bug
parent
b56a5e06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/layout/components/Breadcrumb/src/Breadcrumb.vue
+2
-2
No files found.
src/layout/components/Breadcrumb/src/Breadcrumb.vue
View file @
55dafabd
...
@@ -37,7 +37,7 @@ export default defineComponent({
...
@@ -37,7 +37,7 @@ export default defineComponent({
})
})
const
getBreadcrumb
=
()
=>
{
const
getBreadcrumb
=
()
=>
{
const
currentPath
=
currentRoute
.
value
.
path
const
currentPath
=
currentRoute
.
value
.
matched
.
slice
(
-
1
)[
0
].
path
levelList
.
value
=
filter
<
AppRouteRecordRaw
>
(
unref
(
menuRouters
),
(
node
:
AppRouteRecordRaw
)
=>
{
levelList
.
value
=
filter
<
AppRouteRecordRaw
>
(
unref
(
menuRouters
),
(
node
:
AppRouteRecordRaw
)
=>
{
return
node
.
path
===
currentPath
return
node
.
path
===
currentPath
...
@@ -47,7 +47,7 @@ export default defineComponent({
...
@@ -47,7 +47,7 @@ export default defineComponent({
const
renderBreadcrumb
=
()
=>
{
const
renderBreadcrumb
=
()
=>
{
const
breadcrumbList
=
treeToList
<
AppRouteRecordRaw
[]
>
(
unref
(
levelList
))
const
breadcrumbList
=
treeToList
<
AppRouteRecordRaw
[]
>
(
unref
(
levelList
))
return
breadcrumbList
.
map
((
v
)
=>
{
return
breadcrumbList
.
map
((
v
)
=>
{
const
disabled
=
v
.
redirect
===
'noredirect'
const
disabled
=
!
v
.
redirect
||
v
.
redirect
===
'noredirect'
const
meta
=
v
.
meta
as
RouteMeta
const
meta
=
v
.
meta
as
RouteMeta
return
(
return
(
<
ElBreadcrumbItem
to
=
{{
path
:
disabled
?
''
:
v
.
path
}}
key
=
{
v
.
name
}
>
<
ElBreadcrumbItem
to
=
{{
path
:
disabled
?
''
:
v
.
path
}}
key
=
{
v
.
name
}
>
...
...
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