Commit 8c74bc6c authored by 陈帅's avatar 陈帅

Weak mode changed to switch

parent 6b8665e7
......@@ -7,7 +7,7 @@
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log",
"mock":"cd .. && rollup -c"
"mock": "cd .. && rollup -c"
},
"dependencies": {
"express": "^4.16.3",
......
......@@ -5,11 +5,11 @@
"private": true,
"scripts": {
"precommit": "npm run lint-staged",
"preinstall": "cd functions && npm install",
"presite": "cd functions && npm install",
"start": "cross-env ESLINT=none roadhog dev",
"start:no-proxy": "cross-env NO_PROXY=true ESLINT=none roadhog dev",
"build": "cross-env ESLINT=none roadhog build",
"site": "rollup -c && npm run build && firebase deploy",
"site": "npm run presite && rollup -c && npm run build && firebase deploy",
"analyze": "cross-env ANALYZE=1 roadhog build",
"lint:style": "stylelint \"src/**/*.less\" --syntax less",
"lint": "eslint --ext .js src mock tests && npm run lint:style",
......@@ -38,7 +38,7 @@
"path-to-regexp": "^2.1.0",
"prop-types": "^15.5.10",
"qs": "^6.5.0",
"rc-drawer": "^1.4.4",
"rc-drawer": "^1.5.1",
"react": "^16.4.0",
"react-container-query": "^0.11.0",
"react-document-title": "^2.0.3",
......
......@@ -106,7 +106,7 @@ class SettingDarwer extends PureComponent {
}
}
if (key === 'colorWeak') {
if (value === 'open') {
if (value) {
document.body.className = 'colorWeak';
} else {
document.body.className = '';
......@@ -155,8 +155,9 @@ class SettingDarwer extends PureComponent {
open={collapse}
mask={false}
onHandleClick={this.togglerContent}
handleChild={
!collapse ? (
handler={
<div className="drawer-handle">
{!collapse ? (
<Icon
type="setting"
style={{
......@@ -172,7 +173,8 @@ class SettingDarwer extends PureComponent {
fontSize: 20,
}}
/>
)
)}
</div>
}
placement="right"
width="336px"
......@@ -231,15 +233,11 @@ class SettingDarwer extends PureComponent {
<Body title="其他设置 ">
<List.Item
actions={[
<Select
value={colorWeak}
<Switch
size="small"
onSelect={value => this.changeSetting('colorWeak', value)}
style={{ width: 80 }}
>
<Select.Option value="close">close</Select.Option>
<Select.Option value="open">open</Select.Option>
</Select>,
checked={!!colorWeak}
onChange={checked => this.changeSetting('colorWeak', checked)}
/>,
]}
>
色弱模式
......
......@@ -7,7 +7,7 @@ const defaultSetting = {
fixedHeader: false,
autoHideHeader: false,
fixSiderbar: false,
colorWeak: 'close',
colorWeak: false,
};
export default {
......
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