Commit 67f4f3e1 authored by caixingbing's avatar caixingbing

*

parent 856b5346
......@@ -52,13 +52,13 @@ export default {
},
iconName() {
return function(val) {
let svgIcon = val.meta.icon, currentIcon = ''
let svgIcon = val.meta && val.meta.icon, currentIcon = ''
let icon = this.isActive(val) ? svgIcon+'Tags' : svgIcon+'Tag'
if (!svgIcon) {
const index = val.path.indexOf('/', val.path.indexOf('/') + 1)
const parentPath = val.path.slice(0, index)
const currentRoute = this.$router.options.routes.find(item => item.path === parentPath)
currentIcon = currentRoute.meta.icon
currentIcon = currentRoute.meta && currentRoute.meta.icon
icon = this.isActive(val) ? currentIcon+'Tags' : currentIcon+'Tag'
}
icon = (svgIcon && svgIcon != '#') || (currentIcon && svgIcon != '#') ? icon : this.isActive(val) ? 'defaultTags' : 'defaultTag'
......
......@@ -98,13 +98,13 @@ export const constantRoutes = [
path: 'party-a',
component: () => import('@/views/detail/party-a/index'),
name: 'PartyA',
meta: { title: '甲方详情', icon: 'custom' }
meta: { title: '甲方详情' }
},
{
path: 'party-b',
component: () => import('@/views/detail/party-b/index'),
name: 'PartyB',
meta: { title: '已方详情', icon: 'user' }
meta: { title: '已方详情' }
}
]
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment