From 8326e10f46e3fccdc8b9ec9fa0e3f00c6c5c2a14 Mon Sep 17 00:00:00 2001 From: yinjiacheng Date: Wed, 24 Jan 2024 12:06:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0web-view=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web-view-local/web-view-local.uvue | 18 +++++++++--------- pages/component/web-view/web-view.uvue | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pages/component/web-view-local/web-view-local.uvue b/pages/component/web-view-local/web-view-local.uvue index 89300c89..d7468acf 100644 --- a/pages/component/web-view-local/web-view-local.uvue +++ b/pages/component/web-view-local/web-view-local.uvue @@ -1,6 +1,6 @@ @@ -13,23 +13,23 @@ } }, methods: { - message(event : WebViewMessageEvent) { - console.log(JSON.stringify(event.detail)); + message(event : UniWebViewMessageEvent) { + console.log(JSON.stringify(event)); uni.showModal({ content: JSON.stringify(event.detail), showCancel: false }); }, - error(event : WebViewErrorEvent) { + error(event : UniWebViewErrorEvent) { this.loadError = true - console.log(JSON.stringify(event.detail)); + console.log(JSON.stringify(event)); }, - loading(event : WebViewLoadingEvent) { - console.log(JSON.stringify(event.type)); + loading(event : UniWebViewLoadingEvent) { + console.log(JSON.stringify(event)); }, - loaded(event : WebViewLoadedEvent) { + load(event : UniWebViewLoadEvent) { this.loadFinish = true; - console.log(JSON.stringify(event.type)); + console.log(JSON.stringify(event)); } } } diff --git a/pages/component/web-view/web-view.uvue b/pages/component/web-view/web-view.uvue index d8fc32bb..0db4dd42 100644 --- a/pages/component/web-view/web-view.uvue +++ b/pages/component/web-view/web-view.uvue @@ -1,7 +1,7 @@