From 9bb26530188bd281e97587c59221aeacc30203b4 Mon Sep 17 00:00:00 2001 From: weixin_47469434 Date: Tue, 12 Aug 2025 17:36:23 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:#ICSLZ5]=20=E6=B7=BB=E5=8A=A00.?= =?UTF-8?q?77=206=E4=B8=AA=E4=B8=89=E6=96=B9=E5=BA=93=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: weixin_47469434 --- zh-cn/klarna-platform-colors.md | 41 ++++++++- zh-cn/react-native-doc-viewer.md | 39 +++++++- zh-cn/react-native-http-bridge.md | 38 +++++++- zh-cn/react-native-image-capinsets-next.md | 102 ++++++++++++++++++++- zh-cn/react-native-image-rotate.md | 36 +++++++- zh-cn/react-native-modal.md | 22 ++++- 6 files changed, 263 insertions(+), 15 deletions(-) diff --git a/zh-cn/klarna-platform-colors.md b/zh-cn/klarna-platform-colors.md index 2a2be928..dbe0ac0a 100644 --- a/zh-cn/klarna-platform-colors.md +++ b/zh-cn/klarna-platform-colors.md @@ -17,7 +17,13 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/platform-colors Releases](https://github.com/react-native-oh-library/platform-colors/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.4.0 |[@react-native-oh-tpl/platform-colors Releases](https://github.com/react-native-oh-library/platform-colors/releases)| 0.72 | +| 0.4.1 |[@react-native-ohos/platform-colors Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -26,19 +32,28 @@ #### **npm** ```bash +# 0.4.0 npm install @react-native-oh-tpl/platform-colors +# 0.4.1 +npm install @react-native-ohos/platform-colors ``` #### **yarn** ```bash +# 0.4.0 yarn add @react-native-oh-tpl/platform-colors +# 0.4.1 +yarn add @react-native-ohos/platform-colors ``` 生成资源文件: ```bash +# 0.4.0 npx @react-native-oh-tpl/platform-colors +# 0.4.1 +npx @react-native-ohos/platform-colors ``` > [!TIP] 第一次运行该命令时,它将提示您要为哪些平台生成文件,确定后将在工程根目录创建具有以下格式的文件: @@ -79,7 +94,10 @@ module.exports = { 资源文件生成后需要将harmony/AppScope/resources/内的生成的2个color文件复制到harmony工程的对应目录下。 ```bash +# 0.4.0 npx @react-native-oh-tpl/platform-colors +# 0.4.1 +npx @react-native-ohos/platform-colors ``` @@ -173,6 +191,8 @@ const styles = StyleSheet.create({ ## 使用 Codegen +> [!TIP] V0.4.1 for RN0.77 不需要执行 Codegen。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link @@ -205,12 +225,20 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 +- V0.4.0 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-oh-tpl/platform-colors": "file:../../node_modules/@react-native-oh-tpl/platform-colors/harmony/platform_colors.har" } ``` +- V0.4.1 +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/platform-colors": "file:../../node_modules/@react-native-ohos/platform-colors/harmony/platform_colors.har" + } +``` 点击右上角的 `sync` 按钮 @@ -231,7 +259,10 @@ ohpm install ```diff ... + // V0.4.0 + import { RNPlatformColorsPackage } from '@react-native-oh-tpl/platform-colors/ts'; + // V0.4.1 ++ import { RNPlatformColorsPackage } from '@react-native-ohos/platform-colors/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -260,7 +291,13 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/platform-colors Releases](https://github.com/react-native-oh-library/platform-colors/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.4.0 |[@react-native-oh-tpl/platform-colors Releases](https://github.com/react-native-oh-library/platform-colors/releases)| 0.72 | +| 0.4.1 |[@react-native-ohos/platform-colors Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 ## 属性 diff --git a/zh-cn/react-native-doc-viewer.md b/zh-cn/react-native-doc-viewer.md index 6a83e9c5..3d21be32 100644 --- a/zh-cn/react-native-doc-viewer.md +++ b/zh-cn/react-native-doc-viewer.md @@ -16,7 +16,13 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-doc-viewer Releases](https://github.com/react-native-oh-library/react-native-doc-viewer/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.7.8 |[@react-native-oh-tpl/react-native-doc-viewer Releases](https://github.com/react-native-oh-library/react-native-doc-viewer/releases)| 0.72 | +| 2.7.9 |[@react-native-ohos/react-native-doc-viewer Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +31,19 @@ #### **npm** ```bash +# 2.7.8 npm install @react-native-oh-tpl/react-native-doc-viewer +# 2.7.9 +npm install @react-native-ohos/react-native-doc-viewer ``` #### **yarn** ```bash +# 2.7.8 yarn add @react-native-oh-tpl/react-native-doc-viewer +# 2.7.9 +yarn add @react-native-ohos/react-native-doc-viewer ``` @@ -329,6 +341,8 @@ export default class DocumentViewerExample extends Component { ## 使用 Codegen +> [!TIP] V2.7.9 for RN0.77 不需要执行 Codegen。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link @@ -361,6 +375,8 @@ export default class DocumentViewerExample extends Component { 打开 `entry/oh-package.json5`,添加以下依赖 +- V2.7.8 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -368,6 +384,15 @@ export default class DocumentViewerExample extends Component { } ``` +- V2.7.9 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-doc-viewer": "file:../../node_modules/@react-native-ohos/react-native-doc-viewer/harmony/doc_viewer.har" + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -387,8 +412,12 @@ ohpm install ```diff ... + // V2.7.8 + import { DocViewPackage } from "@react-native-oh-tpl/react-native-doc-viewer/ts" + // V2.7.9 ++ import { DocViewPackage } from "@react-native-ohos/react-native-doc-viewer/ts" + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), @@ -416,7 +445,13 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-doc-viewer Releases](https://github.com/react-native-oh-library/react-native-doc-viewer/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.7.8 |[@react-native-oh-tpl/react-native-doc-viewer Releases](https://github.com/react-native-oh-library/react-native-doc-viewer/releases)| 0.72 | +| 2.7.9 |[@react-native-ohos/react-native-doc-viewer Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 ## API diff --git a/zh-cn/react-native-http-bridge.md b/zh-cn/react-native-http-bridge.md index fc607b8a..e8f48069 100644 --- a/zh-cn/react-native-http-bridge.md +++ b/zh-cn/react-native-http-bridge.md @@ -16,7 +16,13 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-http-bridge Releases](https://github.com/react-native-oh-library/react-native-http-bridge/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.6.1 |[@react-native-oh-tpl/react-native-http-bridge Releases](https://github.com/react-native-oh-library/react-native-http-bridge/releases)| 0.72 | +| 0.6.2 |[@react-native-ohos/react-native-http-bridge Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +31,20 @@ #### **npm** ```bash +# 0.6.1 npm install @react-native-oh-tpl/react-native-http-bridge +# 0.6.2 +npm install @react-native-ohos/react-native-http-bridge + ``` #### **yarn** ```bash +# 0.6.1 yarn add @react-native-oh-tpl/react-native-http-bridge +# 0.6.2 +yarn add @react-native-ohos/react-native-http-bridge ``` @@ -139,6 +152,8 @@ export default HttpBridgeDemo; ## 使用 Codegen +> [!TIP] V0.6.2 for RN0.77 不需要执行 Codegen。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link @@ -173,6 +188,7 @@ export default HttpBridgeDemo; 打开 `entry/oh-package.json5`,添加以下依赖 +- V0.6.1 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -180,6 +196,14 @@ export default HttpBridgeDemo; } ``` +- V0.6.2 +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-http-bridge": "file:../../node_modules/@react-native-ohos/react-native-http-bridge/harmony/http_bridge.har" + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -199,8 +223,12 @@ ohpm install ```diff ... + // V0.6.1 + import { RNHttpBridgePackage } from "@react-native-oh-tpl/react-native-http-bridge/ts"; + // V0.6.2 ++ import { RNHttpBridgePackage } from "@react-native-ohos/react-native-http-bridge/ts"; + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -229,7 +257,13 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-http-bridge Releases](https://github.com/react-native-oh-library/react-native-http-bridge/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.6.1 |[@react-native-oh-tpl/react-native-http-bridge Releases](https://github.com/react-native-oh-library/react-native-http-bridge/releases)| 0.72 | +| 0.6.2 |[@react-native-ohos/react-native-http-bridge Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 ### 权限要求 diff --git a/zh-cn/react-native-image-capinsets-next.md b/zh-cn/react-native-image-capinsets-next.md index 20525723..2b904b0f 100644 --- a/zh-cn/react-native-image-capinsets-next.md +++ b/zh-cn/react-native-image-capinsets-next.md @@ -16,7 +16,13 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-image-capinsets-next Releases](https://github.com/react-native-oh-library/react-native-image-capinsets-next/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.6.1 |[@react-native-oh-tpl/react-native-image-capinsets-next Releases](https://github.com/react-native-oh-library/react-native-image-capinsets-next/releases)| 0.72 | +| 0.6.2 |[@react-native-ohos/react-native-image-capinsets-next Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +31,21 @@ #### **npm** ```bash +# 0.6.1 npm install @react-native-oh-tpl/react-native-image-capinsets-next + +# 0.6.2 +npm install @react-native-ohos/react-native-image-capinsets-next ``` #### **yarn** ```bash +# 0.6.1 yarn add @react-native-oh-tpl/react-native-image-capinsets-next + +# 0.6.2 +yarn add @react-native-ohos/react-native-image-capinsets-next ``` @@ -121,6 +135,8 @@ export default YourImage; ## 使用 Codegen +> [!TIP] V0.6.2 for RN0.77 不需要执行 Codegen。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link @@ -153,13 +169,20 @@ export default YourImage; 打开 `entry/oh-package.json5`,添加以下依赖 +- V0.6.1 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-oh-tpl/react-native-image-capinsets-next": "file:../../node_modules/@react-native-oh-tpl/react-native-image-capinsets-next/harmony/rn_image_capinsets.har" } ``` - +- V0.6.2 +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-image-capinsets-next": "file:../../node_modules/@react-native-ohos/react-native-image-capinsets-next/harmony/rn_image_capinsets.har" + } +``` 点击右上角的 `sync` 按钮 或者在终端执行: @@ -173,13 +196,77 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.在 ArkTs 侧引入 RNCImageCapInsets 组件 +### 3.配置 CMakeLists 和引入 ImageCapinsetsNextPackage + +> [!TIP] 若使用的是 0.6.1 版本,请跳过本章。 + +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: + +``` +project(rnapp) +cmake_minimum_required(VERSION 3.4.1) +set(CMAKE_SKIP_BUILD_RPATH TRUE) +set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") +set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") +set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") +set(LOG_VERBOSITY_LEVEL 1) +set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") +set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") +set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use +add_compile_definitions(WITH_HITRACE_SYSTRACE) + +add_subdirectory("${RNOH_CPP_DIR}" ./rn) + +# RNOH_BEGIN: manual_package_linking_1 +add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-image-capinsets-next/src/main/cpp" ./rn-image-capinsets) +# RNOH_END: manual_package_linking_1 + +file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") + +add_library(rnoh_app SHARED + ${GENERATED_CPP_FILES} + "./PackageProvider.cpp" + "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" +) +target_link_libraries(rnoh_app PUBLIC rnoh) + +# RNOH_BEGIN: manual_package_linking_2 +target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) ++ target_link_libraries(rnoh_app PUBLIC rnoh_rn_image_capinsets) +# RNOH_END: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +``` +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "ImageCapinsetsNextPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), + std::make_shared(ctx), ++ std::make_shared(ctx), + }; +} +``` + +### 4.在 ArkTs 侧引入 RNCImageCapInsets 组件 找到 `function buildCustomRNComponent()`,一般位于 `entry/src/main/ets/pages/index.ets` 或 `entry/src/main/ets/rn/LoadBundle.ets`,添加: ```diff ... + // V0.6.1 + import { IMAGE_CAP_INSETS, RNCImageCapInsets } from "@react-native-oh-tpl/react-native-image-capinsets-next" + // V0.6.2 ++ import { IMAGE_CAP_INSETS, RNCImageCapInsets } from "@react-native-ohos/react-native-image-capinsets-next" @Builder export function buildCustomRNComponent(ctx: ComponentBuilderContext) { @@ -214,7 +301,10 @@ const arkTsComponentNames: Array = [ ```diff ... + // V0.6.1 + import { RNCImageCapInsetsPackage } from '@react-native-oh-tpl/react-native-image-capinsets-next/ts'; + // V0.6.2 ++ import { RNCImageCapInsetsPackage } from '@react-native-ohos/react-native-image-capinsets-next/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -243,7 +333,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-image-capinsets-next Releases](https://github.com/react-native-oh-library/react-native-image-capinsets-next/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.6.1 |[@react-native-oh-tpl/react-native-image-capinsets-next Releases](https://github.com/react-native-oh-library/react-native-image-capinsets-next/releases)| 0.72 | +| 0.6.2 |[@react-native-ohos/react-native-image-capinsets-next Releases]() | 0.77 | ## 属性 diff --git a/zh-cn/react-native-image-rotate.md b/zh-cn/react-native-image-rotate.md index c09f9076..f99646d1 100644 --- a/zh-cn/react-native-image-rotate.md +++ b/zh-cn/react-native-image-rotate.md @@ -17,7 +17,13 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-image-rotate Releases](https://github.com/react-native-oh-library/react-native-image-rotate/releases)。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.1.0 |[@react-native-oh-tpl/react-native-image-rotate Releases](https://github.com/react-native-oh-library/react-native-image-rotate/releases)| 0.72 | +| 2.1.1 |[@react-native-ohos/react-native-image-rotate Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -30,13 +36,19 @@ #### npm ```bash +# 2.1.0 npm install @react-native-oh-tpl/react-native-image-rotate +# 2.1.1 +npm install @react-native-ohos/react-native-image-rotate ``` #### yarn ```bash +# 2.1.0 yarn add @react-native-oh-tpl/react-native-image-rotate +# 2.1.1 +yarn add @react-native-ohos/react-native-image-rotate ``` 快速使用: @@ -137,6 +149,8 @@ const styles = StyleSheet.create({ ## 使用 Codegen +> [!TIP] V2.1.1 for RN0.77 不需要执行 Codegen。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link @@ -169,12 +183,20 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 +- V2.1.0 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-oh-tpl/react-native-image-rotate": "file:../../node_modules/@react-native-oh-tpl/react-native-image-rotate/harmony/imageRotate.har" } ``` +- V2.1.1 +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-image-rotate": "file:../../node_modules/@react-native-ohos/react-native-image-rotate/harmony/imageRotate.har" + } +``` 点击右上角的 `sync` 按钮 @@ -195,8 +217,10 @@ ohpm install ```diff ... - + // 2.1.0 + import { RNImageRotatePackage } from '@react-native-oh-tpl/react-native-image-rotate/ts'; + // 2.1.1 ++ import { RNImageRotatePackage } from '@react-native-ohos/react-native-image-rotate/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -225,7 +249,13 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-image-rotate Releases](https://github.com/react-native-oh-library/react-native-image-rotate/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.1.0 |[@react-native-oh-tpl/react-native-image-rotate Releases](https://github.com/react-native-oh-library/react-native-image-rotate/releases)| 0.72 | +| 2.1.1 |[@react-native-ohos/react-native-image-rotate Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 ## 静态方法 diff --git a/zh-cn/react-native-modal.md b/zh-cn/react-native-modal.md index 9091a6a9..71adbbb3 100644 --- a/zh-cn/react-native-modal.md +++ b/zh-cn/react-native-modal.md @@ -16,7 +16,13 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-modal Releases](https://github.com/react-native-oh-library/react-native-modal/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 13.0.1 |[@react-native-oh-tpl/react-native-modal Releases](https://github.com/react-native-oh-library/react-native-modal/releases)| 0.72 | +| 14.0.1 |[@react-native-ohos/react-native-modal Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +31,19 @@ #### **npm** ```bash +# 13.0.1 npm install @react-native-oh-tpl/react-native-modal +# 14.0.1 +npm install @react-native-ohos/react-native-modal ``` #### **yarn** ```bash +# 13.0.1 yarn add @react-native-oh-tpl/react-native-modal +# 14.0.1 +yarn add @react-native-ohos/react-native-modal ``` @@ -126,7 +138,13 @@ export default DefaultModal; 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-modal Releases](https://github.com/react-native-oh-library/react-native-modal/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 13.0.1 |[@react-native-oh-tpl/react-native-modal Releases](https://github.com/react-native-oh-library/react-native-modal/releases)| 0.72 | +| 14.0.1 |[@react-native-ohos/react-native-modal Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 ## 属性 -- Gitee