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
c59842ca
Commit
c59842ca
authored
Sep 01, 2018
by
afc163
Committed by
陈帅
Sep 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make setting names easy to understand
parent
ef3653a8
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
24 deletions
+24
-24
src/components/PageHeaderWrapper/GridContent.js
src/components/PageHeaderWrapper/GridContent.js
+1
-1
src/components/PageHeaderWrapper/index.js
src/components/PageHeaderWrapper/index.js
+1
-1
src/components/SettingDrawer/index.js
src/components/SettingDrawer/index.js
+5
-4
src/components/TopNavHeader/index.js
src/components/TopNavHeader/index.js
+3
-3
src/defaultSettings.js
src/defaultSettings.js
+7
-8
src/locales/en-US.js
src/locales/en-US.js
+3
-3
src/locales/zh-CN.js
src/locales/zh-CN.js
+4
-4
No files found.
src/components/PageHeaderWrapper/GridContent.js
View file @
c59842ca
...
@@ -6,7 +6,7 @@ class GridContent extends PureComponent {
...
@@ -6,7 +6,7 @@ class GridContent extends PureComponent {
render
()
{
render
()
{
const
{
grid
,
children
}
=
this
.
props
;
const
{
grid
,
children
}
=
this
.
props
;
let
className
=
`
${
styles
.
main
}
`
;
let
className
=
`
${
styles
.
main
}
`
;
if
(
grid
===
'
Wide
'
)
{
if
(
grid
===
'
Fixed
'
)
{
className
=
`
${
styles
.
main
}
${
styles
.
wide
}
`
;
className
=
`
${
styles
.
main
}
${
styles
.
wide
}
`
;
}
}
return
<
div
className
=
{
className
}
>
{
children
}
<
/div>
;
return
<
div
className
=
{
className
}
>
{
children
}
<
/div>
;
...
...
src/components/PageHeaderWrapper/index.js
View file @
c59842ca
...
@@ -13,7 +13,7 @@ const PageHeaderWrapper = ({ children, grid, wrapperClassName, top, ...restProps
...
@@ -13,7 +13,7 @@ const PageHeaderWrapper = ({ children, grid, wrapperClassName, top, ...restProps
<
MenuContext
.
Consumer
>
<
MenuContext
.
Consumer
>
{
value
=>
(
{
value
=>
(
<
PageHeader
<
PageHeader
wide
=
{
grid
===
'
Wide
'
}
wide
=
{
grid
===
'
Fixed
'
}
home
=
{
<
FormattedMessage
id
=
"
menu.home
"
defaultMessage
=
"
Home
"
/>
}
home
=
{
<
FormattedMessage
id
=
"
menu.home
"
defaultMessage
=
"
Home
"
/>
}
{...
value
}
{...
value
}
key
=
"
pageheader
"
key
=
"
pageheader
"
...
...
src/components/SettingDrawer/index.js
View file @
c59842ca
...
@@ -3,6 +3,7 @@ import { Select, message, Drawer, List, Switch, Divider, Icon, Button, Alert } f
...
@@ -3,6 +3,7 @@ import { Select, message, Drawer, List, Switch, Divider, Icon, Button, Alert } f
import
{
formatMessage
}
from
'
umi/locale
'
;
import
{
formatMessage
}
from
'
umi/locale
'
;
import
{
CopyToClipboard
}
from
'
react-copy-to-clipboard
'
;
import
{
CopyToClipboard
}
from
'
react-copy-to-clipboard
'
;
import
{
connect
}
from
'
dva
'
;
import
{
connect
}
from
'
dva
'
;
import
omit
from
'
omit.js
'
;
import
styles
from
'
./index.less
'
;
import
styles
from
'
./index.less
'
;
import
ThemeColor
from
'
./ThemeColor
'
;
import
ThemeColor
from
'
./ThemeColor
'
;
import
BlockChecbox
from
'
./BlockChecbox
'
;
import
BlockChecbox
from
'
./BlockChecbox
'
;
...
@@ -39,8 +40,8 @@ class SettingDrawer extends PureComponent {
...
@@ -39,8 +40,8 @@ class SettingDrawer extends PureComponent {
onSelect
=
{
value
=>
this
.
changeSetting
(
'
grid
'
,
value
)}
onSelect
=
{
value
=>
this
.
changeSetting
(
'
grid
'
,
value
)}
style
=
{{
width
:
80
}}
style
=
{{
width
:
80
}}
>
>
<
Select
.
Option
value
=
"
Wide
"
>
<
Select
.
Option
value
=
"
Fixed
"
>
{
formatMessage
({
id
:
'
app.setting.gridmode.
wide
'
})}
{
formatMessage
({
id
:
'
app.setting.gridmode.
fixed
'
})}
<
/Select.Option
>
<
/Select.Option
>
<
Select
.
Option
value
=
"
Fluid
"
>
<
Select
.
Option
value
=
"
Fluid
"
>
{
formatMessage
({
id
:
'
app.setting.gridmode.fluid
'
})}
{
formatMessage
({
id
:
'
app.setting.gridmode.fluid
'
})}
...
@@ -88,7 +89,7 @@ class SettingDrawer extends PureComponent {
...
@@ -88,7 +89,7 @@ class SettingDrawer extends PureComponent {
const
nextState
=
{
...
setting
};
const
nextState
=
{
...
setting
};
nextState
[
key
]
=
value
;
nextState
[
key
]
=
value
;
if
(
key
===
'
layout
'
)
{
if
(
key
===
'
layout
'
)
{
nextState
.
grid
=
value
===
'
topmenu
'
?
'
Wide
'
:
'
Fluid
'
;
nextState
.
grid
=
value
===
'
topmenu
'
?
'
Fixed
'
:
'
Fluid
'
;
}
else
if
(
key
===
'
fixedHeader
'
&&
!
value
)
{
}
else
if
(
key
===
'
fixedHeader
'
&&
!
value
)
{
nextState
.
autoHideHeader
=
false
;
nextState
.
autoHideHeader
=
false
;
}
}
...
@@ -198,7 +199,7 @@ class SettingDrawer extends PureComponent {
...
@@ -198,7 +199,7 @@ class SettingDrawer extends PureComponent {
<
/Body
>
<
/Body
>
<
Divider
/>
<
Divider
/>
<
CopyToClipboard
<
CopyToClipboard
text
=
{
JSON
.
stringify
(
setting
)}
text
=
{
JSON
.
stringify
(
omit
(
setting
,
[
'
colorWeak
'
]),
null
,
2
)}
onCopy
=
{()
=>
message
.
success
(
formatMessage
({
id
:
'
app.setting.copyinfo
'
}))}
onCopy
=
{()
=>
message
.
success
(
formatMessage
({
id
:
'
app.setting.copyinfo
'
}))}
>
>
<
Button
block
icon
=
"
copy
"
>
<
Button
block
icon
=
"
copy
"
>
...
...
src/components/TopNavHeader/index.js
View file @
c59842ca
...
@@ -9,13 +9,13 @@ export default class TopNavHeader extends PureComponent {
...
@@ -9,13 +9,13 @@ export default class TopNavHeader extends PureComponent {
super
(
props
);
super
(
props
);
this
.
state
=
{
this
.
state
=
{
maxWidth
:
(
props
.
grid
===
'
Wide
'
?
1200
:
window
.
innerWidth
)
-
324
-
165
-
4
,
maxWidth
:
(
props
.
grid
===
'
Fixed
'
?
1200
:
window
.
innerWidth
)
-
324
-
165
-
4
,
};
};
}
}
static
getDerivedStateFromProps
(
props
)
{
static
getDerivedStateFromProps
(
props
)
{
return
{
return
{
maxWidth
:
(
props
.
grid
===
'
Wide
'
?
1200
:
window
.
innerWidth
)
-
324
-
165
-
4
,
maxWidth
:
(
props
.
grid
===
'
Fixed
'
?
1200
:
window
.
innerWidth
)
-
324
-
165
-
4
,
};
};
}
}
...
@@ -28,7 +28,7 @@ export default class TopNavHeader extends PureComponent {
...
@@ -28,7 +28,7 @@ export default class TopNavHeader extends PureComponent {
ref
=
{
ref
=>
{
ref
=
{
ref
=>
{
this
.
maim
=
ref
;
this
.
maim
=
ref
;
}}
}}
className
=
{
`
${
styles
.
main
}
${
grid
===
'
Wide
'
?
styles
.
wide
:
''
}
`
}
className
=
{
`
${
styles
.
main
}
${
grid
===
'
Fixed
'
?
styles
.
wide
:
''
}
`
}
>
>
<
div
className
=
{
styles
.
left
}
>
<
div
className
=
{
styles
.
left
}
>
<
div
className
=
{
styles
.
logo
}
key
=
"
logo
"
id
=
"
logo
"
>
<
div
className
=
{
styles
.
logo
}
key
=
"
logo
"
id
=
"
logo
"
>
...
...
src/defaultSettings.js
View file @
c59842ca
module
.
exports
=
{
module
.
exports
=
{
navTheme
:
'
dark
'
,
navTheme
:
'
dark
'
,
// theme for nav menu
primaryColor
:
'
#1890FF
'
,
primaryColor
:
'
#1890FF
'
,
// primary color of ant design
layout
:
'
sidemenu
'
,
layout
:
'
sidemenu
'
,
// nav menu position: sidemenu or topmenu
grid
:
'
Fluid
'
,
contentWidth
:
'
Fluid
'
,
// layout of content: Fluid or Fixed, only works when layout is topmenu
fixedHeader
:
false
,
fixedHeader
:
false
,
// sticky header
autoHideHeader
:
false
,
autoHideHeader
:
false
,
// auto hide header
fixSiderbar
:
false
,
fixSiderbar
:
false
,
// sticky siderbar
colorWeak
:
false
,
};
};
src/locales/en-US.js
View file @
c59842ca
...
@@ -156,9 +156,9 @@ export default {
...
@@ -156,9 +156,9 @@ export default {
'
app.result.success.btn-project
'
:
'
View project
'
,
'
app.result.success.btn-project
'
:
'
View project
'
,
'
app.result.success.btn-print
'
:
'
Print
'
,
'
app.result.success.btn-print
'
:
'
Print
'
,
'
app.setting.pagestyle
'
:
'
Page style setting
'
,
'
app.setting.pagestyle
'
:
'
Page style setting
'
,
'
app.setting.
gridmode
'
:
'
Grid Mode
'
,
'
app.setting.
content-width
'
:
'
Content Width
'
,
'
app.setting.
gridmode.wide
'
:
'
Wide
'
,
'
app.setting.
content-width.fixed
'
:
'
Fixed
'
,
'
app.setting.
gridmode
.fluid
'
:
'
Fluid
'
,
'
app.setting.
content-width
.fluid
'
:
'
Fluid
'
,
'
app.setting.themecolor
'
:
'
Theme Color
'
,
'
app.setting.themecolor
'
:
'
Theme Color
'
,
'
app.setting.navigationmode
'
:
'
Navigation Mode
'
,
'
app.setting.navigationmode
'
:
'
Navigation Mode
'
,
'
app.setting.fixedheader
'
:
'
Fixed Header
'
,
'
app.setting.fixedheader
'
:
'
Fixed Header
'
,
...
...
src/locales/zh-CN.js
View file @
c59842ca
...
@@ -151,10 +151,10 @@ export default {
...
@@ -151,10 +151,10 @@ export default {
'
app.result.success.btn-return
'
:
'
返回列表
'
,
'
app.result.success.btn-return
'
:
'
返回列表
'
,
'
app.result.success.btn-project
'
:
'
查看项目
'
,
'
app.result.success.btn-project
'
:
'
查看项目
'
,
'
app.result.success.btn-print
'
:
'
打印
'
,
'
app.result.success.btn-print
'
:
'
打印
'
,
'
app.setting.pagestyle
'
:
'
整
理
风格设置
'
,
'
app.setting.pagestyle
'
:
'
整
体
风格设置
'
,
'
app.setting.
gridmode
'
:
'
栅格模式
'
,
'
app.setting.
content-width
'
:
'
内容区域宽度
'
,
'
app.setting.
gridmode.wide
'
:
'
定宽
'
,
'
app.setting.
content-width.fixed
'
:
'
定宽
'
,
'
app.setting.
gridmode
.fluid
'
:
'
流式
'
,
'
app.setting.
content-width
.fluid
'
:
'
流式
'
,
'
app.setting.themecolor
'
:
'
主题色
'
,
'
app.setting.themecolor
'
:
'
主题色
'
,
'
app.setting.navigationmode
'
:
'
导航模式
'
,
'
app.setting.navigationmode
'
:
'
导航模式
'
,
'
app.setting.fixedheader
'
:
'
固定 Header
'
,
'
app.setting.fixedheader
'
:
'
固定 Header
'
,
...
...
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