Commit 233b4fb7 authored by qixian.cs@outlook.com's avatar qixian.cs@outlook.com

fix meun border style

parent 81d47bc2
import { getMenuMatches } from './BaseMenu';
const menu = ['/dashboard', '/userinfo', '/dashboard/name', '/userinfo/:id', '/userinfo/:id/info'];
describe('test menu match', () => {
it('simple path', () => {
expect(getMenuMatches(menu, '/dashboard')).toEqual(['/dashboard']);
});
it('error path', () => {
expect(getMenuMatches(menu, '/dashboardname')).toEqual([]);
});
it('Secondary path', () => {
expect(getMenuMatches(menu, '/dashboard/name')).toEqual(['/dashboard/name']);
});
it('Parameter path', () => {
expect(getMenuMatches(menu, '/userinfo/2144')).toEqual(['/userinfo/:id']);
});
it('three parameter path', () => {
expect(getMenuMatches(menu, '/userinfo/2144/info')).toEqual(['/userinfo/:id/info']);
});
});
import { urlToList } from '../_utils/pathTools'; import { urlToList } from '../_utils/pathTools';
import { getFlatMenuKeys, getMenuMatchKeys } from './SiderMenu'; import { getFlatMenuKeys, getMenuMatchKeys } from './SliderMenu';
const menu = [ const menu = [
{ {
......
import 'rc-drawer/assets/index.css'; import 'rc-drawer/assets/index.css';
import React from 'react'; import React from 'react';
import DrawerMenu from 'rc-drawer'; import DrawerMenu from 'rc-drawer';
import SiderMenu from './SiderMenu'; import SiderMenu from './SliderMenu';
/** /**
* Recursively flatten the data * Recursively flatten the data
......
...@@ -16,7 +16,7 @@ export default class TopNavHeader extends PureComponent { ...@@ -16,7 +16,7 @@ export default class TopNavHeader extends PureComponent {
<h1>Ant Design Pro</h1> <h1>Ant Design Pro</h1>
</Link> </Link>
</div> </div>
<BaseMenu {...this.props} style={{ padding: '9px 0', border: 'none' }} /> <BaseMenu {...this.props} style={{ paddingTop: '9px', border: 'none' }} />
</div> </div>
<div className={styles.right}> <div className={styles.right}>
<RightContent {...this.props} /> <RightContent {...this.props} />
......
...@@ -5,6 +5,14 @@ ...@@ -5,6 +5,14 @@
padding: 0 12px 0 0; padding: 0 12px 0 0;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08); box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
position: relative; position: relative;
:global {
.ant-menu-submenu.ant-menu-submenu-horizontal {
height: 100%;
.ant-menu-submenu-title {
height: 100%;
}
}
}
&.light { &.light {
background-color: #fff; background-color: #fff;
} }
......
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