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