Vue.js_移动端屏幕横屏的展示
http://www.html5plus.org/doc/zh_cn/device.html#plus.screen.lockOrientation一、这次开发中我们就用到了打开APP就要横屏的展示出来,上面的链接中就有一个方法 ,只要在进入的时候设置一下这个就可以mounted() {plus.screen.lockOrientation( 'la...
·
http://www.html5plus.org/doc/zh_cn/device.html#plus.screen.lockOrientation
一、这次开发中我们就用到了打开APP就要横屏的展示出来,上面的链接中就有一个方法 ,只要在进入的时候
设置一下这个就可以
mounted() {
plus.screen.lockOrientation( 'landscape-primary');
}
在页面初始化的时候将这句话写进去后,会发现在电脑端页面不出来,而且会报错plus找不到的错误,我们要将app打包然后放到Hbuider 下真机运行就可以了
更多推荐
已为社区贡献23条内容
所有评论(0)