Commit d61aaf8f authored by afc163's avatar afc163

remove collapse from defaultSettings

parent d1308e4a
...@@ -21,6 +21,10 @@ const Body = ({ children, title, style }) => ( ...@@ -21,6 +21,10 @@ const Body = ({ children, title, style }) => (
@connect(({ setting }) => ({ setting })) @connect(({ setting }) => ({ setting }))
class SettingDrawer extends PureComponent { class SettingDrawer extends PureComponent {
state = {
collapse: false,
};
getLayOutSetting = () => { getLayOutSetting = () => {
const { const {
setting: { grid, fixedHeader, layout, autoHideHeader, fixSiderbar }, setting: { grid, fixedHeader, layout, autoHideHeader, fixSiderbar },
...@@ -98,13 +102,14 @@ class SettingDrawer extends PureComponent { ...@@ -98,13 +102,14 @@ class SettingDrawer extends PureComponent {
}; };
togglerContent = () => { togglerContent = () => {
const { setting } = this.props; const { collapse } = this.state;
this.changeSetting('collapse', !setting.collapse); this.setState({ collapse: !collapse });
}; };
render() { render() {
const { setting } = this.props; const { setting } = this.props;
const { collapse, navTheme, primaryColor, layout, colorWeak } = setting; const { navTheme, primaryColor, layout, colorWeak } = setting;
const { collapse } = this.state;
return ( return (
<Drawer <Drawer
visible={collapse} visible={collapse}
......
module.exports = { module.exports = {
collapse: false,
navTheme: 'dark', navTheme: 'dark',
primaryColor: '#1890FF', primaryColor: '#1890FF',
layout: 'sidemenu', layout: 'sidemenu',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment