From bfda5fe23db001985a287b6b445a07c8dc34d3ee Mon Sep 17 00:00:00 2001 From: yoyo837 Date: Mon, 25 Jun 2018 17:43:21 +0800 Subject: [PATCH] naming specification --- src/components/Charts/Pie/index.js | 8 ++++---- src/routes/Forms/AdvancedForm.js | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/Charts/Pie/index.js b/src/components/Charts/Pie/index.js index a0301723..b6397317 100644 --- a/src/components/Charts/Pie/index.js +++ b/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 || []; diff --git a/src/routes/Forms/AdvancedForm.js b/src/routes/Forms/AdvancedForm.js index 63faa644..6ab2bfb9 100644 --- a/src/routes/Forms/AdvancedForm.js +++ b/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, })()} - + {getErrorInfo()}