From a68a94bf898f5eea2fc0fda979051915242070ee Mon Sep 17 00:00:00 2001 From: lizhongyi Date: Wed, 17 Apr 2024 19:00:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4webview=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/component/web-view-local/web-view-local.uvue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/component/web-view-local/web-view-local.uvue b/pages/component/web-view-local/web-view-local.uvue index d7468acf..4d1e8c30 100644 --- a/pages/component/web-view-local/web-view-local.uvue +++ b/pages/component/web-view-local/web-view-local.uvue @@ -15,8 +15,12 @@ methods: { message(event : UniWebViewMessageEvent) { console.log(JSON.stringify(event)); + let contentStr = JSON.stringify(event.detail); + + contentStr = JSON.stringify(event.detail.data[0]); + uni.showModal({ - content: JSON.stringify(event.detail), + content: contentStr, showCancel: false }); }, -- GitLab