From 2fe633b87324839bae21d89de82b0dc42a222762 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Fri, 17 Jul 2020 16:51:32 +0800 Subject: [PATCH] docs: onBackPress tips --- docs/collocation/frame/lifecycle.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/collocation/frame/lifecycle.md b/docs/collocation/frame/lifecycle.md index e2e476ce4..f27dfc6c0 100644 --- a/docs/collocation/frame/lifecycle.md +++ b/docs/collocation/frame/lifecycle.md @@ -72,6 +72,7 @@ - 如果想实现滚动时标题栏透明渐变,在App和H5下,可在pages.json中配置titleNView下的type为transparent,[参考](https://uniapp.dcloud.io/collocation/pages?id=app-titlenview)。 - 如果需要滚动吸顶固定某些元素,推荐使用css的粘性布局,参考[插件市场](https://ext.dcloud.net.cn/plugin?id=715)。插件市场也有其他js实现的吸顶插件,但性能不佳,需要时可自行搜索。 - 在App、微信小程序、H5中,也可以使用wxs监听滚动,[参考](https://uniapp.dcloud.io/frame?id=wxs);在app-nvue中,可以使用bindingx监听滚动,[参考](https://uniapp.dcloud.io/use-weex?id=nvue-%e9%87%8c%e4%bd%bf%e7%94%a8-bindingx)。 +- `onBackPress`上不可使用`async`,会导致无法阻止默认返回 ```js onPageScroll : function(e) { //nvue暂不支持滚动监听,可用bindingx代替 -- GitLab