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
d1308e4a
Commit
d1308e4a
authored
Sep 01, 2018
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor code
parent
4037a8f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
27 deletions
+10
-27
src/components/SettingDrawer/index.js
src/components/SettingDrawer/index.js
+10
-27
No files found.
src/components/SettingDrawer/index.js
View file @
d1308e4a
...
@@ -84,16 +84,9 @@ class SettingDrawer extends PureComponent {
...
@@ -84,16 +84,9 @@ class SettingDrawer extends PureComponent {
const
nextState
=
{
...
setting
};
const
nextState
=
{
...
setting
};
nextState
[
key
]
=
value
;
nextState
[
key
]
=
value
;
if
(
key
===
'
layout
'
)
{
if
(
key
===
'
layout
'
)
{
if
(
value
===
'
topmenu
'
)
{
nextState
.
grid
=
value
===
'
topmenu
'
?
'
Wide
'
:
'
Fluid
'
;
nextState
.
grid
=
'
Wide
'
;
}
else
if
(
key
===
'
fixedHeader
'
&&
!
value
)
{
}
else
{
nextState
.
autoHideHeader
=
false
;
nextState
.
grid
=
'
Fluid
'
;
}
}
if
(
key
===
'
fixedHeader
'
)
{
if
(
!
value
)
{
nextState
.
autoHideHeader
=
false
;
}
}
}
this
.
setState
(
nextState
,
()
=>
{
this
.
setState
(
nextState
,
()
=>
{
const
{
dispatch
}
=
this
.
props
;
const
{
dispatch
}
=
this
.
props
;
...
@@ -120,23 +113,13 @@ class SettingDrawer extends PureComponent {
...
@@ -120,23 +113,13 @@ class SettingDrawer extends PureComponent {
placement
=
"
right
"
placement
=
"
right
"
handler
=
{
handler
=
{
<
div
className
=
{
styles
.
handle
}
>
<
div
className
=
{
styles
.
handle
}
>
{
!
collapse
?
(
<
Icon
<
Icon
type
=
{
collapse
?
'
close
'
:
'
setting
'
}
type
=
"
setting
"
style
=
{{
style
=
{{
color
:
'
#fff
'
,
color
:
'
#FFF
'
,
fontSize
:
20
,
fontSize
:
20
,
}}
}}
/
>
/
>
)
:
(
<
Icon
type
=
"
close
"
style
=
{{
color
:
'
#FFF
'
,
fontSize
:
20
,
}}
/
>
)}
<
/div
>
<
/div
>
}
}
onHandleClick
=
{
this
.
togglerContent
}
onHandleClick
=
{
this
.
togglerContent
}
...
...
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