How to turn off side sliding in uniapp: First find and open "manifestjson"; then configure the content to ""popGesture": "none"" to disable the response to the left sliding animation.
The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, DELL G3 computer.
uniapp prohibits single-page sliding back
Globally prohibits configuring "popGesture": "none" in manifestjson //Whether sliding on the left side of the screen to close the current page is supported on iOS . The default is to turn it off. If set to none, it will not respond to the left sliding animation
https://uniapp.dcloud.io/collocation/manifest?id=%e5%ae%8c%e6%95%b4-manifestjson
// 单页面调用5+ Api // #ifdef APP-PLUS var page = this.$mp.page.$getAppWebview(); page.setStyle({ popGesture: 'none' }); // #endif
Disable the return button of the navigation bar and the return of the entity return key on the Android side
Use the onBackPress(event) life cycle function
https://ask.dcloud.net.cn/article/35120
Recommendation: "uniapp tutorial"
The above is the detailed content of How to turn off sideslip in uniapp. For more information, please follow other related articles on the PHP Chinese website!