You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
elementResizeEvent(this.refs.echartsDom,function(){letdiv=document.getElementById(id),width=div.style.width||div.clientWidth||div.offsetWidth||div.scrollWidth,height=width*0.5;this.setState={width:width,height:height}echartObj.resize();});//-------------------------------------------------------------------render(){letstyle={width:this.state.width,height:this.state.height}||{height: '300px'};// for renderreturn(<divid={this.state.id}ref='echartsDom'style={style}/>);}//------------------------------------------------------------------
我想实现的效果是宽高比一定,高度随宽度变化而变化。
使用this.setState也没用,因为componentDidMount后不再render了。
请问这该怎么解决呀?
The text was updated successfully, but these errors were encountered: