From 5944c2832820a8bfa86e3efb5085f5a2463897f9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 22 九月 2020 09:14:49 +0800 Subject: [PATCH] 2020-09-22 --- src/menu/components/chart/antv-bar/index.jsx | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/menu/components/chart/antv-bar/index.jsx b/src/menu/components/chart/antv-bar/index.jsx index c16378f..0a3e071 100644 --- a/src/menu/components/chart/antv-bar/index.jsx +++ b/src/menu/components/chart/antv-bar/index.jsx @@ -1,5 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' +import {connect} from 'react-redux' import { is, fromJS } from 'immutable' import { Chart } from '@antv/g2' import DataSet from '@antv/data-set' @@ -19,7 +20,6 @@ class antvBarLineChart extends Component { static propTpyes = { - menu: PropTypes.object, card: PropTypes.object, updateConfig: PropTypes.func, } @@ -548,28 +548,22 @@ render() { const { card } = this.state - const { menu } = this.props return ( <div className="menu-line-chart-edit-box" style={{height: card.setting.height || 400}}> <SettingComponent config={card} - menu={menu} updateConfig={this.updateComponent} /> <div className="chart-header"> <span className="chart-title">{card.setting.title || ''}</span> <SearchComponent - menu={menu} config={card} - sysRoles={menu.sysRoles} - optionLibs={null} updatesearch={this.updateComponent} /> </div> <ActionComponent type="chart" - menu={menu} config={card} tabs={[]} // setSubConfig={(_btn) => this.setSubConfig(_btn, 'button')} @@ -586,4 +580,14 @@ } } -export default antvBarLineChart \ No newline at end of file +const mapStateToProps = (state) => { + return { + menu: state.customMenu + } +} + +const mapDispatchToProps = () => { + return {} +} + +export default connect(mapStateToProps, mapDispatchToProps)(antvBarLineChart) \ No newline at end of file -- Gitblit v1.8.0