修改table封装的border样式,解决路由与面包导航显示不一致
This commit is contained in:
parent
978f53ea43
commit
efc427d1e8
|
@ -9,6 +9,7 @@
|
|||
height: 48px;
|
||||
display: inline-flex;
|
||||
min-width: 100%;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.th-td {
|
||||
|
@ -42,7 +43,6 @@
|
|||
padding: 28px 0;
|
||||
color: rgba(0, 0, 0, .6);
|
||||
font-size: 12px;
|
||||
border-top: 1px solid #dfe1e6;
|
||||
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,9 @@
|
|||
border: none;
|
||||
|
||||
}
|
||||
|
||||
.th-body .tr:first-child .td{
|
||||
border-top: 0;
|
||||
}
|
||||
.td {
|
||||
display: flex;
|
||||
min-height: 40px;
|
||||
|
|
|
@ -18,6 +18,27 @@ export default class MouseMenu extends React.Component{
|
|||
closeMenuMask() {
|
||||
this.props.mouseLeaveFn();
|
||||
}
|
||||
//点击菜单
|
||||
clickMenuItem(e, it) {
|
||||
if (it.router == '/home/distributor-add') {
|
||||
sessionStorage.setItem('pathname2', '/home/system/distributor-add')
|
||||
let activerou = [{
|
||||
'pagetitle': '新建', items: [
|
||||
{
|
||||
"path": "distributor-list",
|
||||
"name": "分销商管理"
|
||||
},
|
||||
{
|
||||
"path": "distributor-add",
|
||||
"name": "新建分销商"
|
||||
}
|
||||
]
|
||||
}]
|
||||
sessionStorage.setItem('breaknav', JSON.stringify(activerou));
|
||||
|
||||
}
|
||||
this.props.mouseLeaveFn();
|
||||
}
|
||||
render() {
|
||||
let menuList = this.state.activeMenuList;//路由表
|
||||
const pathname = window.location.href.lastIndexOf('\/');
|
||||
|
@ -33,7 +54,7 @@ export default class MouseMenu extends React.Component{
|
|||
{
|
||||
item.children.map((childItem, childI) => {
|
||||
return (
|
||||
childItem.level==5?<Link key={childI} to={childItem.router} className={childItem.router.includes(pathnamestr)&&item.children.length>=1?'mouse_menuactive menu_items':'menu_items'} onClick={this.closeMenuMask.bind(this)}>{childItem.title}</Link>:null
|
||||
childItem.level == 5 ? <Link key={childI} to={childItem.router} className={childItem.router.includes(pathnamestr) && item.children.length >= 1 ? 'mouse_menuactive menu_items' : 'menu_items'} onClick={(e) => this.clickMenuItem(e, childItem)}>{childItem.title}</Link> : null
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -80,11 +80,11 @@ export default class topNav extends React.Component{
|
|||
let pathnameBreak=sessionStorage.getItem('pathname2')
|
||||
const pathname=window.location.href.lastIndexOf('\/');
|
||||
const pathnamestr=window.location.href.substr(pathname);
|
||||
let breakflag=pathnamestr.includes('add')||pathnamestr.includes('aid')||pathnamestr.includes('key-list')||pathnamestr.includes('key-detail')||pathnamestr.includes('key-edit')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit')||pathnamestr.includes('product-edit');
|
||||
let breakflag=pathnamestr.includes('add')||pathnamestr.includes('aid')||pathnamestr.includes('distributor-edit')||pathnamestr.includes('key-list')||pathnamestr.includes('key-detail')||pathnamestr.includes('key-edit')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit')||pathnamestr.includes('product-edit');
|
||||
let sedcbreakflag=pathnamestr.includes('plan-create');
|
||||
let planbreakflag = pathnamestr.includes('mytempMould')
|
||||
let editbreakflag = pathnamestr.includes('edittemplate')
|
||||
let backshow=pathnamestr.includes('account-add')||pathnamestr.includes('role-add')||pathnamestr.includes('subaccount-add')||pathnamestr.includes('distributor-add')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit')||pathnamestr.includes('key-list')||pathnamestr.includes('exchange-addcommodity');
|
||||
let backshow=pathnamestr.includes('account-add')||pathnamestr.includes('role-add')||pathnamestr.includes('subaccount-add')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit')||pathnamestr.includes('key-list')||pathnamestr.includes('exchange-addcommodity');
|
||||
let breakchange = pathnamestr.includes('exchangecode-add')|| pathnamestr.includes('key-edit')||pathnamestr.includes('key-detail')||pathnamestr.includes('product-edit')||pathnamestr.includes('plan-edit');
|
||||
if(breakchange){
|
||||
breaknav=JSON.parse(sessionStorage.getItem('breakchangenav'))
|
||||
|
|
Loading…
Reference in New Issue