From 77b141a8cd44266ed8a5c45e6563257533480c9b Mon Sep 17 00:00:00 2001 From: yanyilin Date: Fri, 12 Jan 2024 17:57:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8A=E5=B1=8F=E5=BC=B9=E7=AA=97=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E6=B7=BB=E5=8A=A0back=E9=94=AE=E5=A4=84=E7=90=86?= =?UTF-8?q?=E9=80=BB=E8=BE=91=EF=BC=9A=E5=BC=B9=E7=AA=97=E6=97=B6=E7=82=B9?= =?UTF-8?q?=E5=87=BBback=E9=94=AE=E5=85=88=E5=85=B3=E9=97=AD=E5=BC=B9?= =?UTF-8?q?=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/template/half-screen/half-screen.uvue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/template/half-screen/half-screen.uvue b/pages/template/half-screen/half-screen.uvue index 35721e87..b807d4e4 100644 --- a/pages/template/half-screen/half-screen.uvue +++ b/pages/template/half-screen/half-screen.uvue @@ -172,6 +172,13 @@ this.totalHeight = uni.getWindowInfo().windowHeight; this.halfNode?.style?.setProperty('top', this.totalHeight.toFixed(2)+'px'); this.halfNode?.style?.setProperty('visibility', 'hidden'); + }, + onBackPress(): boolean { + if('visible' == this.halfNode?.style?.getPropertyValue('visibility')){ + this.switchHalfScreen(false); + return true; + } + return false; } } -- GitLab