修复1.2 新版本的导航栏Tab有错 #14

This commit is contained in:
daxiongYang 2018-05-03 11:17:03 +08:00
parent d53a4b422a
commit 48a7208932
3 changed files with 6 additions and 5 deletions

View File

@ -96,7 +96,7 @@ img {
margin-right: 0;
font-size: 20px;
}
.site-content--tabs > .el-tabs .el-tabs__header {
.site-content--tabs > .el-tabs > .el-tabs__header {
left: 64px;
}
}

View File

@ -114,10 +114,11 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
if (menuList[i].list && menuList[i].list.length >= 1) {
temp = temp.concat(menuList[i].list)
} else if (/\S/.test(menuList[i].url)) {
menuList[i].url = menuList[i].url.replace(/^\//, '')
var route = {
path: menuList[i].url.replace(/^\//, '').replace('/', '-'),
path: menuList[i].url.replace('/', '-'),
component: null,
name: menuList[i].url.replace(/^\//, '').replace('/', '-'),
name: menuList[i].url.replace('/', '-'),
meta: {
menuId: menuList[i].menuId,
title: menuList[i].name,

View File

@ -69,8 +69,8 @@
}).then(({data}) => {
if (data && data.code === 0) {
this.loading = false
this.userId = data.user.userId
this.userName = data.user.username
this.userId = data.user.userId || ''
this.userName = data.user.username || ''
}
})
}