在软件内部打开一个网页--不喜欢它没有办法返回,还需要再添加返回按钮==
import React from ‘react‘; import { AppRegistry, Component, ScrollView, TouchableOpacity, Text, View, WebView } from ‘react-native‘; export default class WebViewView extends React.Component { render() { var url = this.props.stateParams; return ( <WebView ref="webview" automaticallyAdjustContentInsets={false} style={{backgroundColor:‘rgba(255,255,255,0.8)‘, height:350}} source={{uri:url}} javaScriptEnabled={true} domStorageEnabled={true} decelerationRate="normal" startInLoadingState={true} /> ) } }
时间: 2024-11-19 00:55:08