diff --git a/en/react-native-MJRefresh.md b/en/react-native-MJRefresh.md index 2b9de99f1ac622d728bb2985dfd672bc93f2dc65..10ccab2b368a479da77c897258d5ab533176463e 100644 --- a/en/react-native-MJRefresh.md +++ b/en/react-native-MJRefresh.md @@ -17,7 +17,14 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-library/react-native-MJRefresh Releases](https://github.com/react-native-oh-library/react-native-MJRefresh/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. +Please refer to the Releases page of the third-party library for the corresponding version information + +| Third-party Library Version | Release Information | Supported RN Version | +|-------| ------------------------------------------------------------ | ---------- | +| <= 0.7.0-0.2.2@deprecated | [@react-native-oh-tpl/react-native-MJRefresh Releases(deprecated)](https://github.com/react-native-oh-library/react-native-MJRefresh/releases) | 0.72 | +| 0.7.1 | [@react-native-ohos/react-native-MJRefresh Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-mjrefresh/releases) | 0.72 | + +For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. Go to the project directory and execute the following instruction: @@ -28,13 +35,13 @@ Go to the project directory and execute the following instruction: #### npm ```bash -npm install @react-native-oh-tpl/react-native-mjrefresh +npm install @react-native-ohos/react-native-mjrefresh ``` #### yarn ```bash -yarn add @react-native-oh-tpl/react-native-mjrefresh +yarn add @react-native-ohos/react-native-mjrefresh ``` @@ -123,7 +130,9 @@ export default class MjRefreshDemo extends Component<{}, State> { ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-mjrefresh@0.7.1 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -153,7 +162,7 @@ Open `entry/oh-package.json5` file and add the following dependencies: "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-mjrefresh": "file:../../node_modules/@react-native-oh-tpl/react-native-mjrefresh/harmony/mjrefresh.har" + "@react-native-ohos/react-native-mjrefresh": "file:../../node_modules/@react-native-ohos/react-native-mjrefresh/harmony/mjrefresh.har" } ``` @@ -172,6 +181,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing MJRefreshPackge +> If you are using version <= 0.7.0-0.2.2, please skip this chapter. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -192,7 +203,7 @@ 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-oh-tpl/react-native-mjrefresh/src/main/cpp" ./mjrefresh) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-mjrefresh/src/main/cpp" ./mjrefresh) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -246,7 +257,11 @@ Then build and run the code. To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -Check the release version information in the release address of the third-party library: [@react-native-oh-library/react-native-MJRefresh Releases](https://github.com/react-native-oh-library/react-native-MJRefresh/releases) +Verified in the following versions. + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## Properties diff --git a/en/react-native-community-datetimepicker.md b/en/react-native-community-datetimepicker.md index 7a440bbfe98cbe5dc08e0a7906d3d8f85c8452bc..7dfe475ec2ee092fd2dd4a102237f4afcfaef523 100644 --- a/en/react-native-community-datetimepicker.md +++ b/en/react-native-community-datetimepicker.md @@ -19,8 +19,9 @@ Please refer to the Release page of the corresponding third-party library for ve | Version | Releases | RN Version | | ---------- | ------------------------------------------------------------ | ---------- | -| 7.6.2 | [@react-native-oh-tpl/datetimepicker Releases](https://github.com/react-native-oh-library/datetimepicker/releases) | 0.72 | -| 8.4.3 | [@react-native-ohos/datetimepicker Releases]() | 0.77 | +| <= 7.6.2-0.1.1@deprecated | [@react-native-oh-tpl/datetimepicker Releases(deprecated)](https://github.com/react-native-oh-library/datetimepicker/releases) | 0.72 | +| 7.6.3 | [@react-native-ohos/datetimepicker Releases](https://gitcode.com/openharmony-sig/rntpc_datetimepicker/releases) | 0.72 | +| 8.4.3 | [@react-native-ohos/datetimepicker Releases](https://gitcode.com/openharmony-sig/rntpc_datetimepicker/releases) | 0.77 | For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. @@ -33,20 +34,12 @@ Go to the project directory and execute the following instruction: #### **npm** ```bash -# V7.6.2 -npm install @react-native-oh-tpl/datetimepicker - -# V8.4.3 npm install @react-native-ohos/datetimepicker ``` #### **yarn** ```bash -# V7.6.2 -yarn add @react-native-oh-tpl/datetimepicker - -# V8.4.3 yarn add @react-native-ohos/datetimepicker ``` @@ -109,7 +102,10 @@ export const MDatetimepicker = () => { ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/datetimepicker@7.6.3 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +This step provides guidance for manually configuring native dependencies. + Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -135,23 +131,13 @@ Method 1 (recommended): Use the HAR file. Open `entry/oh-package.json5` file and add the following dependencies: -- V7.6.2 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - - "@react-native-oh-tpl/datetimepicker": "file:../../node_modules/@react-native-oh-tpl/datetimepicker/harmony/datetimepicker.har" -} -``` -- V8.4.3 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-ohos/datetimepicker": "file:../../node_modules/@react-native-ohos/datetimepicker/harmony/datetimepicker.har" } +``` Click the `sync` button in the upper right corner. @@ -168,6 +154,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing datetimepicker +> If you are using version <= 7.6.2-0.1.1, please skip this chapter. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -189,10 +177,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -# V7.6.2 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/datetimepicker/src/main/cpp" ./datetimepicker) - -# V8.4.3 + add_subdirectory("${OH_MODULES}/@react-native-ohos/datetimepicker/src/main/cpp" ./datetimepicker) # RNOH_END: manual_package_linking_1 @@ -237,10 +221,6 @@ Find `function buildCustomRNComponent()`, which is usually located in `entry/src ```diff ... -// V7.6.2 -+ import { RNDateTimePicker, DATETIME_PICKER_VIEW_TYPE } from "@react-native-oh-tpl/datetimepicker" - -// V8.4.3 + import { RNDateTimePicker, DATETIME_PICKER_VIEW_TYPE } from "@react-native-ohos/datetimepicker" @Builder @@ -289,17 +269,11 @@ Then build and run the code. To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -Please refer to the Release page of the corresponding third-party library for version information: - -| Version | Releases | RN Releases | -| ---------- | ------------------------------------------------------------ | ---------- | -| 7.6.2 | [@react-native-oh-tpl/datetimepicker Releases](https://github.com/react-native-oh-library/datetimepicker/releases) | 0.72 | -| 8.4.3 | [@react-native-ohos/datetimepicker Releases]() | 0.77 | - -The content of this document has been verified based on the following versions: +Verified in the following versions. -1. RNOH: 0.72.98; SDK: HarmonyOS-5.0.0(API12); IDE: DevEco Studio 5.0.3.906; ROM: NEXT.0.0.71; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0.47 (API Version 20); IDE:DevEco Studio 6.0.0.858; ROM:6.0.0.107; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## Properties diff --git a/en/react-native-picker.md b/en/react-native-picker.md index baef455a3676b7d186a46d1e22ce4610f1c66ac2..7d10b8b7f43f47437b8587724e664d3d6c72eeb1 100644 --- a/en/react-native-picker.md +++ b/en/react-native-picker.md @@ -16,38 +16,29 @@ ## Installation and Usage - Please refer to the Release page of the corresponding third-party library for version information: + | Version | Releases | RN Version | -| ---------- | ------------------------------------------------------------ | ---------- | -| 4.3.9 | [@react-native-oh-tpl/react-native-picker Releases](https://github.com/react-native-oh-library/react-native-picker/releases) | 0.72 | -| 4.4.0 | [@react-native-ohos/react-native-picker Releases]() | 0.77 | +|-------| ------------------------------------------------------------ | ---------- | +| <= 4.3.9-0.0.8@deprecated | [@react-native-oh-tpl/react-native-picker Releases(deprecated)](https://github.com/react-native-oh-library/react-native-picker/releases) | 0.72 | +| 4.3.10 | [@react-native-ohos/react-native-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-picker/releases) | 0.72 | +| 4.4.0 | [@react-native-ohos/react-native-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-picker/releases) | 0.77 | For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. Go to the project directory and execute the following instruction: - - #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-picker - -# 0.77 npm install @react-native-ohos/react-native-picker ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-picker - -# 0.77 yarn add @react-native-ohos/react-native-picker ``` @@ -129,7 +120,9 @@ export default MyPicker; ## Link -Currently, HarmonyOS does not support AutoLink. Therefore, you need to manually configure the linking. +Version >= @react-native-ohos/react-native-picker@4.3.10 now supports Autolink without requiring manual configuration, currently only supports 72 frameworks. Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +This step provides guidance for manually configuring native dependencies. Open the `harmony` directory of the HarmonyOS project in DevEco Studio. @@ -154,19 +147,13 @@ Method 1 (recommended): Use the HAR file. Open `entry/oh-package.json5` file and add the following dependencies: -- 0.72 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-picker": "file:../../node_modules/@react-native-oh-tpl/react-native-picker/harmony/picker.har" + "@react-native-ohos/react-native-picker": "file:../../node_modules/@react-native-ohos/react-native-picker/harmony/picker.har" } ``` -- 0.77 -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-picker": "file:../../node_modules/@react-native-ohos/react-native-picker/harmony/picker.har" - } + Click the `sync` button in the upper right corner. Alternatively, run the following instruction on the terminal: @@ -182,6 +169,8 @@ Method 2: Directly link to the source code. ### 3. Configuring CMakeLists and Introducing PickerPackage +> If you are using version <= 4.3.9-0.0.8, please skip this chapter. + Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff @@ -202,9 +191,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -# 0.72 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-picker/src/main/cpp" ./picker) -# 0.77 + add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-picker/src/main/cpp" ./picker) # RNOH_END: manual_package_linking_1 @@ -248,9 +234,6 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... - // 0.72 -+ import { PickerViewPackage } from "@react-native-oh-tpl/react-native-picker/ts" - // 0.77 + import { PickerViewPackage } from "@react-native-ohos/react-native-picker/ts" export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -279,17 +262,11 @@ Then build and run the code. To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. +Verified in the following versions. -Please refer to the Release page of the corresponding third-party library for version information: -| Version | Releases | RN Version | -| ---------- | ------------------------------------------------------------ | ---------- | -| 4.3.9 | [@react-native-oh-tpl/react-native-picker Releases](https://github.com/react-native-oh-library/react-native-picker/releases) | 0.72 | -| 4.4.0 | [@react-native-ohos/react-native-picker Releases]() | 0.77 | - -The content of this document has been verified based on the following versions: - -1. RNOH: 0.72.98; SDK: HarmonyOS-5.0.0(API12); IDE: DevEco Studio 5.0.3.906; ROM: NEXT.0.0.71; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0.47 (API Version 20); IDE:DevEco Studio 6.0.0.858; ROM:6.0.0.107; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## Properties diff --git a/zh-cn/react-native-MJRefresh.md b/zh-cn/react-native-MJRefresh.md index 1d5f639f2b7b5f3cded836a0a062b30250c6f2bd..b72ace1be06af7f50b65e0e345b1fa1ca0e0d5d2 100644 --- a/zh-cn/react-native-MJRefresh.md +++ b/zh-cn/react-native-MJRefresh.md @@ -17,7 +17,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-library/react-native-MJRefresh Releases](https://github.com/react-native-oh-library/react-native-MJRefresh/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +|-------| ------------------------------------------------------------ | ---------- | +| <= 0.7.0-0.2.2@deprecated | [@react-native-oh-tpl/react-native-MJRefresh Releases(deprecated)](https://github.com/react-native-oh-library/react-native-MJRefresh/releases) | 0.72 | +| 0.7.1 | [@react-native-ohos/react-native-MJRefresh Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-mjrefresh/releases) | 0.72 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -26,13 +33,13 @@ #### npm ```bash -npm install @react-native-oh-tpl/react-native-mjrefresh +npm install @react-native-ohos/react-native-mjrefresh ``` #### yarn ```bash -yarn add @react-native-oh-tpl/react-native-mjrefresh +yarn add @react-native-ohos/react-native-mjrefresh ``` @@ -121,7 +128,10 @@ export default class MjRefreshDemo extends Component<{}, State> { ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-mjrefresh@0.7.1,已支持 Autolink,无需手动配置,目前只支持72框架。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -153,7 +163,7 @@ export default class MjRefreshDemo extends Component<{}, State> { "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-mjrefresh": "file:../../node_modules/@react-native-oh-tpl/react-native-mjrefresh/harmony/mjrefresh.har" + "@react-native-ohos/react-native-mjrefresh": "file:../../node_modules/@react-native-ohos/react-native-mjrefresh/harmony/mjrefresh.har" } ``` @@ -172,6 +182,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 MJRefreshPackge +> 若使用的是 <= 0.7.0-0.2.2 版本,请跳过本章。 + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -192,7 +204,7 @@ 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-oh-tpl/react-native-mjrefresh/src/main/cpp" ./mjrefresh) ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-mjrefresh/src/main/cpp" ./mjrefresh) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -246,7 +258,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-library/react-native-MJRefresh Releases](https://github.com/react-native-oh-library/react-native-MJRefresh/releases) +在以下版本验证通过: + +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 属性 diff --git a/zh-cn/react-native-community-datetimepicker.md b/zh-cn/react-native-community-datetimepicker.md index f334640a02582143a51a22bd61613e028daeb711..ad608b057efbc21388da651543591a8e74a00b65 100644 --- a/zh-cn/react-native-community-datetimepicker.md +++ b/zh-cn/react-native-community-datetimepicker.md @@ -20,8 +20,9 @@ | 三方库版本 | 发布信息 | 支持RN版本 | | ---------- | ------------------------------------------------------------ | ---------- | -| 7.6.2 | [@react-native-oh-tpl/datetimepicker Releases](https://github.com/react-native-oh-library/datetimepicker/releases) | 0.72 | -| 8.4.3 | [@react-native-ohos/datetimepicker Releases]() | 0.77 | +| <= 7.6.2-0.1.1@deprecated | [@react-native-oh-tpl/datetimepicker Releases(deprecated)](https://github.com/react-native-oh-library/datetimepicker/releases) | 0.72 | +| 7.6.3 | [@react-native-ohos/datetimepicker Releases](https://gitcode.com/openharmony-sig/rntpc_datetimepicker/releases) | 0.72 | +| 8.4.3 | [@react-native-ohos/datetimepicker Releases](https://gitcode.com/openharmony-sig/rntpc_datetimepicker/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -32,20 +33,12 @@ #### **npm** ```bash -# V7.6.2 -npm install @react-native-oh-tpl/datetimepicker - -# V8.4.3 npm install @react-native-ohos/datetimepicker ``` #### **yarn** ```bash -# V7.6.2 -yarn add @react-native-oh-tpl/datetimepicker - -# V8.4.3 yarn add @react-native-ohos/datetimepicker ``` @@ -108,7 +101,10 @@ export const MDatetimepicker = () => { ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/datetimepicker@7.6.3,已支持 Autolink,无需手动配置,目前只支持72框架。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -136,18 +132,6 @@ export const MDatetimepicker = () => { 打开 `entry/oh-package.json5`,添加以下依赖 -- V7.6.2 - -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - - "@react-native-oh-tpl/datetimepicker": "file:../../node_modules/@react-native-oh-tpl/datetimepicker/harmony/datetimepicker.har" -} -``` - -- V8.4.3 - ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -171,6 +155,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 datetimepicker +> 若使用的是 <= 7.6.2-0.1.1 版本,请跳过本章。 + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -192,10 +178,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -# V7.6.2 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/datetimepicker/src/main/cpp" ./datetimepicker) - -# V8.4.3 + add_subdirectory("${OH_MODULES}/@react-native-ohos/datetimepicker/src/main/cpp" ./datetimepicker) # RNOH_END: manual_package_linking_1 @@ -240,10 +222,6 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... -// V7.6.2 -+ import { RNDateTimePicker, DATETIME_PICKER_VIEW_TYPE } from "@react-native-oh-tpl/datetimepicker" - -// V8.4.3 + import { RNDateTimePicker, DATETIME_PICKER_VIEW_TYPE } from "@react-native-ohos/datetimepicker" @Builder @@ -291,17 +269,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: - -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 7.6.2 | [@react-native-oh-tpl/datetimepicker Releases](https://github.com/react-native-oh-library/datetimepicker/releases) | 0.72 | -| 8.4.3 | [@react-native-ohos/datetimepicker Releases]() | 0.77 | - -本文档内容基于以下版本验证通过: +在以下版本验证通过: -1. RNOH: 0.72.98; SDK: HarmonyOS-5.0.0(API12); IDE: DevEco Studio 5.0.3.906; ROM: NEXT.0.0.71; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0.47 (API Version 20); IDE:DevEco Studio 6.0.0.858; ROM:6.0.0.107; +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 属性 diff --git a/zh-cn/react-native-picker.md b/zh-cn/react-native-picker.md index 73e3c0289bc8e87036a495067360edd5418689e8..2ea7ba5e49ad3bcef3a4919faa24a0a49fe5cb0c 100644 --- a/zh-cn/react-native-picker.md +++ b/zh-cn/react-native-picker.md @@ -16,39 +16,29 @@ ## 安装与使用 +请到三方库的 Releases 发布地址查看配套的版本信息: - -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 4.3.9 | [@react-native-oh-tpl/react-native-picker Releases](https://github.com/react-native-oh-library/react-native-picker/releases) | 0.72 | -| 4.4.0 | [@react-native-ohos/react-native-picker Releases]() | 0.77 | +| 三方库版本 | 发布信息 | 支持RN版本 | +|-------| ------------------------------------------------------------ | ---------- | +| <= 4.3.9-0.0.8@deprecated | [@react-native-oh-tpl/react-native-picker Releases(deprecated)](https://github.com/react-native-oh-library/react-native-picker/releases) | 0.72 | +| 4.3.10 | [@react-native-ohos/react-native-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-picker/releases) | 0.72 | +| 4.4.0 | [@react-native-ohos/react-native-picker Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-picker/releases) | 0.77 | 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: - - #### **npm** ```bash -# 0.72 -npm install @react-native-oh-tpl/react-native-picker - -# 0.77 npm install @react-native-ohos/react-native-picker ``` #### **yarn** ```bash -# 0.72 -yarn add @react-native-oh-tpl/react-native-picker - -# 0.77 yarn add @react-native-ohos/react-native-picker ``` @@ -129,7 +119,10 @@ export default MyPicker; ``` ## Link -目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 +Version >= @react-native-ohos/react-native-picker@4.3.10,已支持 Autolink,无需手动配置,目前只支持72框架。 +Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md + +此步骤为手动配置原生依赖项的指导。 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony` @@ -157,18 +150,10 @@ export default MyPicker; 打开 `entry/oh-package.json5`,添加以下依赖 -- 0.72 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-picker": "file:../../node_modules/@react-native-oh-tpl/react-native-picker/harmony/picker.har" - } -``` -- 0.77 -```json -"dependencies": { - "@rnoh/react-native-openharmony": "file:../react_native_openharmony", - "@react-native-oh-tpl/react-native-picker": "file:../../node_modules/@react-native-ohos/react-native-picker/harmony/picker.har" + "@react-native-ohos/react-native-picker": "file:../../node_modules/@react-native-ohos/react-native-picker/harmony/picker.har" } ``` 点击右上角的 `sync` 按钮 @@ -186,6 +171,8 @@ ohpm install ### 3.配置 CMakeLists 和引入 PickerPackage +> 若使用的是 <= 4.3.9-0.0.8 版本,请跳过本章。 + 打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff @@ -206,10 +193,6 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -# 0.72 -+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-picker/src/main/cpp" ./picker) - -# 0.77 + add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-picker/src/main/cpp" ./picker) # RNOH_END: manual_package_linking_1 @@ -252,9 +235,6 @@ std::vector> PackageProvider::getPackages(Package::Cont 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff ... - // 0.72 -+ import { PickerViewPackage } from "@react-native-oh-tpl/react-native-picker/ts" - // 0.77 + import { PickerViewPackage } from "@react-native-ohos/react-native-picker/ts" export function createRNPackages(ctx: RNPackageContext): RNPackage[] { @@ -282,17 +262,11 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 4.3.9 | [@react-native-oh-tpl/react-native-picker Releases](https://github.com/react-native-oh-library/react-native-picker/releases) | 0.72 | -| 4.4.0 | [@react-native-ohos/react-native-picker Releases]() | 0.77 | - -本文档内容基于以下版本验证通过: - -1. RNOH: 0.72.98; SDK: HarmonyOS-5.0.0(API12); IDE: DevEco Studio 5.0.3.906; ROM: NEXT.0.0.71; -2. RNOH:0.77.18; SDK:HarmonyOS 6.0.0.47 (API Version 20); IDE:DevEco Studio 6.0.0.858; ROM:6.0.0.107; +在以下版本验证通过: +1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; +2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; ## 属性