supervons / react-native-echarts-pro

A React-Native charts based on Apache ECharts, support various charts and map.
https://supervons.github.io/react-native-echarts-pro-docs/
MIT License
216 stars 33 forks source link

长时间在后台再打开webview白屏 #54

Closed VictorYuan666 closed 2 years ago

VictorYuan666 commented 2 years ago

iOS 偶现这个问题 搜了下应该是下面这个issue https://github.com/react-native-webview/react-native-webview/issues/2298

能否加下这个代码 <WebView source={{ uri: 'https://reactnative.dev' }} onContentProcessDidTerminate={(syntheticEvent) => { const { nativeEvent } = syntheticEvent; console.warn('Content process terminated, reloading', nativeEvent); this.refs.webview.reload(); }} />

supervons commented 2 years ago
      <WebView
        source={{ uri: "https://reactnative.dev" }}
        onContentProcessDidTerminate={syntheticEvent => {
          const { nativeEvent } = syntheticEvent;
          console.warn("Content process terminated, reloading", nativeEvent);
          this.refs.webview.reload();
        }}
      />

这里的 refs 引用对象并没有定义,这样会报错的吧。

supervons commented 2 years ago

长时间没回复,有最新消息前先关闭。