fix(xwebview): bypass page cache in debug
这个提交包含在:
父节点
4a00fc39f0
当前提交
c0d7115211
@ -513,6 +513,10 @@ export function XWebViewView({
|
|||||||
ref={webViewRef}
|
ref={webViewRef}
|
||||||
source={source}
|
source={source}
|
||||||
style={styles.webview}
|
style={styles.webview}
|
||||||
|
// Debug 页面必须直接读取服务器最新资源,避免 WebView 磁盘缓存让 H5 与
|
||||||
|
// Metro 宿主代码处于不同版本。Release 仍使用系统缓存,保证正常加载性能。
|
||||||
|
cacheEnabled={!__DEV__}
|
||||||
|
cacheMode={__DEV__ ? 'LOAD_NO_CACHE' : 'LOAD_DEFAULT'}
|
||||||
onLoadStart={() => {
|
onLoadStart={() => {
|
||||||
setLoadError(null)
|
setLoadError(null)
|
||||||
setShowProgress(true)
|
setShowProgress(true)
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户