增加webview 控制

This commit is contained in:
DevWiki 2024-04-30 16:06:13 +08:00
parent c027ac9087
commit 1bddf62724

View File

@ -22,7 +22,8 @@ export struct WebPage {
onBackPress(): boolean | void { onBackPress(): boolean | void {
if (this.webViewController?.accessBackward()) { if (this.webViewController?.accessBackward()) {
this.webViewController?.backward(); this.webViewController?.backward();
return false; } else {
this.getUIContext().getRouter().back();
} }
return true; return true;
} }