From 01bf6c769c422fddb06e929f603383b24085a77e Mon Sep 17 00:00:00 2001 From: zhangxCode Date: Tue, 10 Feb 2026 10:01:48 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:=20#IDQ0RY]=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9react-native-keyboard-controller=E7=9A=84=E6=8C=87?= =?UTF-8?q?=E5=AF=BC=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangxCode --- en/react-native-keyboard-controller.md | 9 ++++----- zh-cn/react-native-keyboard-controller.md | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/en/react-native-keyboard-controller.md b/en/react-native-keyboard-controller.md index fd3a68b1a..395596760 100644 --- a/en/react-native-keyboard-controller.md +++ b/en/react-native-keyboard-controller.md @@ -192,7 +192,7 @@ Method 2: Directly link to the source code. > [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). -### 3. Configuring CMakeLists and Introducing RNKeyboardControllerPackage and RNStatusBarManagerCompatPackage +### 3. Configuring CMakeLists and Introducing RNKeyboardControllerPackage > If you are using version <= 1.12.7-0.0.5, please skip this chapter. @@ -253,18 +253,17 @@ std::vector> PackageProvider::getPackages(Package::Cont } ``` -### 4. Introducing RNKeyboardControllerPackage and RNStatusBarManagerCompatPackage to ArkTS +### 4. Introducing RNKeyboardControllerPackage to ArkTS Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: ```diff -+ import {RNKeyboardControllerPackage,RNStatusBarManagerCompatPackage} from "@react-native-ohos/react-native-keyboard-controller/ts"; ++ import {RNKeyboardControllerPackage} from "@react-native-ohos/react-native-keyboard-controller/ts"; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), -+ new RNKeyboardControllerPackage(ctx), -+ new RNStatusBarManagerCompatPackage(ctx) ++ new RNKeyboardControllerPackage(ctx) ]; } ``` diff --git a/zh-cn/react-native-keyboard-controller.md b/zh-cn/react-native-keyboard-controller.md index 9d2db61c3..c61ae4731 100644 --- a/zh-cn/react-native-keyboard-controller.md +++ b/zh-cn/react-native-keyboard-controller.md @@ -179,7 +179,7 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3. 配置 CMakeLists 和引入 RNKeyboardControllerPackage,RNStatusBarManagerCompatPackage +### 3. 配置 CMakeLists 和引入 RNKeyboardControllerPackage > 若使用的是 <= 1.12.7-0.0.5 版本,请跳过本章 @@ -242,18 +242,17 @@ std::vector> PackageProvider::getPackages(Package::Cont } ``` -### 4. 在 ArkTs 侧引入 RNKeyboardControllerPackage,RNStatusBarManagerCompatPackage +### 4. 在 ArkTs 侧引入 RNKeyboardControllerPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff -+ import {RNKeyboardControllerPackage,RNStatusBarManagerCompatPackage} from "@react-native-ohos/react-native-keyboard-controller/ts"; ++ import {RNKeyboardControllerPackage} from "@react-native-ohos/react-native-keyboard-controller/ts"; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), -+ new RNKeyboardControllerPackage(ctx), -+ new RNStatusBarManagerCompatPackage(ctx) ++ new RNKeyboardControllerPackage(ctx) ]; } ``` -- Gitee