Merge pull request #136 from hydraZty/webview

@bugfix, Webview does not show in the release version
This commit is contained in:
Arron Zhu 2018-12-20 16:48:24 +08:00 committed by GitHub
commit 6bbb09917e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ export default class App extends Component {
backgroundColor: this.props.backgroundColor || 'transparent' backgroundColor: this.props.backgroundColor || 'transparent'
}} }}
scalesPageToFit={Platform.OS !== 'ios'} scalesPageToFit={Platform.OS !== 'ios'}
originWhitelist={['*']}
source={require('./tpl.html')} source={require('./tpl.html')}
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}
/> />