This commit is contained in:
zuiidea
2016-12-03 23:59:50 +08:00
parent 5258670e86
commit f8e64d2dc6
2 changed files with 1 additions and 4 deletions
+1 -2
View File
@@ -29,7 +29,6 @@ const getMenus = function (menuArray,siderFold,parentPath) {
}
function Sider({ siderFold,darkTheme,location,changeTheme }) {
console.log(location);
return (
<div>
<div className={styles.logo}>
@@ -44,7 +43,7 @@ function Sider({ siderFold,darkTheme,location,changeTheme }) {
</Menu>
{!siderFold?<div className={styles.switchtheme}>
<span><Icon type="bulb" />切换主题</span>
<Switch onChange={changeTheme} defaultChecked={true} checkedChildren="黑" unCheckedChildren="白" />
<Switch onChange={changeTheme} defaultChecked={darkTheme} checkedChildren="黑" unCheckedChildren="白" />
</div>:''}
</div>
)
-2
View File
@@ -121,14 +121,12 @@ export default {
}
},
handleSwitchSider(state) {
console.log(state);
return {
...state,
siderFold: !state.siderFold
}
},
handleChangeTheme(state) {
console.log(state);
return {
...state,
darkTheme: !state.darkTheme