diff --git a/src/components/FooterToolbar/index.less b/src/components/FooterToolbar/index.less index 5f2d3c9281ea67f6f51df20114e5a1b983d27996..b6b6399e518ebf8459654d0c1bfd9be786280cb6 100644 --- a/src/components/FooterToolbar/index.less +++ b/src/components/FooterToolbar/index.less @@ -11,7 +11,6 @@ background: #fff; border-top: 1px solid @border-color-split; padding: 0 24px; - transition: all .3s; z-index: 9; &:after { diff --git a/src/routes/Forms/AdvancedForm.js b/src/routes/Forms/AdvancedForm.js index d3106bd63e0578853c0a423f95c88ca16ecc8938..565c027fc06793830c9e263e15950e7b7be75861 100644 --- a/src/routes/Forms/AdvancedForm.js +++ b/src/routes/Forms/AdvancedForm.js @@ -42,6 +42,22 @@ const tableData = [{ }]; class AdvancedForm extends PureComponent { + state = { + width: '100%', + }; + componentDidMount() { + window.addEventListener('resize', this.resizeFooterToolbar); + } + componentWillUnmount() { + window.removeEventListener('resize', this.resizeFooterToolbar); + } + resizeFooterToolbar = () => { + const sider = document.querySelectorAll('.ant-layout-sider')[0]; + const width = `calc(100% - ${sider.style.width})`; + if (this.state.width !== width) { + this.setState({ width }); + } + } render() { const { form, dispatch, submitting } = this.props; const { getFieldDecorator, validateFieldsAndScroll, getFieldsError } = form; @@ -257,7 +273,7 @@ class AdvancedForm extends PureComponent { initialValue: tableData, })()} - + {getErrorInfo()}