From f25d46a5cfdc9cab3981e50255a5e82f72eba686 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 22 五月 2020 14:13:31 +0800 Subject: [PATCH] 2020-05-22 --- src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx index 216fc23..0dd5540 100644 --- a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx +++ b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx @@ -279,6 +279,11 @@ return item }) }) + if (val === 'absolute') { + this.props.form.setFieldsValue({cardWidth: 250}) + } else { + this.props.form.setFieldsValue({cardWidth: 6}) + } } else if (key === 'over' && val === 'roll') { this.setState({ formlist: formlist.map(item => { @@ -293,7 +298,7 @@ }) }) if (this.props.form.getFieldValue('widthType') !== undefined) { - this.props.form.setFieldsValue({widthType: 'absolute'}) + this.props.form.setFieldsValue({widthType: 'absolute', cardWidth: 250}) } } else if (key === 'over' && val === 'whole') { this.setState({ @@ -544,7 +549,7 @@ <Row gutter={24}>{this.getFields()}</Row> {legends ? <Row gutter={24} className="chart-model-image"> {legends.map(item => <Col span={6} key={item.uuid}> - <img onClick={() => this.changeSelectLegend(item)} src={item.url} className={selectlegend.uuid === item.uuid ? 'active' : ''} alt=""/> + <img onClick={() => this.changeSelectLegend(item)} src={item.url} className={selectlegend && selectlegend.uuid === item.uuid ? 'active' : ''} alt=""/> </Col>)} </Row> : null} </Form> -- Gitblit v1.8.0