diff --git a/src/components/SiderMenu/SiderMenu.test.js b/src/components/SiderMenu/SiderMenu.test.js deleted file mode 100644 index 04b5b38485512dda8cce463db522b0234f19df64..0000000000000000000000000000000000000000 --- a/src/components/SiderMenu/SiderMenu.test.js +++ /dev/null @@ -1,24 +0,0 @@ -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']); - }); -}); diff --git a/src/components/SiderMenu/SiderMenu.js b/src/components/SiderMenu/SliderMenu.js similarity index 100% rename from src/components/SiderMenu/SiderMenu.js rename to src/components/SiderMenu/SliderMenu.js diff --git a/src/components/SiderMenu/SilderMenu.test.js b/src/components/SiderMenu/SliderMenu.test.js similarity index 95% rename from src/components/SiderMenu/SilderMenu.test.js rename to src/components/SiderMenu/SliderMenu.test.js index 8f01f6695e45f4a8e6a808434666880944c00019..b46b7cfa72bc165b2c1e8522ead28c13ebf113ae 100644 --- a/src/components/SiderMenu/SilderMenu.test.js +++ b/src/components/SiderMenu/SliderMenu.test.js @@ -1,5 +1,5 @@ import { urlToList } from '../_utils/pathTools'; -import { getFlatMenuKeys, getMenuMatchKeys } from './SiderMenu'; +import { getFlatMenuKeys, getMenuMatchKeys } from './SliderMenu'; const menu = [ { diff --git a/src/components/SiderMenu/index.js b/src/components/SiderMenu/index.js index 2c77fd849362cfa58f919ee2cff9d7eaa63aa9b0..d942591c9111014db9a80fec5645b4d6bc1c3178 100644 --- a/src/components/SiderMenu/index.js +++ b/src/components/SiderMenu/index.js @@ -1,7 +1,7 @@ import 'rc-drawer/assets/index.css'; import React from 'react'; import DrawerMenu from 'rc-drawer'; -import SiderMenu from './SiderMenu'; +import SiderMenu from './SliderMenu'; /** * Recursively flatten the data diff --git a/src/components/TopNavHeader/index.js b/src/components/TopNavHeader/index.js index b64838645b008963fd924dd54b697bff7e477a1b..1ca29ba38e8f1311298e815feaf799bfbabca805 100644 --- a/src/components/TopNavHeader/index.js +++ b/src/components/TopNavHeader/index.js @@ -16,7 +16,7 @@ export default class TopNavHeader extends PureComponent {

Ant Design Pro

- +
diff --git a/src/components/TopNavHeader/index.less b/src/components/TopNavHeader/index.less index 681c6ef79f17dfc19b35fcbc38f415c11fa11e34..44132fe80768f353f55eadd084622e7d5f71eb1c 100644 --- a/src/components/TopNavHeader/index.less +++ b/src/components/TopNavHeader/index.less @@ -5,6 +5,14 @@ padding: 0 12px 0 0; box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08); position: relative; + :global { + .ant-menu-submenu.ant-menu-submenu-horizontal { + height: 100%; + .ant-menu-submenu-title { + height: 100%; + } + } + } &.light { background-color: #fff; }