Commit 22303139 authored by chen shuai's avatar chen shuai

bugfix: fix SettingDrawer style error

parent 81ff030b
import React, { PureComponent } from 'react'; import React, { Component } from 'react';
import { Select, message, Drawer, List, Switch, Divider, Icon, Button, Alert, Tooltip } from 'antd'; import { Select, message, Drawer, List, Switch, Divider, Icon, Button, Alert, Tooltip } from 'antd';
import { formatMessage } from 'umi/locale'; import { formatMessage } from 'umi/locale';
import { CopyToClipboard } from 'react-copy-to-clipboard'; import { CopyToClipboard } from 'react-copy-to-clipboard';
...@@ -23,7 +23,7 @@ const Body = ({ children, title, style }) => ( ...@@ -23,7 +23,7 @@ const Body = ({ children, title, style }) => (
); );
@connect(({ setting }) => ({ setting })) @connect(({ setting }) => ({ setting }))
class SettingDrawer extends PureComponent { class SettingDrawer extends Component {
state = { state = {
collapse: false, collapse: false,
}; };
...@@ -207,17 +207,22 @@ class SettingDrawer extends PureComponent { ...@@ -207,17 +207,22 @@ class SettingDrawer extends PureComponent {
<Divider /> <Divider />
<Body title={formatMessage({ id: 'app.setting.othersettings' })}> <Body title={formatMessage({ id: 'app.setting.othersettings' })}>
<List.Item <List
actions={[ split={false}
<Switch renderItem={this.renderLayoutSettingItem}
size="small" dataSource={[
checked={!!colorWeak} {
onChange={checked => this.changeSetting('colorWeak', checked)} title: formatMessage({ id: 'app.setting.weakmode' }),
/>, action: (
<Switch
size="small"
checked={!!colorWeak}
onChange={checked => this.changeSetting('colorWeak', checked)}
/>
),
},
]} ]}
> />
{formatMessage({ id: 'app.setting.weakmode' })}
</List.Item>
</Body> </Body>
<Divider /> <Divider />
<CopyToClipboard <CopyToClipboard
......
...@@ -4,6 +4,13 @@ ...@@ -4,6 +4,13 @@
position: relative; position: relative;
min-height: 100%; min-height: 100%;
background: #fff; background: #fff;
:global {
.ant-list-item {
span {
flex: 1;
}
}
}
} }
.blockChecbox { .blockChecbox {
......
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