From c59842ca1c25ce78bb197b55576a420b1c00dfdd Mon Sep 17 00:00:00 2001 From: afc163 Date: Sat, 1 Sep 2018 22:37:30 +0800 Subject: [PATCH] make setting names easy to understand --- src/components/PageHeaderWrapper/GridContent.js | 2 +- src/components/PageHeaderWrapper/index.js | 2 +- src/components/SettingDrawer/index.js | 9 +++++---- src/components/TopNavHeader/index.js | 6 +++--- src/defaultSettings.js | 15 +++++++-------- src/locales/en-US.js | 6 +++--- src/locales/zh-CN.js | 8 ++++---- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/components/PageHeaderWrapper/GridContent.js b/src/components/PageHeaderWrapper/GridContent.js index 68fa027f..5f16c5d0 100644 --- a/src/components/PageHeaderWrapper/GridContent.js +++ b/src/components/PageHeaderWrapper/GridContent.js @@ -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
{children}
; diff --git a/src/components/PageHeaderWrapper/index.js b/src/components/PageHeaderWrapper/index.js index 1a833590..63082df7 100644 --- a/src/components/PageHeaderWrapper/index.js +++ b/src/components/PageHeaderWrapper/index.js @@ -13,7 +13,7 @@ const PageHeaderWrapper = ({ children, grid, wrapperClassName, top, ...restProps {value => ( } {...value} key="pageheader" diff --git a/src/components/SettingDrawer/index.js b/src/components/SettingDrawer/index.js index 8eabe552..cb359254 100644 --- a/src/components/SettingDrawer/index.js +++ b/src/components/SettingDrawer/index.js @@ -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 }} > - - {formatMessage({ id: 'app.setting.gridmode.wide' })} + + {formatMessage({ id: 'app.setting.gridmode.fixed' })} {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 { message.success(formatMessage({ id: 'app.setting.copyinfo' }))} >