yoyo837 7 лет назад
Родитель
Сommit
bfda5fe23d
2 измененных файлов с 8 добавлено и 8 удалено
  1. 4 4
      src/components/Charts/Pie/index.js
  2. 4 4
      src/routes/Forms/AdvancedForm.js

+ 4 - 4
src/components/Charts/Pie/index.js

@@ -138,11 +138,11 @@ export default class Pie extends Component {
       [styles.legendBlock]: legendBlock,
     });
 
-    const { data: d, selected: s, tooltip: t } = this.props;
+    const { data: propsData, selected: propsSelected, tooltip: propsTooltip } = this.props;
 
-    let data = d || [];
-    let selected = s || true;
-    let tooltip = t || true;
+    let data = propsData || [];
+    let selected = propsSelected || true;
+    let tooltip = propsTooltip || true;
 
     const defaultColors = colors;
     // let data = this.props.data || [];

+ 4 - 4
src/routes/Forms/AdvancedForm.js

@@ -73,14 +73,14 @@ class AdvancedForm extends PureComponent {
   resizeFooterToolbar = () => {
     const sider = document.querySelectorAll('.ant-layout-sider')[0];
     const width = `calc(100% - ${sider.style.width})`;
-    const { width: w } = this.state;
-    if (w !== width) {
+    const { width: stateWidth } = this.state;
+    if (stateWidth !== width) {
       this.setState({ width });
     }
   };
 
   render() {
-    const { width: w } = this.state;
+    const { width: stateWidth } = this.state;
     const { form, dispatch, submitting } = this.props;
     const { getFieldDecorator, validateFieldsAndScroll, getFieldsError } = form;
     const validate = () => {
@@ -289,7 +289,7 @@ class AdvancedForm extends PureComponent {
             initialValue: tableData,
           })(<TableForm />)}
         </Card>
-        <FooterToolbar style={{ width: w }}>
+        <FooterToolbar style={{ width: stateWidth }}>
           {getErrorInfo()}
           <Button type="primary" onClick={validate} loading={submitting}>
             提交