diff --git a/package.json b/package.json
index 601d572363d13957ddb04c43b61ae8423679e2e5..fdc790f2808b958289e3c6b877baac0f6e93e9e8 100755
--- a/package.json
+++ b/package.json
@@ -51,7 +51,7 @@
"@babel/polyfill": "^7.0.0-beta.53",
"@types/react": "^16.4.11",
"@types/react-dom": "^16.0.6",
- "antd-pro-merge-less": "^0.0.6",
+ "antd-pro-merge-less": "^0.0.9",
"antd-theme-webpack-plugin": "^1.0.8",
"babel-eslint": "^8.2.6",
"babel-runtime": "^6.9.2",
diff --git a/src/components/SettingDarwer/ThemeColor.js b/src/components/SettingDarwer/ThemeColor.js
index 63bf4782f6b077303f6e54fdcc6cfee80fd47102..f70bd4f824a9d737ba721b1d19bf1625e6439a33 100644
--- a/src/components/SettingDarwer/ThemeColor.js
+++ b/src/components/SettingDarwer/ThemeColor.js
@@ -15,7 +15,7 @@ const Tag = ({ color, check, ...rest }) => {
);
};
-const ThemeColor = ({ colors, value, onChange }) => {
+const ThemeColor = ({ colors, title, value, onChange }) => {
let colorList = colors;
if (!colors) {
colorList = [
@@ -31,7 +31,7 @@ const ThemeColor = ({ colors, value, onChange }) => {
}
return (
-
主题色
+
{title}
{colorList.map(color => {
return (
diff --git a/src/components/SettingDarwer/index.js b/src/components/SettingDarwer/index.js
index 074bce0c35cc8f046b8727a13f7f14bfc691941a..3a5802d3a42493aa63352d7c14d41b81806c48c5 100644
--- a/src/components/SettingDarwer/index.js
+++ b/src/components/SettingDarwer/index.js
@@ -1,5 +1,6 @@
import React, { PureComponent } from 'react';
import { Select, message, Drawer, List, Switch, Divider, Icon, Button } from 'antd';
+import { formatMessage } from 'umi/locale';
import { CopyToClipboard } from 'react-copy-to-clipboard';
import { connect } from 'dva';
import styles from './index.less';
@@ -26,7 +27,7 @@ class SettingDarwer extends PureComponent {
} = this.props;
return [
{
- title: '栅格模式',
+ title: formatMessage({ id: 'app.setting.gridmode' }),
action: [
,
],
},
{
- title: '固定 Header',
+ title: formatMessage({ id: 'app.setting.fixedheader' }),
action: [
-
+
this.changeSetting('themeColor', color)}
/>
-
+
-
+
,
]}
>
- 色弱模式
+ {formatMessage({ id: 'app.setting.weakmode' })}
- message.success(
- 'copy success,please replace defaultSetting in src/models/setting.js'
- )
- }
+ onCopy={() => message.success(formatMessage({ id: 'app.setting.copyinfo' }))}
>
diff --git a/src/layouts/BasicLayout.js b/src/layouts/BasicLayout.js
index 14299d2cc84e57d9756ab13039d10e3a1e1d0bda..c96e64d8f38905ca14b347aff472918f470e7172 100644
--- a/src/layouts/BasicLayout.js
+++ b/src/layouts/BasicLayout.js
@@ -179,7 +179,12 @@ class BasicLayout extends React.PureComponent {
{...this.props}
/>
)}
-
+
{children}
diff --git a/src/locales/en-US.js b/src/locales/en-US.js
index 63a16bd925d8f397df07f7af0ccabfb6f9b23815..d3e57f67583f8da7a05a91b07d0f75567c1050e0 100644
--- a/src/locales/en-US.js
+++ b/src/locales/en-US.js
@@ -155,4 +155,17 @@ export default {
'app.result.success.btn-return': 'Back to list',
'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.themecolor': 'Theme Color',
+ 'app.setting.navigationmode': 'Navigation Mode',
+ 'app.setting.fixedheader': 'Fixed Header',
+ 'app.setting.fixedsidebar': 'Fixed Sidebar',
+ 'app.setting.hideheader': 'Hidden Header when sliding ',
+ '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',
};
diff --git a/src/locales/zh-CN.js b/src/locales/zh-CN.js
index f49cf0c68aa4c9f9aaaf058c950e59797346d670..52683dcbfd4f21acf0700c7b0b6032b8160f7c3e 100644
--- a/src/locales/zh-CN.js
+++ b/src/locales/zh-CN.js
@@ -150,4 +150,17 @@ 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.themecolor': '主题色',
+ 'app.setting.navigationmode': '导航模式',
+ 'app.setting.fixedheader': '固定 Header',
+ 'app.setting.fixedsidebar': '固定 Sidebar',
+ 'app.setting.hideheader': '下滑时隐藏 Header',
+ 'app.setting.othersettings': '其他设置',
+ 'app.setting.weakmode': '色弱模式',
+ 'app.setting.copy': '拷贝设置',
+ 'app.setting.copyinfo': '拷贝成功,请到 src/models/setting.js 中替换 defaultSetting',
};