diff --git a/pages/template/half-screen/half-screen.uvue b/pages/template/half-screen/half-screen.uvue index 35721e87ca92d9bed74642d4c1f609cffb7ad8fa..b807d4e4ada144f999640cfb973d2a190c18d67e 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; } }