提交 77b141a8 编写于 作者: DCloud-yyl's avatar DCloud-yyl

半屏弹窗示例添加back键处理逻辑:弹窗时点击back键先关闭弹窗

上级 2668ced9
......@@ -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;
}
}
</script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册