问题:在安卓或者系统系统上调用横屏plus.screen.lockOrientation(‘landscape-primary’);失效。
解决方案:在manifest.json配置
代码如下: “flexible” : true, “screenOrientation” : [ “portrait-primary”, “landscape-primary” ],
/* 5+App特有相关 */
"app-plus" : {
"flexible" : true,
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"screenOrientation" : [ "portrait-primary", "landscape-primary" ],
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
配置好之后,记得重新打基座。这样就生效了。