修复加载时白屏的问题

如果不传入 option.backgroundColor,背景为透明色
如果传入 option.backgroundColor,背景为传入的颜色
(option.backgroundColor 是 ECharts 的 背景色配置项)
This commit is contained in:
Qiyuan 2017-11-25 14:03:57 +08:00 committed by GitHub
parent eeeaead411
commit 472e6ff816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -21,6 +21,7 @@ export default class App extends Component {
height: this.props.height || 400, height: this.props.height || 400,
}} }}
source={require('./tpl.html')} 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} onMessage={event => this.props.onPress ? this.props.onPress(JSON.parse(event.nativeEvent.data)) : null}
/> />
</View> </View>