From 6e5c186f0ec6b8a2f7bd5767e73c47c40f18358e Mon Sep 17 00:00:00 2001 From: liang_tao001 Date: Fri, 13 Jun 2025 10:11:47 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:=20#ICEWC5]:=20react-native-ori?= =?UTF-8?q?entation-locker=E6=96=87=E6=A1=A3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liang_tao001 --- en/react-native-orientation-locker.md | 14 ++++++++++++++ zh-cn/react-native-orientation-locker.md | 13 +++++++++++++ 2 files changed, 27 insertions(+) diff --git a/en/react-native-orientation-locker.md b/en/react-native-orientation-locker.md index 814e61ff..873262f6 100644 --- a/en/react-native-orientation-locker.md +++ b/en/react-native-orientation-locker.md @@ -313,6 +313,20 @@ This document is verified based on the following versions: 1. RNOH: 0.72.20; SDK: HarmonyOS NEXT Developer Beta1; IDE: DevEco Studio 5.0.3.200; ROM: 3.0.0.18; 2. RNOH: 0.72.33; SDK: OpenHarmony 5.0.0.71 (API Version 12 Release); IDE: DevEco Studio 5.0.3.900; ROM: NEXT.0.0.71; +### Permission Requirements +Due to the fact that this library obtains data from acceleration sensors, corresponding permissions need to be configured when using it. +The permissions need to be configured in the entry/src/main directory and added to module.json5 as follows:: + +```diff +... +"requestPermissions": [ +... ++ { ++ "name": "ohos.permission.ACCELEROMETER" ++ } + ] +``` + ## API > [!tip] The **Platform** column indicates the platform where the properties are supported in the original third-party library. diff --git a/zh-cn/react-native-orientation-locker.md b/zh-cn/react-native-orientation-locker.md index db74476f..45394872 100644 --- a/zh-cn/react-native-orientation-locker.md +++ b/zh-cn/react-native-orientation-locker.md @@ -318,6 +318,19 @@ ohpm install 1. RNOH: 0.72.20; SDK:HarmonyOS NEXT Developer Beta1; IDE:DevEco Studio 5.0.3.200; ROM:3.0.0.18; 2. RNOH: 0.72.33; SDK:OpenHarmony 5.0.0.71(API Version 12 Release); IDE:DevEco Studio 5.0.3.900; ROM:NEXT.0.0.71; +### 权限要求 +由于此库获取加速度传感器的数据,使用时需要配置对应的权限,权限需配置在entry/src/main目录下module.json5 中添加如下权限: + +```diff +... +"requestPermissions": [ +... ++ { ++ "name": "ohos.permission.ACCELEROMETER" ++ } + ] +``` + ## API > [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 -- Gitee