Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 当我只是添加一个标签来刷新(拉)web视图时,为什么ui会改变?_Javascript_Reactjs_React Native_Npm - Fatal编程技术网

Javascript 当我只是添加一个标签来刷新(拉)web视图时,为什么ui会改变?

Javascript 当我只是添加一个标签来刷新(拉)web视图时,为什么ui会改变?,javascript,reactjs,react-native,npm,Javascript,Reactjs,React Native,Npm,我只是想在我的react原生webveiew应用程序中提供对referesh的访问。 我使用了一个名为react native pull的库来刷新并使用了标记,在那里我的ui被更改了。 webview向下移动,上半部分被标记占据 这是密码 render() { return ( <View style={styles.container}> <PTRView style={{}} onRefresh={()=>{this.Gymkhana.relo

我只是想在我的react原生webveiew应用程序中提供对referesh的访问。 我使用了一个名为react native pull的库来刷新并使用了标记,在那里我的ui被更改了。 webview向下移动,上半部分被标记占据 这是密码

  render() {
    return (
      <View style={styles.container}>
<PTRView style={{}} onRefresh={()=>{this.Gymkhana.reload()}} />


        <WebView
          source={{ uri: "http://www.gymkhana.iitkgp.ac.in/index.php" }}
          domStorageEnabled={true}
          startInLoadingState={true}
          renderLoading={this.ActivityIndicatorLoadingView}
          ref={ref => (this.Gymkhana = ref)}
        />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: "center"
  },

});
render(){
返回(
{this.Gymkhana.reload()}}/>
(this.Gymkhana=ref)}
/>
);
}
}
const styles=StyleSheet.create({
容器:{
弹性:1,
为内容辩护:“中心”
},
});

请解决我的错误

问题可能是由于您不直接使用它造成的,您应该将内容包装在
PTRView
中,而不仅仅将其作为单独的元素使用。参考文件:

render(){
返回(
{this.Gymkhana.reload()}}>
(this.Gymkhana=ref)}
/>
);
}
}
const styles=StyleSheet.create({
容器:{
弹性:1,
为内容辩护:“中心”
},

});我已经按你说的那样使用了,然后webview就完全消失了。所以我是这样使用的。然后你必须给你的视图添加一些阶梯,在view或webview上设置高度。当我给webview设置高度时,它不起作用。它限制了网站内部的高度。我们可以在其他平台上连接吗?我会详细讨论的