From 472e6ff816ce0f38d9c56486ed655be1207684e0 Mon Sep 17 00:00:00 2001 From: Qiyuan Date: Sat, 25 Nov 2017 14:03:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8A=A0=E8=BD=BD=E6=97=B6?= =?UTF-8?q?=E7=99=BD=E5=B1=8F=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 如果不传入 option.backgroundColor,背景为透明色 如果传入 option.backgroundColor,背景为传入的颜色 (option.backgroundColor 是 ECharts 的 背景色配置项) --- src/components/Echarts/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Echarts/index.js b/src/components/Echarts/index.js index e505b10..ced1ac6 100644 --- a/src/components/Echarts/index.js +++ b/src/components/Echarts/index.js @@ -21,6 +21,7 @@ export default class App extends Component { height: this.props.height || 400, }} source={require('./tpl.html')} + style={{backgroundColor: this.props.option.backgroundColor || 'rgba(0, 0, 0, 0)'}} onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null} />