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
d92f3dc5
Commit
d92f3dc5
authored
Sep 01, 2018
by
afc163
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
defaultSetting => defaultSettings
parent
07e3f632
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
10 deletions
+12
-10
config/config.js
config/config.js
+2
-2
src/defaultSettings.js
src/defaultSettings.js
+0
-0
src/locales/en-US.js
src/locales/en-US.js
+3
-2
src/locales/zh-CN.js
src/locales/zh-CN.js
+3
-2
src/models/setting.js
src/models/setting.js
+4
-4
No files found.
config/config.js
View file @
d92f3dc5
...
...
@@ -2,7 +2,7 @@
const
os
=
require
(
'
os
'
);
const
pageRoutes
=
require
(
'
./router.config
'
);
const
webpackplugin
=
require
(
'
./plugin.config
'
);
const
defaultSetting
=
require
(
'
../src/defaultSetting
'
);
const
defaultSetting
s
=
require
(
'
../src/defaultSettings
'
);
export
default
{
// add for transfer to umi
...
...
@@ -35,7 +35,7 @@ export default {
// Theme for antd
// https://ant.design/docs/react/customize-theme-cn
theme
:
{
'
primary-color
'
:
defaultSetting
.
primaryColor
,
'
primary-color
'
:
defaultSetting
s
.
primaryColor
,
},
externals
:
{
'
@antv/data-set
'
:
'
DataSet
'
,
...
...
src/defaultSetting.js
→
src/defaultSetting
s
.js
View file @
d92f3dc5
File moved
src/locales/en-US.js
View file @
d92f3dc5
...
...
@@ -167,6 +167,7 @@ export default {
'
app.setting.othersettings
'
:
'
Other Settings
'
,
'
app.setting.weakmode
'
:
'
Weak Mode
'
,
'
app.setting.copy
'
:
'
Copy Setting
'
,
'
app.setting.copyinfo
'
:
'
copy success,please replace defaultSetting in src/models/setting.js
'
,
'
app.setting.production.hint
'
:
'
Setting panel show in development enviorment only, please modify src/defaultSetting.js mannually.
'
,
'
app.setting.copyinfo
'
:
'
copy success,please replace defaultSettings in src/models/setting.js
'
,
'
app.setting.production.hint
'
:
'
Setting panel show in development enviorment only, please modify src/defaultSettings.js mannually.
'
,
};
src/locales/zh-CN.js
View file @
d92f3dc5
...
...
@@ -163,6 +163,7 @@ export default {
'
app.setting.othersettings
'
:
'
其他设置
'
,
'
app.setting.weakmode
'
:
'
色弱模式
'
,
'
app.setting.copy
'
:
'
拷贝设置
'
,
'
app.setting.copyinfo
'
:
'
拷贝成功,请到 src/defaultSetting.js 中替换默认配置
'
,
'
app.setting.production.hint
'
:
'
配置栏只在开发环境用于预览,请拷贝后手动修改 src/defaultSetting.js
'
,
'
app.setting.copyinfo
'
:
'
拷贝成功,请到 src/defaultSettings.js 中替换默认配置
'
,
'
app.setting.production.hint
'
:
'
配置栏只在开发环境用于预览,请拷贝后手动修改 src/defaultSettings.js
'
,
};
src/models/setting.js
View file @
d92f3dc5
import
{
message
}
from
'
antd
'
;
import
defaultSetting
from
'
../defaultSetting
'
;
import
defaultSetting
s
from
'
../defaultSettings
'
;
let
lessNodesAppended
;
const
updateTheme
=
primaryColor
=>
{
...
...
@@ -64,7 +64,7 @@ const updateColorWeak = colorWeak => {
export
default
{
namespace
:
'
setting
'
,
state
:
defaultSetting
,
state
:
defaultSetting
s
,
reducers
:
{
getSetting
(
state
)
{
const
setting
=
{};
...
...
@@ -87,7 +87,7 @@ export default {
},
changeSetting
(
state
,
{
payload
})
{
const
urlParams
=
new
URL
(
window
.
location
.
href
);
Object
.
keys
(
defaultSetting
).
forEach
(
key
=>
{
Object
.
keys
(
defaultSetting
s
).
forEach
(
key
=>
{
if
(
urlParams
.
searchParams
.
has
(
key
))
{
urlParams
.
searchParams
.
delete
(
key
);
}
...
...
@@ -100,7 +100,7 @@ export default {
if
(
value
===
true
)
{
value
=
1
;
}
if
(
defaultSetting
[
key
]
!==
value
)
{
if
(
defaultSetting
s
[
key
]
!==
value
)
{
urlParams
.
searchParams
.
set
(
key
,
value
);
}
});
...
...
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