@@ -16,19 +16,19 @@ var _elementResizeEvent = require('element-resize-event');
16
16
17
17
var _elementResizeEvent2 = _interopRequireDefault ( _elementResizeEvent ) ;
18
18
19
- function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { default : obj } ; }
19
+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { ' default' : obj } ; }
20
20
21
- var ReactEcharts = _react2 . default . createClass ( {
21
+ var ReactEcharts = _react2 [ ' default' ] . createClass ( {
22
22
displayName : 'ReactEcharts' ,
23
23
24
24
propTypes : {
25
- option : _react2 . default . PropTypes . object . isRequired ,
26
- style : _react2 . default . PropTypes . object ,
27
- className : _react2 . default . PropTypes . string ,
28
- theme : _react2 . default . PropTypes . string ,
29
- onChartReady : _react2 . default . PropTypes . func ,
30
- showLoading : _react2 . default . PropTypes . bool ,
31
- onEvents : _react2 . default . PropTypes . object
25
+ option : _react2 [ ' default' ] . PropTypes . object . isRequired ,
26
+ style : _react2 [ ' default' ] . PropTypes . object ,
27
+ className : _react2 [ ' default' ] . PropTypes . string ,
28
+ theme : _react2 [ ' default' ] . PropTypes . string ,
29
+ onChartReady : _react2 [ ' default' ] . PropTypes . func ,
30
+ showLoading : _react2 [ ' default' ] . PropTypes . bool ,
31
+ onEvents : _react2 [ ' default' ] . PropTypes . object
32
32
} ,
33
33
// first add
34
34
componentDidMount : function componentDidMount ( ) {
@@ -52,7 +52,7 @@ var ReactEcharts = _react2.default.createClass({
52
52
if ( typeof this . props . onChartReady === 'function' ) this . props . onChartReady ( echartObj ) ;
53
53
54
54
// on resize
55
- ( 0 , _elementResizeEvent2 . default ) ( this . refs . echartsDom , function ( ) {
55
+ ( 0 , _elementResizeEvent2 [ ' default' ] ) ( this . refs . echartsDom , function ( ) {
56
56
echartObj . resize ( ) ;
57
57
} ) ;
58
58
} ,
@@ -64,7 +64,7 @@ var ReactEcharts = _react2.default.createClass({
64
64
65
65
// remove
66
66
componentWillUnmount : function componentWillUnmount ( ) {
67
- _echarts2 . default . dispose ( this . refs . chart ) ;
67
+ _echarts2 [ ' default' ] . dispose ( this . refs . chart ) ;
68
68
} ,
69
69
70
70
// render the dom
@@ -81,14 +81,14 @@ var ReactEcharts = _react2.default.createClass({
81
81
} ,
82
82
getEchartsInstance : function getEchartsInstance ( ) {
83
83
// return the echart object
84
- return _echarts2 . default . getInstanceByDom ( this . refs . echartsDom ) || _echarts2 . default . init ( this . refs . echartsDom , this . props . theme ) ;
84
+ return _echarts2 [ ' default' ] . getInstanceByDom ( this . refs . echartsDom ) || _echarts2 [ ' default' ] . init ( this . refs . echartsDom , this . props . theme ) ;
85
85
} ,
86
86
render : function render ( ) {
87
87
var style = this . props . style || { height : '300px' } ;
88
88
// for render
89
- return _react2 . default . createElement ( 'div' , { ref : 'echartsDom' ,
89
+ return _react2 [ ' default' ] . createElement ( 'div' , { ref : 'echartsDom' ,
90
90
className : this . props . className ,
91
91
style : style } ) ;
92
92
}
93
93
} ) ;
94
- exports . default = ReactEcharts ;
94
+ exports [ ' default' ] = ReactEcharts ;
0 commit comments