提交 3e127cc8 编写于 作者: J jim 提交者: 陈帅

fix fixSiderbar

上级 28b07b81
......@@ -31,11 +31,11 @@
"bizcharts-plugin-slider": "^2.0.3",
"classnames": "^2.2.5",
"dva": "^2.2.3",
"dva-loading": "^1.0.4",
"dva-loading": "^2.0.1",
"enquire-js": "^0.2.1",
"less": "2.7.2",
"less": "3.0.2",
"lodash": "^4.17.4",
"lodash-decorators": "^4.4.1",
"lodash-decorators": "^5.0.0",
"moment": "^2.22.0",
"numeral": "^2.0.6",
"omit.js": "^1.0.0",
......@@ -44,7 +44,7 @@
"qs": "^6.5.0",
"rc-drawer-menu": "^0.5.0",
"react": "^16.3.1",
"react-container-query": "^0.9.1",
"react-container-query": "^0.11.0",
"react-document-title": "^2.0.3",
"react-dom": "^16.3.1",
"react-fittext": "^1.0.0",
......@@ -64,7 +64,7 @@
"eslint": "^4.14.0",
"eslint-config-airbnb": "^16.0.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-babel": "^4.0.0",
"eslint-plugin-babel": "^5.1.0",
"eslint-plugin-compat": "^2.1.0",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
......@@ -72,15 +72,15 @@
"eslint-plugin-react": "^7.0.1",
"gh-pages": "^1.0.0",
"husky": "^0.14.3",
"lint-staged": "^6.0.0",
"lint-staged": "^7.0.5",
"mockjs": "^1.0.1-beta3",
"prettier": "1.11.1",
"prettier": "1.12.1",
"pro-download": "^1.0.1",
"redbox-react": "^1.5.0",
"regenerator-runtime": "^0.11.1",
"roadhog": "^2.3.0",
"roadhog-api-doc": "^1.0.2",
"stylelint": "^8.4.0",
"stylelint": "^9.2.0",
"stylelint-config-prettier": "^3.0.4",
"stylelint-config-standard": "^18.0.0"
},
......@@ -92,7 +92,7 @@
"prettier --wirter",
"git add"
],
"**/*.{js,jsx}": "lint-staged:js",
"**/*.{js,jsx}": "npm run lint-staged:js",
"**/*.less": "stylelint --syntax less"
},
"engines": {
......
......@@ -14,6 +14,7 @@
height: 16px;
border-radius: 2px;
float: left;
cursor: pointer;
margin: 5px;
&.active {
width: 18px;
......
......@@ -156,7 +156,7 @@ class Sidebar extends PureComponent {
<Radio style={radioStyle} value="dark">
<ColorBlock color="#002140" title="深色导航" />
</Radio>
<Radio style={radioStyle} value="ligth">
<Radio style={radioStyle} value="light">
<ColorBlock color="#E9E9E9" title="浅色导航" />
</Radio>
</RadioGroup>
......
......@@ -55,6 +55,7 @@
width: 38px;
height: 22px;
margin: 4px;
cursor: pointer;
margin-right: 12px;
display: inline-block;
vertical-align: middle;
......
......@@ -13,7 +13,9 @@ const { SubMenu } = Menu;
* @memberof SiderMenu
*/
const getDefaultCollapsedSubMenus = props => {
const { location: { pathname } } = props;
const {
location: { pathname },
} = props;
return urlToList(pathname)
.map(item => {
return getMenuMatches(props.flatMenuKeys, item)[0];
......@@ -140,7 +142,7 @@ export default class SiderMenu extends PureComponent {
breakpoint="lg"
onCollapse={onCollapse}
width={256}
className={`${styles.sider} ${theme === 'ligth' ? styles.ligth : ''}`}
className={`${styles.sider} ${theme === 'light' ? styles.light : ''}`}
>
<div className={styles.logo} key="logo">
<Link to="/">
......
......@@ -20,7 +20,7 @@ const getFlatMenuKeys = menuData => {
};
const SiderMenuWrapper = props =>
props.isMobile ? (
props.isMobile || props.fixSiderbar ? (
<DrawerMenu
parent={null}
level={null}
......
......@@ -7,16 +7,8 @@ import styles from './index.less';
export default class TopNavHeader extends PureComponent {
render() {
return (
<div
className={`${styles.head} ${
this.props.theme === 'ligth' ? styles.ligth : ''
}`}
>
<div
className={`${styles.main} ${
this.props.grid === 'Wide' ? styles.wide : ''
}`}
>
<div className={`${styles.head} ${this.props.theme === 'light' ? styles.light : ''}`}>
<div className={`${styles.main} ${this.props.grid === 'Wide' ? styles.wide : ''}`}>
<div className={styles.left}>
<div className={styles.logo} key="logo">
<Link to="/">
......@@ -24,10 +16,7 @@ export default class TopNavHeader extends PureComponent {
<h1>Ant Design Pro</h1>
</Link>
</div>
<BaseMenu
{...this.props}
style={{ padding: '9px 0', border: 'none' }}
/>
<BaseMenu {...this.props} style={{ padding: '9px 0', border: 'none' }} />
</div>
<div className={styles.right}>
<RightContent {...this.props} />
......
......@@ -5,7 +5,7 @@
padding: 0 12px 0 0;
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
position: relative;
&.ligth {
&.light {
background-color: #fff;
}
.main {
......@@ -46,7 +46,7 @@
}
}
.ligth {
.light {
h1 {
color: #002140;
}
......
......@@ -20,7 +20,7 @@ export default {
Object.keys(state).forEach(key => {
if (urlParams.searchParams.has(key)) {
const value = urlParams.searchParams.get(key);
setting[key] = value;
setting[key] = value === '1' ? true : '1';
}
});
return setting;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册