diff --git a/src/components/Charts/WaterWave/index.js b/src/components/Charts/WaterWave/index.js index f5ea26a0c815473398e2101931088f4dd1b65b10..2da301a0b6b12c8066573ddf0e56286e61a5e91e 100644 --- a/src/components/Charts/WaterWave/index.js +++ b/src/components/Charts/WaterWave/index.js @@ -30,11 +30,13 @@ export default class WaterWave extends PureComponent { resize = () => { requestAnimationFrame(() => { - const { height } = this.props; - const { offsetWidth } = this.root.parentNode; - this.setState({ - radio: offsetWidth < height ? offsetWidth / height : 1, - }); + if (this.root) { + const { height } = this.props; + const { offsetWidth } = this.root.parentNode; + this.setState({ + radio: offsetWidth < height ? offsetWidth / height : 1, + }); + } }); }; diff --git a/src/components/Sidebar/LayoutSetting.js b/src/components/Sidebar/LayoutSetting.js index f4947402b7f27c74515e455cf335e004ac7e73bd..b98b960190b5da0243ce2dfadeb2690f3d16c24a 100644 --- a/src/components/Sidebar/LayoutSetting.js +++ b/src/components/Sidebar/LayoutSetting.js @@ -1,39 +1,18 @@ import { Tooltip } from 'antd'; import React from 'react'; import NavSate from './navState'; +import style from './index.less'; const LayoutSetting = ({ value, onChange }) => { return ( -