Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
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
3e127cc8
Commit
3e127cc8
authored
7 years ago
by
jim
Committed by
ιεΈ
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix fixSiderbar
parent
28b07b81
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
23 additions
and
30 deletions
+23
-30
package.json
package.json
+9
-9
src/components/Sidebar/ThemeColor.less
src/components/Sidebar/ThemeColor.less
+1
-0
src/components/Sidebar/index.js
src/components/Sidebar/index.js
+1
-1
src/components/Sidebar/index.less
src/components/Sidebar/index.less
+1
-0
src/components/SiderMenu/SiderMenu.js
src/components/SiderMenu/SiderMenu.js
+4
-2
src/components/SiderMenu/index.js
src/components/SiderMenu/index.js
+1
-1
src/components/TopNavHeader/index.js
src/components/TopNavHeader/index.js
+3
-14
src/components/TopNavHeader/index.less
src/components/TopNavHeader/index.less
+2
-2
src/models/setting.js
src/models/setting.js
+1
-1
No files found.
package.json
View file @
3e127cc8
...
@@ -31,11 +31,11 @@
...
@@ -31,11 +31,11 @@
"
bizcharts-plugin-slider
"
:
"
^2.0.3
"
,
"
bizcharts-plugin-slider
"
:
"
^2.0.3
"
,
"
classnames
"
:
"
^2.2.5
"
,
"
classnames
"
:
"
^2.2.5
"
,
"
dva
"
:
"
^2.2.3
"
,
"
dva
"
:
"
^2.2.3
"
,
"
dva-loading
"
:
"
^
1.0.4
"
,
"
dva-loading
"
:
"
^
2.0.1
"
,
"
enquire-js
"
:
"
^0.2.1
"
,
"
enquire-js
"
:
"
^0.2.1
"
,
"
less
"
:
"
2.7
.2
"
,
"
less
"
:
"
3.0
.2
"
,
"
lodash
"
:
"
^4.17.4
"
,
"
lodash
"
:
"
^4.17.4
"
,
"
lodash-decorators
"
:
"
^
4.4.1
"
,
"
lodash-decorators
"
:
"
^
5.0.0
"
,
"
moment
"
:
"
^2.22.0
"
,
"
moment
"
:
"
^2.22.0
"
,
"
numeral
"
:
"
^2.0.6
"
,
"
numeral
"
:
"
^2.0.6
"
,
"
omit.js
"
:
"
^1.0.0
"
,
"
omit.js
"
:
"
^1.0.0
"
,
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
"
qs
"
:
"
^6.5.0
"
,
"
qs
"
:
"
^6.5.0
"
,
"
rc-drawer-menu
"
:
"
^0.5.0
"
,
"
rc-drawer-menu
"
:
"
^0.5.0
"
,
"
react
"
:
"
^16.3.1
"
,
"
react
"
:
"
^16.3.1
"
,
"
react-container-query
"
:
"
^0.
9.1
"
,
"
react-container-query
"
:
"
^0.
11.0
"
,
"
react-document-title
"
:
"
^2.0.3
"
,
"
react-document-title
"
:
"
^2.0.3
"
,
"
react-dom
"
:
"
^16.3.1
"
,
"
react-dom
"
:
"
^16.3.1
"
,
"
react-fittext
"
:
"
^1.0.0
"
,
"
react-fittext
"
:
"
^1.0.0
"
,
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
"
eslint
"
:
"
^4.14.0
"
,
"
eslint
"
:
"
^4.14.0
"
,
"
eslint-config-airbnb
"
:
"
^16.0.0
"
,
"
eslint-config-airbnb
"
:
"
^16.0.0
"
,
"
eslint-config-prettier
"
:
"
^2.9.0
"
,
"
eslint-config-prettier
"
:
"
^2.9.0
"
,
"
eslint-plugin-babel
"
:
"
^
4.0
.0
"
,
"
eslint-plugin-babel
"
:
"
^
5.1
.0
"
,
"
eslint-plugin-compat
"
:
"
^2.1.0
"
,
"
eslint-plugin-compat
"
:
"
^2.1.0
"
,
"
eslint-plugin-import
"
:
"
^2.8.0
"
,
"
eslint-plugin-import
"
:
"
^2.8.0
"
,
"
eslint-plugin-jsx-a11y
"
:
"
^6.0.3
"
,
"
eslint-plugin-jsx-a11y
"
:
"
^6.0.3
"
,
...
@@ -72,15 +72,15 @@
...
@@ -72,15 +72,15 @@
"
eslint-plugin-react
"
:
"
^7.0.1
"
,
"
eslint-plugin-react
"
:
"
^7.0.1
"
,
"
gh-pages
"
:
"
^1.0.0
"
,
"
gh-pages
"
:
"
^1.0.0
"
,
"
husky
"
:
"
^0.14.3
"
,
"
husky
"
:
"
^0.14.3
"
,
"
lint-staged
"
:
"
^
6.0.0
"
,
"
lint-staged
"
:
"
^
7.0.5
"
,
"
mockjs
"
:
"
^1.0.1-beta3
"
,
"
mockjs
"
:
"
^1.0.1-beta3
"
,
"
prettier
"
:
"
1.1
1
.1
"
,
"
prettier
"
:
"
1.1
2
.1
"
,
"
pro-download
"
:
"
^1.0.1
"
,
"
pro-download
"
:
"
^1.0.1
"
,
"
redbox-react
"
:
"
^1.5.0
"
,
"
redbox-react
"
:
"
^1.5.0
"
,
"
regenerator-runtime
"
:
"
^0.11.1
"
,
"
regenerator-runtime
"
:
"
^0.11.1
"
,
"
roadhog
"
:
"
^2.3.0
"
,
"
roadhog
"
:
"
^2.3.0
"
,
"
roadhog-api-doc
"
:
"
^1.0.2
"
,
"
roadhog-api-doc
"
:
"
^1.0.2
"
,
"
stylelint
"
:
"
^
8.4
.0
"
,
"
stylelint
"
:
"
^
9.2
.0
"
,
"
stylelint-config-prettier
"
:
"
^3.0.4
"
,
"
stylelint-config-prettier
"
:
"
^3.0.4
"
,
"
stylelint-config-standard
"
:
"
^18.0.0
"
"
stylelint-config-standard
"
:
"
^18.0.0
"
},
},
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
"prettier --wirter"
,
"prettier --wirter"
,
"git add"
"git add"
],
],
"**/*.{js,jsx}"
:
"lint-staged:js"
,
"**/*.{js,jsx}"
:
"
npm run
lint-staged:js"
,
"**/*.less"
:
"stylelint --syntax less"
"**/*.less"
:
"stylelint --syntax less"
},
},
"engines"
:
{
"engines"
:
{
...
...
This diff is collapsed.
Click to expand it.
src/components/Sidebar/ThemeColor.less
View file @
3e127cc8
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
height: 16px;
height: 16px;
border-radius: 2px;
border-radius: 2px;
float: left;
float: left;
cursor: pointer;
margin: 5px;
margin: 5px;
&.active {
&.active {
width: 18px;
width: 18px;
...
...
This diff is collapsed.
Click to expand it.
src/components/Sidebar/index.js
View file @
3e127cc8
...
@@ -156,7 +156,7 @@ class Sidebar extends PureComponent {
...
@@ -156,7 +156,7 @@ class Sidebar extends PureComponent {
<
Radio
style
=
{
radioStyle
}
value
=
"
dark
"
>
<
Radio
style
=
{
radioStyle
}
value
=
"
dark
"
>
<
ColorBlock
color
=
"
#002140
"
title
=
"
ζ·±θ²ε―Όθͺ
"
/>
<
ColorBlock
color
=
"
#002140
"
title
=
"
ζ·±θ²ε―Όθͺ
"
/>
<
/Radio
>
<
/Radio
>
<
Radio
style
=
{
radioStyle
}
value
=
"
lig
th
"
>
<
Radio
style
=
{
radioStyle
}
value
=
"
lig
ht
"
>
<
ColorBlock
color
=
"
#E9E9E9
"
title
=
"
ζ΅ θ²ε―Όθͺ
"
/>
<
ColorBlock
color
=
"
#E9E9E9
"
title
=
"
ζ΅ θ²ε―Όθͺ
"
/>
<
/Radio
>
<
/Radio
>
<
/RadioGroup
>
<
/RadioGroup
>
...
...
This diff is collapsed.
Click to expand it.
src/components/Sidebar/index.less
View file @
3e127cc8
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
width: 38px;
width: 38px;
height: 22px;
height: 22px;
margin: 4px;
margin: 4px;
cursor: pointer;
margin-right: 12px;
margin-right: 12px;
display: inline-block;
display: inline-block;
vertical-align: middle;
vertical-align: middle;
...
...
This diff is collapsed.
Click to expand it.
src/components/SiderMenu/SiderMenu.js
View file @
3e127cc8
...
@@ -13,7 +13,9 @@ const { SubMenu } = Menu;
...
@@ -13,7 +13,9 @@ const { SubMenu } = Menu;
* @memberof SiderMenu
* @memberof SiderMenu
*/
*/
const
getDefaultCollapsedSubMenus
=
props
=>
{
const
getDefaultCollapsedSubMenus
=
props
=>
{
const
{
location
:
{
pathname
}
}
=
props
;
const
{
location
:
{
pathname
},
}
=
props
;
return
urlToList
(
pathname
)
return
urlToList
(
pathname
)
.
map
(
item
=>
{
.
map
(
item
=>
{
return
getMenuMatches
(
props
.
flatMenuKeys
,
item
)[
0
];
return
getMenuMatches
(
props
.
flatMenuKeys
,
item
)[
0
];
...
@@ -140,7 +142,7 @@ export default class SiderMenu extends PureComponent {
...
@@ -140,7 +142,7 @@ export default class SiderMenu extends PureComponent {
breakpoint
=
"
lg
"
breakpoint
=
"
lg
"
onCollapse
=
{
onCollapse
}
onCollapse
=
{
onCollapse
}
width
=
{
256
}
width
=
{
256
}
className
=
{
`
${
styles
.
sider
}
${
theme
===
'
lig
th
'
?
styles
.
ligth
:
''
}
`
}
className
=
{
`
${
styles
.
sider
}
${
theme
===
'
lig
ht
'
?
styles
.
light
:
''
}
`
}
>
>
<
div
className
=
{
styles
.
logo
}
key
=
"
logo
"
>
<
div
className
=
{
styles
.
logo
}
key
=
"
logo
"
>
<
Link
to
=
"
/
"
>
<
Link
to
=
"
/
"
>
...
...
This diff is collapsed.
Click to expand it.
src/components/SiderMenu/index.js
View file @
3e127cc8
...
@@ -20,7 +20,7 @@ const getFlatMenuKeys = menuData => {
...
@@ -20,7 +20,7 @@ const getFlatMenuKeys = menuData => {
};
};
const
SiderMenuWrapper
=
props
=>
const
SiderMenuWrapper
=
props
=>
props
.
isMobile
?
(
props
.
isMobile
||
props
.
fixSiderbar
?
(
<
DrawerMenu
<
DrawerMenu
parent
=
{
null
}
parent
=
{
null
}
level
=
{
null
}
level
=
{
null
}
...
...
This diff is collapsed.
Click to expand it.
src/components/TopNavHeader/index.js
View file @
3e127cc8
...
@@ -7,16 +7,8 @@ import styles from './index.less';
...
@@ -7,16 +7,8 @@ import styles from './index.less';
export
default
class
TopNavHeader
extends
PureComponent
{
export
default
class
TopNavHeader
extends
PureComponent
{
render
()
{
render
()
{
return
(
return
(
<
div
<
div
className
=
{
`
${
styles
.
head
}
${
this
.
props
.
theme
===
'
light
'
?
styles
.
light
:
''
}
`
}
>
className
=
{
`
${
styles
.
head
}
${
<
div
className
=
{
`
${
styles
.
main
}
${
this
.
props
.
grid
===
'
Wide
'
?
styles
.
wide
:
''
}
`
}
>
this
.
props
.
theme
===
'
ligth
'
?
styles
.
ligth
:
''
}
`
}
>
<
div
className
=
{
`
${
styles
.
main
}
${
this
.
props
.
grid
===
'
Wide
'
?
styles
.
wide
:
''
}
`
}
>
<
div
className
=
{
styles
.
left
}
>
<
div
className
=
{
styles
.
left
}
>
<
div
className
=
{
styles
.
logo
}
key
=
"
logo
"
>
<
div
className
=
{
styles
.
logo
}
key
=
"
logo
"
>
<
Link
to
=
"
/
"
>
<
Link
to
=
"
/
"
>
...
@@ -24,10 +16,7 @@ export default class TopNavHeader extends PureComponent {
...
@@ -24,10 +16,7 @@ export default class TopNavHeader extends PureComponent {
<
h1
>
Ant
Design
Pro
<
/h1
>
<
h1
>
Ant
Design
Pro
<
/h1
>
<
/Link
>
<
/Link
>
<
/div
>
<
/div
>
<
BaseMenu
<
BaseMenu
{...
this
.
props
}
style
=
{{
padding
:
'
9px 0
'
,
border
:
'
none
'
}}
/
>
{...
this
.
props
}
style
=
{{
padding
:
'
9px 0
'
,
border
:
'
none
'
}}
/
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
right
}
>
<
div
className
=
{
styles
.
right
}
>
<
RightContent
{...
this
.
props
}
/
>
<
RightContent
{...
this
.
props
}
/
>
...
...
This diff is collapsed.
Click to expand it.
src/components/TopNavHeader/index.less
View file @
3e127cc8
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
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;
&.lig
th
{
&.lig
ht
{
background-color: #fff;
background-color: #fff;
}
}
.main {
.main {
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
}
}
}
}
.lig
th
{
.lig
ht
{
h1 {
h1 {
color: #002140;
color: #002140;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/models/setting.js
View file @
3e127cc8
...
@@ -20,7 +20,7 @@ export default {
...
@@ -20,7 +20,7 @@ export default {
Object
.
keys
(
state
).
forEach
(
key
=>
{
Object
.
keys
(
state
).
forEach
(
key
=>
{
if
(
urlParams
.
searchParams
.
has
(
key
))
{
if
(
urlParams
.
searchParams
.
has
(
key
))
{
const
value
=
urlParams
.
searchParams
.
get
(
key
);
const
value
=
urlParams
.
searchParams
.
get
(
key
);
setting
[
key
]
=
value
;
setting
[
key
]
=
value
===
'
1
'
?
true
:
'
1
'
;
}
}
});
});
return
setting
;
return
setting
;
...
...
This diff is collapsed.
Click to expand it.
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