Update index.js

This commit is contained in:
superscore 2019-10-10 15:02:35 +08:00 committed by GitHub
parent 9ef48beaaa
commit 042b96aad4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ export default class App extends Component {
backgroundColor: this.props.backgroundColor || 'transparent' backgroundColor: this.props.backgroundColor || 'transparent'
}} }}
originWhitelist={['*']} originWhitelist={['*']}
source={{ html:getTpl() }} source={Platform.OS === "ios"?{ html:getTpl() }:{uri:'file:///android_asset/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}
/> />
</View> </View>