HarmonyOS 单独某个页面不能横竖屏切换只能竖屏?

app设置了"orientation": “auto\_rotation\_unspecified”,但是有几个页面想设置只能竖屏可以实现吗

阅读 533
1 个回答

在aboutToAppear中做如下设置:setPreferredOrientation(window.Orientation.PORTRAIT)