Comparing version 0.0.4 to 0.0.5
import React from 'react'; | ||
require('./chart.scss'); | ||
class List extends React.Component { | ||
class Chart extends React.Component { | ||
constructor(args) { | ||
@@ -30,6 +30,7 @@ super(args); | ||
} | ||
this.doms = {}; | ||
} | ||
componentDidMount() { | ||
this.charts = echarts.init(this.refs.chart); | ||
this.charts = echarts.init(this.doms.chart); | ||
let option = { | ||
@@ -108,5 +109,8 @@ tooltip: { | ||
</div> | ||
<div className="hui-chart-chart" ref="chart" style={{ | ||
height: (this.props.height || 290) - 30 + 'px' | ||
}}> | ||
<div | ||
className="hui-chart-chart" | ||
ref={(e) => { this.doms.chart = e; }} | ||
style={{ | ||
height: (this.props.height || 290) - 30 + 'px' | ||
}}> | ||
x | ||
@@ -119,2 +123,2 @@ </div> | ||
export default List; | ||
export default Chart; |
{ | ||
"name": "hui-ui", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "hui-ui", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8601
164