plus.screen.lockOrientation('landscape-primary');
pages.json,globalStyle设置"pageOrientation": "auto"
manifest.json,app-plus设置"screenOrientation": [ "portrait-primary", "portrait-secondary", "landscape-primary", "landscape-secondary" ]``"distribute": { "orientation": [ //可选,字符串数组类型,应用支持的横竖屏,**已废弃,使用screenOrientation配置** "portrait-primary", "portrait-secondary", "landscape-primary", "landscape-secondary" ] }
- 发布:2024-08-22 10:01
- 更新:2024-08-22 10:01
- 阅读:124
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win11
HBuilderX类型: 正式
HBuilderX版本号: 3.99
手机系统: iOS
手机系统版本号: iOS 17
手机厂商: 苹果
手机机型: iphone13 mini
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
plus.screen.lockOrientation('landscape-primary');
pages.json,globalStyle设置"pageOrientation": "auto"
manifest.json,app-plus设置"screenOrientation": [ "portrait-primary", "portrait-secondary", "landscape-primary", "landscape-secondary" ]``"distribute": { "orientation": [ //可选,字符串数组类型,应用支持的横竖屏,**已废弃,使用screenOrientation配置** "portrait-primary", "portrait-secondary", "landscape-primary", "landscape-secondary" ] }
plus.screen.lockOrientation('landscape-primary');
pages.json,globalStyle设置"pageOrientation": "auto"
manifest.json,app-plus设置"screenOrientation": [ "portrait-primary", "portrait-secondary", "landscape-primary", "landscape-secondary" ]``"distribute": { "orientation": [ //可选,字符串数组类型,应用支持的横竖屏,**已废弃,使用screenOrientation配置** "portrait-primary", "portrait-secondary", "landscape-primary", "landscape-secondary" ] }
预期结果:
跳转新页面横屏
跳转新页面横屏
实际结果:
跳转页面无效果
跳转页面无效果
bug描述:
设置横屏无效果
0 个回复