diff --git a/zh-cn/react-native-amap-geolocation.md b/zh-cn/react-native-amap-geolocation.md index 58aa7f9fb68d9976cd0c607d5cf6f67b1b8a2644..eb7c35f70dbfae29a52c41d475bed981358b4516 100644 --- a/zh-cn/react-native-amap-geolocation.md +++ b/zh-cn/react-native-amap-geolocation.md @@ -19,7 +19,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-amap-geolocation Releases](https://github.com/react-native-oh-library/react-native-amap-geolocation/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.2.3 | [@react-native-oh-tpl/react-native-amap-geolocation Releases](https://github.com/react-native-oh-library/react-native-amap-geolocation/releases) | 0.72 | +| 1.2.4 | [@react-native-ohos/react-native-amap-geolocation Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -28,13 +35,19 @@ #### **npm** ```bash +#v1.2.3 npm install @react-native-oh-tpl/react-native-amap-geolocation +#v1.2.4 +npm install @react-native-ohos/react-native-amap-geolocation ``` #### **yarn** ```bash +#v1.2.3 yarn add @react-native-oh-tpl/react-native-amap-geolocation +#v1.2.4 +yarn add @react-native-ohos/react-native-amap-geolocation ``` @@ -274,6 +287,8 @@ export default AmapGeoLocationDemo; ## 使用 Codegen +> [!TIP] V1.2.4 不需要执行 Codegen。 + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 @@ -307,6 +322,8 @@ export default AmapGeoLocationDemo; 打开 `entry/oh-package.json5`,添加以下依赖 +- V1.2.3 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -314,6 +331,15 @@ export default AmapGeoLocationDemo; } ``` +- V1.2.4 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-amap-geolocation": "file:../../node_modules/@react-native-ohos/react-native-amap-geolocation/harmony/amap_geolocation.har" + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -327,13 +353,78 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.在 ArkTs 侧引入 AmapGeolocationPackage +### 3.配置 CMakeLists 和引入 ImageMarkerPackage + +> [!TIP] 若使用的是 1.2.3 版本,请跳过本章。 + +打开 `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-amap-geolocation/src/main/cpp" ./amap_geolocation) +# 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_amap_geolocation) +# RNOH_END: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +``` +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "AMapGeolocationPackage.h" + +using namespace rnoh; + +std::vector> PackageProvider::getPackages(Package::Context ctx) { + return { + std::make_shared(ctx), ++ std::make_shared(ctx), + }; +} +``` + + + +### 4.在 ArkTs 侧引入 AmapGeolocationPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff ... +//v1.2.3 + import {AMapGeolocationPackage} from '@react-native-oh-tpl/react-native-amap-geolocation/ts'; +//1.2.4 ++ import {AMapGeolocationPackage} from '@react-native-ohos/react-native-amap-geolocation/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -362,7 +453,12 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-amap-geolocation Releases](https://github.com/react-native-oh-library/react-native-amap-geolocation/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.2.3 | [@react-native-oh-tpl/react-native-amap-geolocation Releases](https://github.com/react-native-oh-library/react-native-amap-geolocation/releases) | 0.72 | +| 1.2.4 | [@react-native-ohos/react-native-amap-geolocation Releases]() | 0.77 | ### 权限要求 diff --git a/zh-cn/react-native-autoheight-webview.md b/zh-cn/react-native-autoheight-webview.md index 771bdcbc9cec6a29223eefc6e906bd01a4556246..d3b08a0d6309c108a6fbd01150310c5776c533c4 100644 --- a/zh-cn/react-native-autoheight-webview.md +++ b/zh-cn/react-native-autoheight-webview.md @@ -16,8 +16,13 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-autoheight-webview Releases](https://github.com/react-native-oh-library/react-native-autoheight-webview/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.6.5 | [@react-native-oh-tpl/react-native-autoheight-webview Releases](https://github.com/react-native-oh-library/react-native-autoheight-webview/releases) | 0.72 | +| 1.6.6 | [@react-native-ohos/react-native-autoheight-webview Releases]() | 0.77 | +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +30,21 @@ #### **npm** ```bash +# V1.6.5 npm install @react-native-oh-tpl/react-native-autoheight-webview + +# V1.6.6 +npm install @react-native-ohos/react-native-autoheight-webview ``` #### **yarn** ```bash +# V1.6.5 yarn add @react-native-oh-tpl/react-native-autoheight-webview + +# V1.6.6 +yarn add @react-native-ohos/react-native-autoheight-webview ``` @@ -85,7 +98,11 @@ export function WebviewExample() { 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[ @react-native-oh-tpl/react-native-autoheight-webview Releases](https://github.com/react-native-oh-library/react-native-autoheight-webview/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.6.5 | [@react-native-oh-tpl/react-native-autoheight-webview Releases](https://github.com/react-native-oh-library/react-native-autoheight-webview/releases) | 0.72 | +| 1.6.6 | [@react-native-ohos/react-native-autoheight-webview Releases]() | 0.77 | ## 属性 diff --git a/zh-cn/react-native-community-checkbox.md b/zh-cn/react-native-community-checkbox.md index c0d11b50d4ba0dd829af97b90613d54f2e51560c..2efed6702dd839910ca5b32faa9a3a4ec967e802 100644 --- a/zh-cn/react-native-community-checkbox.md +++ b/zh-cn/react-native-community-checkbox.md @@ -9,10 +9,11 @@ 该第三方库的仓库已迁移至 Gitee,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/checkbox`,具体版本所属关系如下: -| Version | Package Name | Repository | Release | -| ------------------------- | ------------------------------------------------- | ------------------ | -------------------------- | -| <= 0.5.16-0.1.0@deprecated | @react-native-oh-tpl/checkbox | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox/releases) | -| >= 0.5.17 | @react-native-ohos/checkbox | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases) | +| Version | Package Name | Repository | Release | Version for RN | +| ------------------------- | ------------------------------------------------- | ------------------ | -------------------------- | ------------------------- | +| <= 0.5.16-0.1.0@deprecated | @react-native-oh-tpl/checkbox | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox/releases) | 0.72 | +| >= 0.5.17 | @react-native-ohos/checkbox | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases)| 0.72 | +| >= 0.5.17 | @react-native-ohos/checkbox | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases)| 0.77 | ## 1. 安装与使用 @@ -23,12 +24,20 @@ #### **npm** ```bash +# <= V0.5.16-0.1.0 +npm install @react-native-oh-tpl/checkbox + +# >= V0.5.17 npm install @react-native-ohos/checkbox ``` #### **yarn** ```bash +# <= V0.5.16-0.1.0 +yarn add @react-native-oh-tpl/checkbox + +# >= V0.5.17 yarn add @react-native-ohos/checkbox ``` @@ -97,7 +106,14 @@ export default function CheckBoxExample() { > [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 打开 `entry/oh-package.json5`,添加以下依赖 - +- <= V0.5.16-0.1.0 +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-oh-tpl/checkbox": "file:../../node_modules/@react-native-oh-tpl/checkbox/harmony/checkbox.har", + } +``` +- \>= V0.5.17 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -133,7 +149,13 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) + +# <= V0.5.16-0.1.0 ++ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/checkbox/src/main/cpp" ./checkbox) + +# >= V0.5.17 + add_subdirectory("${OH_MODULES}/@react-native-ohos/checkbox/src/main/cpp" ./checkbox) + # RNOH_END: manual_package_linking_1 add_library(rnoh_app SHARED @@ -237,7 +259,12 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-ohos/checkbox Releases](https://gitee.com/openharmony-sig/rntpc_react-native-checkbox/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| Version | Package Name | Repository | Release | Version for RN | +| ------------------------- | ------------------------------------------------- | ------------------ | -------------------------- | ------------------------- | +| <= 0.5.16-0.1.0@deprecated | @react-native-oh-tpl/checkbox | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-checkbox/releases) | 0.72 | +| >= 0.5.17 | @react-native-ohos/checkbox | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases)| 0.72 | +| >= 0.5.17 | @react-native-ohos/checkbox | [GitCode](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox) | [GitCode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-checkbox/releases)| 0.77 | ## 4. 属性 diff --git a/zh-cn/react-native-fast-image.md b/zh-cn/react-native-fast-image.md index ff69b27e4bbf41e457eb3a8bf69793456c249449..232beef24ddc2b314501b8a1edcac8f0c63f1d7d 100644 --- a/zh-cn/react-native-fast-image.md +++ b/zh-cn/react-native-fast-image.md @@ -15,8 +15,15 @@ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-fast-image) ## 安装与使用 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 8.6.3 |[@react-native-oh-tpl/react-native-fast-image Releases](https://github.com/react-native-oh-library/react-native-fast-image/releases)| 0.72 | +| 8.6.4 |[@react-native-ohos/react-native-fast-image Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 + -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-fast-image Releases](https://github.com/react-native-oh-library/react-native-fast-image/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 > [!WARNING] react-native-fast-image组件在运行时会默认开启app.setImangeCacheCount 申请内存,可以通过globalThis.IsSetImageRawDataCacheSize赋值进行关闭,关闭后图片比较多时会影响解码速度,可以通过在业务逻辑自定义app.setImangeCacheCount 内存申请,提高解码速度,[参考连接](https://github.com/react-native-oh-library/react-native-fast-image/blob/sig/harmony/fast_image/src/main/ets/FastImagePackage.ts)。 @@ -27,14 +34,22 @@ #### **npm** ```bash +#v8.6.3 npm install @react-native-oh-tpl/react-native-fast-image + +#v8.6.4 +npm install @react-native-ohos/react-native-fast-image ``` #### **yarn** ```bash +#v8.6.3 yarn add @react-native-oh-tpl/react-native-fast-image -``` + +#v8.6.4 +yard add @react-native-ohos/react-native-fast-image +`` @@ -131,13 +146,20 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 +- V8.6.3 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-oh-tpl/react-native-fast-image": "file:../../node_modules/@react-native-oh-tpl/react-native-fast-image/harmony/fast_image.har" } ``` - +- V8.6.4 +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-fast-image": "file:../../node_modules/@react-native-ohos/react-native-fast-image/harmony/fast_image.har" + } +``` 点击右上角的 `sync` 按钮 或者在终端执行: @@ -173,7 +195,13 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) + +#V8.6.3 + add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-fast-image/src/main/cpp" ./fast-image) + +#V8.6.4 ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-fast-image/src/main/cpp" ./fast-image) + # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -213,7 +241,7 @@ std::vector> PackageProvider::getPackages(Package::Cont ### 4.在 ArkTs 侧引入 FastImagePackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: - +- V8.6.3 ```diff ... + import {FastImagePackage} from '@react-native-oh-tpl/react-native-fast-image/ts'; @@ -225,7 +253,18 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { ]; } ``` +- V8.6.4 +```diff + ... ++ import {FastImagePackage} from '@react-native-ohos/react-native-fast-image/ts'; +export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + return [ + new SamplePackage(ctx), ++ new FastImagePackage(ctx) + ]; +} +``` ### 5.运行 点击右上角的 `sync` 按钮 @@ -245,7 +284,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-fast-image Releases](https://github.com/react-native-oh-library/react-native-fast-image/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 8.6.3 |[@react-native-oh-tpl/react-native-fast-image Releases](https://github.com/react-native-oh-library/react-native-fast-image/releases)| 0.72 | +| 8.6.4 |[@react-native-ohos/react-native-fast-image Releases]() | 0.77 | ## 属性 diff --git a/zh-cn/react-native-image-marker.md b/zh-cn/react-native-image-marker.md index d153019f42bc17d352d7426d60587cbc302a89b0..14024fbaa9e3d825064e6922482db8c235d968e0 100644 --- a/zh-cn/react-native-image-marker.md +++ b/zh-cn/react-native-image-marker.md @@ -17,7 +17,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases)。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.2.6 | [@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases) | 0.72 | +| 1.2.7 | [@react-native-ohos/react-native-image-marker Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -28,13 +35,21 @@ #### **npm** ```bash +# V1.2.6 npm install @react-native-oh-tpl/react-native-image-marker + +# V1.2.7 +npm install @react-native-ohos/react-native-image-marker ``` #### **yarn** ```bash +# V1.2.6 yarn add @react-native-oh-tpl/react-native-image-marker + +# V1.2.7 +yarn add @react-native-ohos/react-native-image-marker ``` @@ -188,6 +203,10 @@ export const ImageMarkerText = () => { ## 使用 Codegen +> [!TIP] V1.2.7 不需要执行 Codegen。 + + + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link @@ -220,6 +239,8 @@ export const ImageMarkerText = () => { 打开 `entry/oh-package.json5`,添加以下依赖 +- V1.2.6 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -227,6 +248,15 @@ export const ImageMarkerText = () => { } ``` +- V1.2.7 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-image-marker": "file:../../node_modules/@react-native-ohos/react-native-image-marker/harmony/image_marker.har" + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -240,14 +270,78 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.在 ArkTs 侧引入 RNImageMarkerPackage +### 3.配置 CMakeLists 和引入 ImageMarkerPackage + +> [!TIP] 若使用的是 1.2.6 版本,请跳过本章。 + +打开 `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-marker/src/main/cpp" ./image-marker) +# 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_image_marker) +# RNOH_END: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +``` +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "ImageMarkerPackage.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 侧引入 RNImageMarkerPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff ... +// V1.2.6 + import {RNImageMarkerPackage} from '@react-native-oh-tpl/react-native-image-marker/ts'; +// V1.2.7 ++ import {RNImageMarkerPackage} from '@react-native-ohos/react-native-image-marker/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -257,7 +351,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 5.运行 点击右上角的 `sync` 按钮 @@ -276,7 +370,12 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.2.6 | [@react-native-oh-tpl/react-native-image-marker Releases](https://github.com/react-native-oh-library/react-native-image-marker/releases) | 0.72 | +| 1.2.7 | [@react-native-ohos/react-native-image-marker Releases]() | 0.77 | ### 权限要求 diff --git a/zh-cn/react-native-keyboard-accessory.md b/zh-cn/react-native-keyboard-accessory.md index 8e91e3e7579347c06d7d077ae234ea628de5ed2d..829851d1409113cb540062018497f5f00685185c 100644 --- a/zh-cn/react-native-keyboard-accessory.md +++ b/zh-cn/react-native-keyboard-accessory.md @@ -17,22 +17,35 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-keyboard-accessory Releases](https://github.com/react-native-oh-library/react-native-keyboard-accessory/releases)。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: -进入到工程目录并输入以下命令: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.1.16 | [@react-native-oh-tpl/react-native-keyboard-accessory Releases](https://github.com/react-native-oh-library/react-native-keyboard-accessory/releases) | 0.72 | +| 0.1.17 | [@react-native-ohos/react-native-keyboard-accessory Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 -。 +进入到工程目录并输入以下命令: #### **npm** ```bash +# V0.1.16 npm install @react-native-oh-tpl/react-native-keyboard-accessory + +# V0.1.17 +npm install @react-native-ohos/react-native-keyboard-accessor ``` #### **yarn** ```bash +# V0.1.16 yarn add @react-native-oh-tpl/react-native-keyboard-accessory + +# V0.1.17 +yarn add @react-native-ohos/react-native-keyboard-accessory ``` 下面的代码展示了这个库的基本使用场景: @@ -130,7 +143,12 @@ export default ViewExample; 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-keyboard-accessory Releases](https://github.com/react-native-oh-library/react-native-keyboard-accessory/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.1.16 | [@react-native-oh-tpl/react-native-keyboard-accessory Releases](https://github.com/react-native-oh-library/react-native-keyboard-accessory/releases) | 0.72 | +| 0.1.17 | [@react-native-ohos/react-native-keyboard-accessory Releases]() | 0.77 | ## 属性 diff --git a/zh-cn/react-native-keyboard-aware-scroll-view.md b/zh-cn/react-native-keyboard-aware-scroll-view.md index 2a9db5b2eaa883a1f2ee333e2ea3c467cd110a95..55e3da88eb6961d3a0a344b7b24ea8395de1aa85 100644 --- a/zh-cn/react-native-keyboard-aware-scroll-view.md +++ b/zh-cn/react-native-keyboard-aware-scroll-view.md @@ -16,22 +16,37 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-keyboard-aware-scroll-view Releases](https://github.com/react-native-oh-library/react-native-keyboard-aware-scroll-view/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.9.5 | [@react-native-oh-tpl/react-native-keyboard-aware-scroll-view Releases](https://github.com/react-native-oh-library/react-native-keyboard-aware-scroll-view/releases) | 0.72 | +| 0.9.6 | [@react-native-ohos/react-native-keyboard-aware-scroll-view Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: + #### **npm** ```bash +# V0.9.5 npm install @react-native-oh-tpl/react-native-keyboard-aware-scroll-view + +# V0.9.6 +npm install @react-native-ohos/react-native-keyboard-aware-scroll-view ``` #### **yarn** ```bash +# V0.9.5 yarn add @react-native-oh-tpl/react-native-keyboard-aware-scroll-view + +# V0.9.6 +yarn add @react-native-ohos/react-native-keyboard-aware-scroll-view ``` @@ -99,7 +114,12 @@ const styles = StyleSheet.create({ 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-keyboard-aware-scroll-view Releases](https://github.com/react-native-oh-library/react-native-keyboard-aware-scroll-view/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.9.5 | [@react-native-oh-tpl/react-native-keyboard-aware-scroll-view Releases](https://github.com/react-native-oh-library/react-native-keyboard-aware-scroll-view/releases) | 0.72 | +| 0.9.6 | [@react-native-ohos/react-native-keyboard-aware-scroll-view Releases]() | 0.77 | + ## 属性 diff --git a/zh-cn/react-native-mail.md b/zh-cn/react-native-mail.md index abedccde0a40e15e4106389f0708c6d5c1565417..6a5977bda7e14007c4c16d92dc6a04e05c1bce0d 100644 --- a/zh-cn/react-native-mail.md +++ b/zh-cn/react-native-mail.md @@ -18,7 +18,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-mail Releases](https://github.com/react-native-oh-library/react-native-mail/releases),并下载适用版本的 tgz 包 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 6.1.1 | [@react-native-oh-tpl/react-native-mail Releases](https://github.com/react-native-oh-library/react-native-mail/releases) | 0.72 | +| 6.1.2 | [@react-native-ohos/react-native-mail Releases]() | 0.77 | + +并下载适用版本的 tgz 包 进入到工程目录并输入以下命令: @@ -29,13 +36,21 @@ #### **npm** ```bash +# V6.1.1 npm install @react-native-oh-tpl/react-native-mail + +# V6.1.2 +npm install @react-native-ohos/react-native-mail ``` #### **yarn** ```bash +# V6.1.1 yarn add @react-native-oh-tpl/react-native-mail + +# V6.1.2 +yarn add @react-native-ohos/react-native-mail ``` @@ -109,6 +124,10 @@ export default class App extends Component { ## 使用 Codegen +> [!TIP] V6.1.2 不需要执行 Codegen。 + + + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link @@ -141,6 +160,8 @@ export default class App extends Component { 打开 `entry/oh-package.json5`,添加以下依赖 +- V6.1.1 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -148,6 +169,15 @@ export default class App extends Component { } ``` +- V6.1.2 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-mail": "file:../../node_modules/@react-native-ohos/react-native-mail/harmony/mail.har" + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -161,14 +191,79 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.在 ArkTs 侧引入 RNMailPackage +### 3.配置 CMakeLists 和引入 MailPackage + +> [!TIP] 若使用的是 6.1.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-mail/src/main/cpp" ./mail) +# 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_mail) +# RNOH_END: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +``` +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "MailPackage.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 侧引入 RNMailPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff ... +// V6.1.1 + import {RNMailPackage} from '@react-native-oh-tpl/react-native-mail/ts'; +// V6.1.2 ++ import {RNMailPackage} from '@react-native-ohos/react-native-mail/ts'; + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), @@ -177,7 +272,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 5.运行 点击右上角的 `sync` 按钮 @@ -196,7 +291,12 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-mail Releases](https://github.com/react-native-oh-library/react-native-mail/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 6.1.1 | [@react-native-oh-tpl/react-native-mail Releases](https://github.com/react-native-oh-library/react-native-mail/releases) | 0.72 | +| 6.1.2 | [@react-native-ohos/react-native-mail Releases]() | 0.77 | ## API diff --git a/zh-cn/react-native-screens.md b/zh-cn/react-native-screens.md index af3334432bc74fea45a82ea60dc092ae62f51965..872ceb7ebb5e6fe9cedd2b8be883b7dec1ec4c2f 100644 --- a/zh-cn/react-native-screens.md +++ b/zh-cn/react-native-screens.md @@ -12,7 +12,7 @@

-> [!TIP] [Github 地址](https://github.com/software-mansion/react-native-screens/tree/3.29.0) +> [!TIP] [Github 地址](https://github.com/software-mansion/react-native-screens/tree/4.13.1) ## 安装与使用 @@ -23,19 +23,36 @@ #### **npm** ```bash +#0.72 npm install @react-navigation/native npm install @react-native-oh-tpl/stack npm install @react-native-oh-tpl/react-native-safe-area-context npm install react-native-screens@3.29.0 + + +#0.77 +npm install @react-navigation/native +npm install @react-native-oh-tpl/stack +npm install @react-native-oh-tpl/react-native-safe-area-context +npm install react-native-screens@4.13.1 + ``` #### **yarn** ```bash +#0.72 yarn add @react-navigation/native yarn add @react-native-oh-tpl/stack yarn add @react-native-oh-tpl/react-native-safe-area-context yarn add react-native-screens@3.29.0 + + +#0.77 +yarn add @react-navigation/native +yarn add @react-native-oh-tpl/stack +yarn add @react-native-oh-tpl/react-native-safe-area-context +yarn add react-native-screens@4.13.1 ``` @@ -135,7 +152,9 @@ enableScreens(false); | Name | Description | Type | Required | Platform | HarmonyOS Support | |-----------------------------------------------------------|---------------------------------------------------------------------------------------|----------|----------|-------------|-------------------| | enableScreens | 支持原生及其 React Native View | function | No | iOS Android | Yes | +| screensEnabled | 检查是否启用了原生屏幕功能 | function | No | iOS Android | Yes | | enableFreeze | 对 react-freeze 的支持,使用 ReactSuspense 机制来防止 React 组件树的部分渲染 | function | No | iOS Android | Yes | +| freezeEnabled | 检查是否启用了冻结(Freeze)功能 | function | No | iOS Android | Yes | | createNativeStackNavigator | 提供屏幕切换的能力 | function | No | iOS Android | NO | | NativeStackNavigationProp | 切换页面属性的封装 | object | No | iOS Android | Yes | | NativeStackNavigationOptions | 导航栏属性设置封装 | object | No | iOS Android | NO | @@ -150,10 +169,14 @@ enableScreens(false); | onDisappear | 页面消失 | function | No | iOS Android | Yes | | onWillAppear | 页面将显示 | function | No | iOS Android | Yes | | onWillDisappear | 页面将消失 | function | No | iOS Android | Yes | +| onDismissed | 屏幕被返回手势或硬件返回键关闭时触发 | function | No | iOS Android | NO | +| onTransitionProgress | 转场动画进度更新时触发 | function | No | iOS Android | NO | | fullScreenSwipeEnabled | 全屏滑动 | property | No | iOS Android | Yes | +| shouldFreeze | 是否应该使用react-freeze来“冻结”屏幕 | property | No | iOS Android | NO | | gestureEnabled | 是否开启手势滑动 | property | No | iOS Android | Yes | | statusBarColor | 状态栏颜色 | property | No | iOS Android | No | | screenOrientation | 屏幕显示方向 | property | No | iOS Android | Yes | +| navigationBarTranslucent | 导航栏是否透明 | property | No | iOS Android | NO | | statusBarStyle | 状态栏样式 | property | No | iOS Android | Yes | | statusBarTranslucent | 状态栏是否透明化 | property | No | iOS Android | Yes | | statusBarHidden | 隐藏状态栏 | property | No | iOS Android | Yes | @@ -187,6 +210,62 @@ enableScreens(false); | onOpen | 展示搜索 | function | No | iOS Android | Yes | | headerIconColor | 图标颜色 | property | No | iOS Android | Yes | | shouldShowHintSearchIcon | 是否隐藏搜索图标 | property | No | iOS Android | Yes | +| ScreenStackItem | 屏幕栈子项 | object | No | iOS Android | No | +| ScreenFooter | 底部工具栏 | object | No | iOS Android | No | +| ScreenContentWrapper | 屏幕内容包装 | object | No | iOS Android | No | +| compatibilityFlags | 兼容性开关集合 | object | No | iOS Android | No | +| featureFlags | 特性开关集合 | object | No | iOS Android | No | +| customAnimationOnSwipe | 滑动关闭时是否触发自定义动画 | property | No | iOS | No | +| freezeOnBlur | 页面失焦时是否冻结 | property | No | iOS Android | No | +| fullScreenSwipeShadowEnabled | 全屏滑动时是否显示阴影 | property | No | iOS | No | +| homeIndicatorHidden | 是否隐藏底部指示器 | property | No | iOS | No | +| hideKeyboardOnSwipe | 滑动时是否隐藏键盘 | property | No | iOS | No | +| nativeBackButtonDismissalEnabled | 原生返回键是否启用关闭 | property | No | Android | No | +| navigationBarColor | 导航栏颜色 | property | No | Android | No | +| navigationBarHidden | 导航栏是否隐藏 | property | No | Android | No | +| onHeaderHeightChange | 标题栏高度变化回调 | function | No | iOS Android | No | +| onGestureCancel | 手势取消回调 | function | No | iOS Android | No | +| onHeaderBackButtonClicked | 标题栏返回按钮点击回调 | function | No | Android | No | +| onNativeDismissCancelled | 原生关闭被取消回调 | function | No | iOS | No | +| onSheetDetentChanged | 表单页高度变化回调 | function | No | iOS | No | +| preventNativeDismiss | 是否阻止原生关闭 | property | No | iOS | No | +| screenId | 屏幕唯一标识 | property | No | iOS | No | +| sheetAllowedDetents | 表单页允许的高度档位 | property | No | iOS | No | +| sheetElevation | 表单页阴影高度 | property | No | Android | No | +| sheetExpandsWhenScrolledToEdge | 滚动到边缘时表单页是否展开 | property | No | iOS | No | +| sheetCornerRadius | 表单页圆角半径 | property | No | iOS | No | +| sheetGrabberVisible | 表单页是否显示拖拽手柄 | property | No | iOS | No | +| sheetLargestUndimmedDetentIndex | 表单页最大未遮罩档位索引 | property | No | iOS | No | +| sheetInitialDetentIndex | 表单页初始档位索引 | property | No | iOS | No | +| statusBarAnimation | 状态栏动画类型 | property | No | iOS Android | No | +| swipeDirection | 滑动关闭方向 | property | No | iOS | No | +| transitionDuration | 转场动画时长 | property | No | iOS | No | +| unstable_sheetFooter | 表单页底部组件(不稳定) | property | No | Android | No | +| backButtonInCustomView | 返回按钮是否在自定义视图中 | property | No | iOS Android | No | +| backTitleFontFamily | 返回按钮标题字体 | property | No | iOS | No | +| backButtonDisplayMode | 返回按钮显示模式 | property | No | iOS | No | +| disableBackButtonMenu | 是否禁用返回按钮菜单 | property | No | iOS | No | +| hideShadow | 是否隐藏阴影 | property | No | iOS Android | No | +| largeTitle | 是否使用大标题 | property | No | iOS | No | +| largeTitleBackgroundColor | 大标题背景色 | property | No | iOS | No | +| largeTitleColor | 大标题颜色 | property | No | iOS | No | +| largeTitleFontFamily | 大标题字体 | property | No | iOS | No | +| largeTitleFontSize | 大标题字体大小 | property | No | iOS | No | +| largeTitleFontWeight | 大标题字体粗细 | property | No | iOS | No | +| largeTitleHideShadow | 大标题是否隐藏阴影 | property | No | iOS | No | +| onAttached | 标题栏附加回调 | function | No | iOS Android | No | +| onDetached | 标题栏分离回调 | function | No | iOS Android | No | +| titleFontFamily | 标题字体 | property | No | iOS Android | No | +| topInsetEnabled | 是否启用顶部内边距 | property | No | Android | No | +| autoCapitalize | 自动大写 | property | No | iOS Android | No | +| autoFocus | 自动聚焦 | property | No | Android | No | +| disableBackButtonOverride | 是否禁用返回键覆盖 | property | No | Android | No | +| hideNavigationBar | 是否隐藏导航栏 | property | No | iOS | No | +| hideWhenScrolling | 滚动时是否隐藏 | property | No | iOS | No | +| obscureBackground | 是否模糊背景 | property | No | iOS Android | No | +| placement | 搜索栏位置 | property | No | iOS | No | +| hintTextColor | 提示文本颜色 | property | No | Android | No | + ## 遗留问题 diff --git a/zh-cn/react-native-snap-carousel.md b/zh-cn/react-native-snap-carousel.md index 644cdc665d0580ed90dd203fed601cd7dbef755a..b1baa8dfb6931f4fa5640d32bd49c78bbbc16cc3 100644 --- a/zh-cn/react-native-snap-carousel.md +++ b/zh-cn/react-native-snap-carousel.md @@ -16,7 +16,13 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-library/react-native-snap-carousel Releases](https://github.com/react-native-oh-library/react-native-snap-carousel/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 3.9.1 |[@react-native-oh-tpl/react-native-snap-carousel Releases](https://github.com/react-native-oh-library/react-native-snap-carousel/releases)| 0.72 | +| 3.9.2 |[@react-native-ohos/react-native-snap-carousel Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,12 +31,20 @@ #### **npm** ```bash +# V3.9.1 npm install @react-native-oh-tpl/react-native-snap-carousel + +# V3.9.2 +npm install @react-native-ohos/react-native-snap-carousel ``` #### **yarn** ```bash +# V3.9.1 yarn add @react-native-oh-tpl/react-native-snap-carousel + +# V3.9.2 +yarn add @react-native-ohos/react-native-snap-carousel ``` @@ -119,7 +133,13 @@ const styles = StyleSheet.create({ 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-library/react-native-snap-carousel Releases](https://github.com/react-native-oh-library/react-native-snap-carousel/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 3.9.1 |[@react-native-oh-tpl/react-native-fast-image Releases](https://github.com/react-native-oh-library/react-native-fast-image/releases)| 0.72 | +| 3.9.2 |[@react-native-ohos/react-native-fast-image Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 ## 属性 diff --git a/zh-cn/react-native-text-size.md b/zh-cn/react-native-text-size.md index 263042e60bada3bb6042dc4bdf64ca98977642df..d3d9d3508e28afa8bceb93d886e6d7d3f80a3349 100644 --- a/zh-cn/react-native-text-size.md +++ b/zh-cn/react-native-text-size.md @@ -17,7 +17,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-text-size Releases](https://github.com/react-native-oh-library/react-native-text-size/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 4.0.0 | [@react-native-oh-tpl/react-native-text-size Releases](https://github.com/react-native-oh-library/react-native-text-size/releases) | 0.72 | +| 4.0.1 | [@react-native-ohos/react-native-text-size Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 + 进入到工程目录并输入以下命令: @@ -26,13 +33,21 @@ #### **npm** ```bash +# V4.0.0 npm install @react-native-oh-tpl/react-native-text-size + +# V4.0.1 +npm install @react-native-ohos/react-native-text-size ``` #### **yarn** ```bash +# V4.0.0 yarn add @react-native-oh-tpl/react-native-text-size + +# V4.0.1 +yarn add @react-native-ohos/react-native-text-size ``` @@ -187,6 +202,12 @@ export default function TextSizeExample() { } ``` +## 使用 Codegen + +> [!TIP] V4.0.1 不需要执行 Codegen。 + +本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](https://gitee.com/react-native-oh-library/usage-docs/blob/39316eccca7657d77dfdc9e90cfbf64e6a7713f3/zh-cn/codegen.md)。 + ## Link 目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 @@ -216,13 +237,20 @@ export default function TextSizeExample() { > [!TIP] har 包位于三方库安装路径的 `harmony` 文件夹下。 打开 `entry/oh-package.json5`,添加以下依赖 - +- V4.0.0 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-oh-tpl/react-native-text-size": "file:../../node_modules/@react-native-oh-tpl/react-native-text-size/harmony/text_size.har" } ``` +- V4.0.1 +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-oh-tpl/react-native-text-size": "file:../../node_modules/@react-native-ohos/react-native-text-size/harmony/text_size.har" + } +``` 点击右上角的 `sync` 按钮 @@ -259,7 +287,11 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) +# V4.0.0 + add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-text-size/src/main/cpp" ./text-size) + +# V4.0.1 ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-text-size/src/main/cpp" ./text-size) # RNOH_END: manual_package_linking_1 add_library(rnoh_app SHARED @@ -297,8 +329,11 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... + // V4.0.0 + import { RNTextSizePackage } from '@react-native-oh-tpl/react-native-text-size/ts'; + // V4.0.1 ++ import { RNTextSizePackage } from '@react-native-ohos/react-native-text-size/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ ... @@ -326,7 +361,13 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-text-size Releases](https://github.com/react-native-oh-library/react-native-text-size/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 4.0.0 | [@react-native-oh-tpl/react-native-text-size Releases](https://github.com/react-native-oh-library/react-native-text-size/releases) | 0.72 | +| 4.0.1 | [@react-native-ohos/react-native-text-size Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 ## API diff --git a/zh-cn/react-native-transitiongroup.md b/zh-cn/react-native-transitiongroup.md index c3b65569b69fd6debc7caa7e63c2a587e2907575..b315fdcbfc1173fdf71a06f9262744dd16d2a59a 100644 --- a/zh-cn/react-native-transitiongroup.md +++ b/zh-cn/react-native-transitiongroup.md @@ -17,7 +17,13 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-transitiongroup Releases](https://github.com/react-native-oh-library/react-native-transitiongroup/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.2.0 | [@react-native-oh-tpl/react-native-transitiongroup Releases](https://github.com/react-native-oh-library/react-native-transitiongroup/releases) | 0.72 | +| 1.2.1 | [@react-native-ohos/react-native-transitiongroup Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -26,13 +32,21 @@ #### **npm** ```bash +# V1.2.0 npm install @react-native-oh-tpl/react-native-transitiongroup + +# V1.2.1 +npm install @react-native-ohos/react-native-transitiongroup ``` #### **yarn** ```bash +# V1.2.0 yarn add @react-native-oh-tpl/react-native-transitiongroup + +# V1.2.1 +yarn add @react-native-ohos/react-native-transitiongroup ``` @@ -146,7 +160,12 @@ const styles = StyleSheet.create({ 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-transitiongroup Releases](https://github.com/react-native-oh-library/react-native-transitiongroup/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.2.0 | [@react-native-oh-tpl/react-native-transitiongroup Releases](https://github.com/react-native-oh-library/react-native-transitiongroup/releases) | 0.72 | +| 1.2.1 | [@react-native-ohos/react-native-transitiongroup Releases]() | 0.77 | + ## API diff --git a/zh-cn/react-native-tts.md b/zh-cn/react-native-tts.md index 9c6b9d3e21746463b49140e5cd80d1178278ade5..cfef30de3318cccc1a57d0c072ae7e704a0a3b35 100644 --- a/zh-cn/react-native-tts.md +++ b/zh-cn/react-native-tts.md @@ -18,7 +18,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-tts Releases](https://github.com/react-native-oh-library/react-native-tts/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 4.1.1 | [@react-native-oh-tpl/react-native-tts Releases](https://github.com/react-native-oh-library/react-native-tts/releases) | 0.72 | +| 4.1.2 | [@react-native-ohos/react-native-tts Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -27,13 +34,21 @@ #### **npm** ```bash +# V4.1.1 npm install @react-native-oh-tpl/react-native-tts + +# V4.1.2 +npm install @react-native-ohos/react-native-tts ``` #### **yarn** ```bash +# V4.1.1 yarn add @react-native-oh-tpl/react-native-tts + +# V4.1.2 +yarn add @react-native-ohos/react-native-tts ``` @@ -182,6 +197,10 @@ const styles = StyleSheet.create({ ## 使用 Codegen +> [!TIP] V4.1.2 不需要执行 Codegen。 + + + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link @@ -214,6 +233,8 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 +- V4.1.1 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -221,6 +242,15 @@ const styles = StyleSheet.create({ } ``` +- V4.1.2 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-tts": "file:../../node_modules/@react-native-ohos/react-native-tts/harmony/rn_tts.har" + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -234,15 +264,80 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.在 ArkTs 侧引入 RNTTSPackage +### 3.配置 CMakeLists 和引入 TtsPackage + +> [!TIP] 若使用的是 4.1.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-tts/src/main/cpp" ./tts) +# 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_tts) +# RNOH_END: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +``` +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "TtsPackage.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 侧引入 RNTTSPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff ... +// V4.1.1 + import { RNTTSPackage } from '@react-native-oh-tpl/react-native-tts/ts'; +// V4.1.2 ++ import { RNTTSPackage } from '@react-native-ohos/react-native-tts/ts'; + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), @@ -251,7 +346,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 5.运行 点击右上角的 `sync` 按钮 @@ -270,7 +365,12 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-tts Releases](https://github.com/react-native-oh-library/react-native-tts/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 4.1.1 | [@react-native-oh-tpl/react-native-tts Releases](https://github.com/react-native-oh-library/react-native-tts/releases) | 0.72 | +| 4.1.2 | [@react-native-ohos/react-native-tts Releases]() | 0.77 | ## 静态方法 diff --git a/zh-cn/react-native-version-number.md b/zh-cn/react-native-version-number.md index 48f8a62026500c8eba79c38e5a84a232d70327eb..d3749e2ae17d39fe0d10b7ac1e1e9f4f08fea36f 100644 --- a/zh-cn/react-native-version-number.md +++ b/zh-cn/react-native-version-number.md @@ -18,7 +18,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.3.6 | [@react-native-oh-tpl/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/releases) | 0.72 | +| 0.3.7 | [@react-native-ohos/react-native-version-number Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -27,13 +34,21 @@ #### **npm** ```bash +# V0.3.6 npm install @react-native-oh-tpl/react-native-version-number + +# V0.3.7 +npm install @react-native-ohos/react-native-version-number ``` #### **yarn** ```bash +# V0.3.6 yarn add @react-native-oh-tpl/react-native-version-number + +# V0.3.7 +yarn add @react-native-ohos/react-native-version-number ``` @@ -59,6 +74,10 @@ export default function () { ## 使用 Codegen +> [!TIP] V0.3.7 不需要执行 Codegen。 + + + 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link @@ -91,6 +110,8 @@ export default function () { 打开 `entry/oh-package.json5`,添加以下依赖 +- V0.3.6 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -99,6 +120,16 @@ export default function () { } ``` +- V0.3.7 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + + "@react-native-ohos/react-native-version-number": "file:../../node_modules/@react-native-ohos/react-native-version-number/harmony/rnoh_version_number.har" + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -112,14 +143,79 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.在 ArkTs 侧引入 RNVersionNumberPackage +### 3.配置 CMakeLists 和引入 VersionNumberPackage + +> [!TIP] 若使用的是 0.3.6 版本,请跳过本章。 + +打开 `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-version-number/src/main/cpp" ./version_number) +# 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_version_number) +# RNOH_END: manual_package_linking_2 +``` + +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: + +``` +#include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" +#include "SamplePackage.h" ++ #include "VersionNumberPackage.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 侧引入 RNVersionNumberPackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff ... +// V0.3.6 + import {RNVersionNumberPackage} from '@react-native-oh-tpl/react-native-version-number/ts'; +// V0.3.7 ++ import {RNVersionNumberPackage} from '@react-native-ohos/react-native-version-number/ts'; + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), @@ -128,7 +224,7 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] { } ``` -### 4.运行 +### 5.运行 点击右上角的 `sync` 按钮 @@ -147,7 +243,12 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.3.6 | [@react-native-oh-tpl/react-native-version-number Releases](https://github.com/react-native-oh-library/react-native-version-number/releases) | 0.72 | +| 0.3.7 | [@react-native-ohos/react-native-version-number Releases]() | 0.77 | ## API