From 717e165f47c012479537aac57bb7c37a6e9374ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E5=8B=A4=E6=B0=91?= Date: Mon, 27 Oct 2025 17:50:52 +0800 Subject: [PATCH] =?UTF-8?q?fix(webview):=20=E4=BF=AE=E6=94=B9=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E6=A8=A1=E5=BC=8F=E4=B8=BA=E5=9C=A8=E7=BA=BF=E4=BC=98?= =?UTF-8?q?=E5=85=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将WebView的缓存模式从None更改为Online - 确保网页内容优先从网络加载 -保持其他WebView配置不变 --- src/main/ets/pages/XWebview.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/ets/pages/XWebview.ets b/src/main/ets/pages/XWebview.ets index 2305c12..1438370 100644 --- a/src/main/ets/pages/XWebview.ets +++ b/src/main/ets/pages/XWebview.ets @@ -191,7 +191,7 @@ export struct XWebview { .mixedMode(MixedMode.All)//允许加载HTTP和HTTPS混合内容 .zoomAccess(this.zoomAccess ?? false)//不支持手势进行缩放 .mediaPlayGestureAccess(false)//有声视频播放不需要用户手动点击 - .cacheMode(CacheMode.None)//设置缓存模式 + .cacheMode(CacheMode.Online)//设置缓存模式 .onConfirm((event) => { // 自定义Confirm弹窗 if (event) { console.log("event.url:" + event.url)