Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
ant-design-pro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
duanledexianxianxian
ant-design-pro
Commits
233b4fb7
Commit
233b4fb7
authored
Jun 07, 2018
by
qixian.cs@outlook.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix meun border style
parent
81d47bc2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
27 deletions
+11
-27
src/components/SiderMenu/SiderMenu.test.js
src/components/SiderMenu/SiderMenu.test.js
+0
-24
src/components/SiderMenu/SliderMenu.js
src/components/SiderMenu/SliderMenu.js
+0
-0
src/components/SiderMenu/SliderMenu.test.js
src/components/SiderMenu/SliderMenu.test.js
+1
-1
src/components/SiderMenu/index.js
src/components/SiderMenu/index.js
+1
-1
src/components/TopNavHeader/index.js
src/components/TopNavHeader/index.js
+1
-1
src/components/TopNavHeader/index.less
src/components/TopNavHeader/index.less
+8
-0
No files found.
src/components/SiderMenu/SiderMenu.test.js
deleted
100644 β 0
View file @
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
'
]);
});
});
src/components/SiderMenu/SiderMenu.js
→
src/components/SiderMenu/S
l
iderMenu.js
View file @
233b4fb7
File moved
src/components/SiderMenu/S
il
derMenu.test.js
→
src/components/SiderMenu/S
li
derMenu.test.js
View file @
233b4fb7
import
{
urlToList
}
from
'
../_utils/pathTools
'
;
import
{
getFlatMenuKeys
,
getMenuMatchKeys
}
from
'
./SiderMenu
'
;
import
{
getFlatMenuKeys
,
getMenuMatchKeys
}
from
'
./S
l
iderMenu
'
;
const
menu
=
[
{
...
...
src/components/SiderMenu/index.js
View file @
233b4fb7
import
'
rc-drawer/assets/index.css
'
;
import
React
from
'
react
'
;
import
DrawerMenu
from
'
rc-drawer
'
;
import
SiderMenu
from
'
./SiderMenu
'
;
import
SiderMenu
from
'
./S
l
iderMenu
'
;
/**
* Recursively flatten the data
...
...
src/components/TopNavHeader/index.js
View file @
233b4fb7
...
...
@@ -16,7 +16,7 @@ export default class TopNavHeader extends PureComponent {
<
h1
>
Ant
Design
Pro
<
/h1
>
<
/Link
>
<
/div
>
<
BaseMenu
{...
this
.
props
}
style
=
{{
padding
:
'
9px 0
'
,
border
:
'
none
'
}}
/
>
<
BaseMenu
{...
this
.
props
}
style
=
{{
padding
Top
:
'
9px
'
,
border
:
'
none
'
}}
/
>
<
/div
>
<
div
className
=
{
styles
.
right
}
>
<
RightContent
{...
this
.
props
}
/
>
...
...
src/components/TopNavHeader/index.less
View file @
233b4fb7
...
...
@@ -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;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment