|
|
|
@ -41,13 +41,13 @@ class SettingDarwer extends PureComponent { |
|
|
|
onSelect={value => this.changeSetting('grid', value)} |
|
|
|
style={{ width: 80 }} |
|
|
|
> |
|
|
|
<Select.Option value="Wide">Wide</Select.Option> |
|
|
|
<Select.Option value="Fluid">Fluid</Select.Option> |
|
|
|
<Select.Option value="Wide">定宽</Select.Option> |
|
|
|
<Select.Option value="Fluid">流式</Select.Option> |
|
|
|
</Select>, |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: 'Fixed Header', |
|
|
|
title: '固定 Header', |
|
|
|
action: [ |
|
|
|
<Switch |
|
|
|
size="small" |
|
|
|
@ -58,6 +58,7 @@ class SettingDarwer extends PureComponent { |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '下滑时隐藏 Header', |
|
|
|
hide: fixedHeader, |
|
|
|
action: [ |
|
|
|
<Switch |
|
|
|
size="small" |
|
|
|
@ -67,7 +68,7 @@ class SettingDarwer extends PureComponent { |
|
|
|
], |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: 'Fix Siderbar', |
|
|
|
title: '固定 Siderbar', |
|
|
|
action: [ |
|
|
|
<Switch |
|
|
|
size="small" |
|
|
|
@ -76,7 +77,9 @@ class SettingDarwer extends PureComponent { |
|
|
|
/>, |
|
|
|
], |
|
|
|
}, |
|
|
|
]; |
|
|
|
].filter(item => { |
|
|
|
return !item.hide; |
|
|
|
}); |
|
|
|
}; |
|
|
|
changeSetting = (key, value) => { |
|
|
|
const nextState = { ...this.props.setting }; |
|
|
|
@ -88,6 +91,11 @@ class SettingDarwer extends PureComponent { |
|
|
|
nextState.grid = 'Fluid'; |
|
|
|
} |
|
|
|
} |
|
|
|
if (key === 'fixedHeader') { |
|
|
|
if (value) { |
|
|
|
nextState.autoHideHeader = false; |
|
|
|
} |
|
|
|
} |
|
|
|
if (key === 'colorWeak') { |
|
|
|
if (value === 'open') { |
|
|
|
document.body.className = 'colorWeak'; |
|
|
|
|