Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-monitor
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
Administrator
web-monitor
Commits
cc94b622
Commit
cc94b622
authored
Nov 09, 2018
by
Pan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix[Breadcurmb]: fixed router-link bug #217
parent
2dcd0aa0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
index.vue
src/components/Breadcrumb/index.vue
+9
-1
No files found.
src/components/Breadcrumb/index.vue
View file @
cc94b622
...
...
@@ -3,7 +3,7 @@
<transition-group
name=
"breadcrumb"
>
<el-breadcrumb-item
v-for=
"(item,index) in levelList"
v-if=
"item.meta.title"
:key=
"item.path"
>
<span
v-if=
"item.redirect==='noredirect'||index==levelList.length-1"
class=
"no-redirect"
>
{{
item
.
meta
.
title
}}
</span>
<
router-link
v-else
:to=
"item.redirect||pathCompile(item.path)"
>
{{
item
.
meta
.
title
}}
</router-link
>
<
a
v-else
@
click
.
prevent=
"handleLink(item)"
>
{{
item
.
meta
.
title
}}
</a
>
</el-breadcrumb-item>
</transition-group>
</el-breadcrumb>
...
...
@@ -44,6 +44,14 @@ export default {
const
{
params
}
=
this
.
$route
var
toPath
=
pathToRegexp
.
compile
(
path
)
return
toPath
(
params
)
},
handleLink
(
item
)
{
const
{
redirect
,
path
}
=
item
if
(
redirect
)
{
this
.
$router
.
push
(
redirect
)
return
}
this
.
$router
.
push
(
this
.
pathCompile
(
path
))
}
}
}
...
...
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