uniapp,页面强制横屏以及隐藏状态栏方式

            hideStatusBar () {//隐藏状态栏
                plus.navigator.setFullscreen(true);
            },
            landscape(){//强制横屏安卓
                plus.screen.lockOrientation( 'landscape-secondary');
                plus.screen.lockOrientation( 'landscape-primary');
            },
// APP.vue,使用
onLaunch: function() { console.log('App Launch') // #ifdef APP-PLUS this.hideStatusBar(); this.landscape(); // #endif },
// 单页面在onLoad调用

 参考:

https://blog.csdn.net/qq_43299315/article/details/109812935
posted @ 2022-05-11 16:24  Deer_Lin  阅读(3105)  评论(0)    收藏  举报