From 223031398421b8ce3c15b17899f098e93fb68c6b Mon Sep 17 00:00:00 2001 From: chen shuai Date: Mon, 25 Mar 2019 12:04:25 +0800 Subject: [PATCH] bugfix: fix SettingDrawer style error --- src/components/SettingDrawer/index.js | 29 +++++++++++++++---------- src/components/SettingDrawer/index.less | 7 ++++++ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/components/SettingDrawer/index.js b/src/components/SettingDrawer/index.js index cdb28aa3..1a9be4f4 100644 --- a/src/components/SettingDrawer/index.js +++ b/src/components/SettingDrawer/index.js @@ -1,4 +1,4 @@ -import React, { PureComponent } from 'react'; +import React, { Component } from 'react'; import { Select, message, Drawer, List, Switch, Divider, Icon, Button, Alert, Tooltip } from 'antd'; import { formatMessage } from 'umi/locale'; import { CopyToClipboard } from 'react-copy-to-clipboard'; @@ -23,7 +23,7 @@ const Body = ({ children, title, style }) => ( ); @connect(({ setting }) => ({ setting })) -class SettingDrawer extends PureComponent { +class SettingDrawer extends Component { state = { collapse: false, }; @@ -207,17 +207,22 @@ class SettingDrawer extends PureComponent { - this.changeSetting('colorWeak', checked)} - />, + this.changeSetting('colorWeak', checked)} + /> + ), + }, ]} - > - {formatMessage({ id: 'app.setting.weakmode' })} - + />