From 689ef27e9e506eecf92ade331e85d4e090760297 Mon Sep 17 00:00:00 2001 From: yinjiacheng Date: Fri, 15 Nov 2024 12:19:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0dialogPage=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/API/dialog-page/dialog-page.uvue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pages/API/dialog-page/dialog-page.uvue b/pages/API/dialog-page/dialog-page.uvue index b77b2032..2dc04c62 100644 --- a/pages/API/dialog-page/dialog-page.uvue +++ b/pages/API/dialog-page/dialog-page.uvue @@ -203,9 +203,8 @@ uni.closeDialogPage({}); }, setPageStyleForTest(style : UTSJSONObject) { - const pages = getDialogPages(); - const currentPage = pages[pages.length - 1]; - currentPage.setPageStyle(style); + const pages = this.$page.getDialogPages(); + if (pages.length > 0) pages[pages.length - 1].setPageStyle(style); } } } -- GitLab