Home  >  Article  >  Web Front-end  >  How to turn off sideslip in uniapp

How to turn off sideslip in uniapp

藏色散人
藏色散人Original
2021-03-16 10:39:526278browse

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.

How to turn off sideslip in uniapp

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn