Merge pull request #828 from iview/2.0

修复更新后面包屑‘首页’无法点击的bug
This commit is contained in:
Lison 2018-08-02 16:26:18 +08:00 committed by GitHub
commit 64dd7f7478
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ export const getBreadCrumbList = (routeMetched, homeRoute) => {
res = res.filter(item => {
return !item.meta.hideInMenu
})
return [homeRoute, ...res]
return [Object.assign(homeRoute, { to: homeRoute.path }), ...res]
}
export const showTitle = (item, vm) => vm.$config.useI18n ? vm.$t(item.name) : ((item.meta && item.meta.title) || item.name)

View File

@ -32,7 +32,7 @@ export default [
},
children: [
{
path: 'home',
path: '/home',
name: 'home',
meta: {
hideInMenu: true,