需要配置两个地方
第一在onLaunch中写下如下代码
plus.screen.lockOrientation("portrait-primary");
第二在manifest.json中配置
"app-plus" : {
"distribute" : {
"distribute" : {
"orientation" : [ "portrait-primary"]//重力感应、横竖屏配置
}
},
},
网友评论