提交 653ace97 编写于 作者: D DCloud_LXH

feat(app): page style add disableSwipeBack param

上级 299fd7df
...@@ -202,6 +202,8 @@ declare namespace UniApp { ...@@ -202,6 +202,8 @@ declare namespace UniApp {
animationType?: string animationType?: string
animationDuration?: number animationDuration?: number
subNVues?: PagesJsonPageStyleSubNVue[] subNVues?: PagesJsonPageStyleSubNVue[]
disableSwipeBack?: Boolean
popGesture?: 'close' | 'none'
} }
interface PageRouteMeta extends PagesJsonPageStyle { interface PageRouteMeta extends PagesJsonPageStyle {
id?: number id?: number
......
...@@ -199,6 +199,12 @@ function normalizePageStyle( ...@@ -199,6 +199,12 @@ function normalizePageStyle(
pageStyle.enablePullDownRefresh = true pageStyle.enablePullDownRefresh = true
pageStyle.pullToRefresh = normalizePullToRefresh(pageStyle) pageStyle.pullToRefresh = normalizePullToRefresh(pageStyle)
} }
if (platform === 'app') {
pageStyle.disableSwipeBack === true
? (pageStyle.popGesture = 'none')
: delete pageStyle.popGesture
delete pageStyle.disableSwipeBack
}
} }
pageStyle.isNVue = isNVue pageStyle.isNVue = isNVue
removePlatformStyle(pageStyle) removePlatformStyle(pageStyle)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册