From 46fa548514ba2a438908586e2b54ed742777e9b0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 08 六月 2020 18:09:11 +0800 Subject: [PATCH] 2020-06-08 --- src/templates/sharecomponent/chartcomponent/index.jsx | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/templates/sharecomponent/chartcomponent/index.jsx b/src/templates/sharecomponent/chartcomponent/index.jsx index f35533c..6b2faac 100644 --- a/src/templates/sharecomponent/chartcomponent/index.jsx +++ b/src/templates/sharecomponent/chartcomponent/index.jsx @@ -601,9 +601,13 @@ this.props.plotchange({...config, charts: _charts}) } + shouldComponentUpdate (nextProps, nextState) { + return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) + } + render() { const { plot } = this.props - + console.log(plot) return ( <div className="line-chart-edit-box" style={{minHeight: plot.height ? plot.height + 50 : 450}}> {plot.title ? <p className="chart-title">{plot.title}</p> : null} -- Gitblit v1.8.0