From f34e2be3eb851b7d65ff9faea0c50957c8244bf2 Mon Sep 17 00:00:00 2001 From: haoxuchao Date: Sun, 23 Nov 2025 10:32:00 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20[Issues:=20#ID82H5]=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0react-native-text-gradient=E6=8C=87=E5=AF=BC=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: haoxuchao --- en/react-native-text-gradient.md | 45 ++++++++++++++++++++++------- zh-cn/react-native-text-gradient.md | 45 ++++++++++++++++++++++++----- 2 files changed, 73 insertions(+), 17 deletions(-) diff --git a/en/react-native-text-gradient.md b/en/react-native-text-gradient.md index 3af56235..1788697e 100644 --- a/en/react-native-text-gradient.md +++ b/en/react-native-text-gradient.md @@ -19,23 +19,33 @@ Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-text-gradient Releases](https://github.com/react-native-oh-library/react-native-text-gradient/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. +| version | Releases info | Support RN version | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.1.7 | [@react-native-oh-tpl/react-native-text-gradient Releases](https://github.com/react-native-oh-library/react-native-text-gradient/releases) | 0.72 | +| 0.1.7 | [@react-native-ohos/react-native-text-gradient Releases]() | 0.77 | Go to the project directory and execute the following instruction: - - #### **npm** ```bash +# 0.72 npm install @react-native-oh-tpl/react-native-text-gradient + +# 0.77 +npm install @react-native-ohos/react-native-text-gradient ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-text-gradient +# 0.72 +yarn install @react-native-oh-tpl/react-native-text-gradient + +# 0.77 +yarn install @react-native-ohos/react-native-text-gradient ``` @@ -117,13 +127,22 @@ Method 1 (recommended): Use the HAR file. > [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. Open `entry/oh-package.json5` file and add the following dependencies: - +- V0.72 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-oh-tpl/react-native-text-gradient": "file:../../node_modules/@react-native-oh-tpl/react-native-text-gradient/harmony/text_gradient.har" } ``` +- V0.77 + +```json +"dependencies": { + ... + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-text-gradient": "file:../../node_modules/@react-native-ohos/react-native-text-gradient/harmony/text_gradient.har" + } +``` Click the `sync` button in the upper right corner. @@ -160,7 +179,11 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) +# V0.72 + add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-text-gradient/src/main/cpp" ./text_gradient) + +# V0.77 ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-text-gradient/src/main/cpp" ./text_gradient) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -203,8 +226,10 @@ Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following co ```diff ... +// V0.72 + import {LinearTextGradientPackage} from '@react-native-oh-tpl/react-native-text-gradient/ts'; - +// V0.77 ++ import {LinearTextGradientPackage} from '@react-native-ohos/react-native-text-gradient/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), @@ -244,12 +269,12 @@ Check the release version information in the release address of the third-party | Name | Description | Type | Required | Platform | HarmonyOS Support | | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------| ------ | -------- | -------------| ------------------ | -| start | Coordinates declare the position that the gradient starts at, as a fraction of the overall size of the gradient, starting from the top left corner. | number | yes | iOS/Android | yes | -| end | Same as start, but for the end of the gradient. | number | yes | iOS/Android | yes | -| loactions | An optional array of numbers defining the location of each gradient color stop, mapping to the color with the same index in prop. | number[] | yes | iOS/Android | yes | +| start | Coordinates declare the position that the gradient starts at, as a fraction of the overall size of the gradient, starting from the top left corner. | number | no | iOS/Android | yes | +| end | Same as start, but for the end of the gradient. | number | no | iOS/Android | yes | +| loactions | An optional array of numbers defining the location of each gradient color stop, mapping to the color with the same index in prop. | number[] | no | iOS/Android | yes | | colors | An array of at least two color values that represent gradient colors. | string | yes | iOS/Android | yes | -| useViewFrame | Optional. If true gradient will be calculated for text view background frame rather than text frame. | boolean | yes | iOS/Android | no | -| useGlobalCache | accessing or managing a cache that is available globally throughout the application. | boolean | yes | iOS | no | +| useViewFrame | Optional. If true gradient will be calculated for text view background frame rather than text frame. | boolean | no | iOS/Android | no | +| useGlobalCache | accessing or managing a cache that is available globally throughout the application. | boolean | no | iOS | no | ## Known Issues diff --git a/zh-cn/react-native-text-gradient.md b/zh-cn/react-native-text-gradient.md index 43255872..dcf8b84f 100644 --- a/zh-cn/react-native-text-gradient.md +++ b/zh-cn/react-native-text-gradient.md @@ -27,13 +27,21 @@ #### **npm** ```bash +# 0.72 npm install @react-native-oh-tpl/react-native-text-gradient + +# 0.77 +npm install @react-native-ohos/react-native-text-gradient ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-text-gradient +# 0.72 +yarn install @react-native-oh-tpl/react-native-text-gradient + +# 0.77 +yarn install @react-native-ohos/react-native-text-gradient ``` @@ -118,12 +126,22 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 +- V0.72 ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-oh-tpl/react-native-text-gradient": "file:../../node_modules/@react-native-oh-tpl/react-native-text-gradient/harmony/text_gradient.har" } ``` +- V0.77 + +```json +"dependencies": { + ... + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-text-gradient": "file:../../node_modules/@react-native-ohos/react-native-text-gradient/harmony/text_gradient.har" + } +``` 点击右上角的 `sync` 按钮 @@ -160,7 +178,11 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn) # RNOH_BEGIN: manual_package_linking_1 add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) +# V0.72 + add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-text-gradient/src/main/cpp" ./text_gradient) + +# V0.77 ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-text-gradient/src/main/cpp" ./text_gradient) # RNOH_END: manual_package_linking_1 file(GLOB GENERATED_CPP_FILES "./generated/*.cpp") @@ -203,7 +225,10 @@ std::vector> PackageProvider::getPackages(Package::Cont ```diff ... +// V0.72 + import {LinearTextGradientPackage} from '@react-native-oh-tpl/react-native-text-gradient/ts'; +// V0.77 ++ import {LinearTextGradientPackage} from '@react-native-ohos/react-native-text-gradient/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ @@ -233,8 +258,14 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-text-gradient Releases](https://github.com/react-native-oh-library/react-native-text-gradient/releases) +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.1.7 | [@react-native-oh-tpl/react-native-text-gradient Releases](https://github.com/react-native-oh-library/react-native-text-gradient/releases) | 0.72 | +| 0.1.7 | [@react-native-ohos/react-native-text-gradient Releases]() | 0.77 | +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 ## 属性 @@ -244,12 +275,12 @@ ohpm install | Name | Description | Type | Required | Platform | HarmonyOS Support | | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------| ------ | -------- | -------------| ------------------ | -| start | Coordinates declare the position that the gradient starts at, as a fraction of the overall size of the gradient, starting from the top left corner. | number | yes | iOS/Android | yes | -| end | Same as start, but for the end of the gradient. | number | yes | iOS/Android | yes | -| loactions | An optional array of numbers defining the location of each gradient color stop, mapping to the color with the same index in prop. | number[] | yes | iOS/Android | yes | +| start | Coordinates declare the position that the gradient starts at, as a fraction of the overall size of the gradient, starting from the top left corner. | number | no | iOS/Android | yes | +| end | Same as start, but for the end of the gradient. | number | no | iOS/Android | yes | +| loactions | An optional array of numbers defining the location of each gradient color stop, mapping to the color with the same index in prop. | number[] | no | iOS/Android | yes | | colors | An array of at least two color values that represent gradient colors. | string | yes | iOS/Android | yes | -| useViewFrame | Optional. If true gradient will be calculated for text view background frame rather than text frame. | boolean | yes | iOS/Android | no | -| useGlobalCache | accessing or managing a cache that is available globally throughout the application. | boolean | yes | iOS | no | +| useViewFrame | Optional. If true gradient will be calculated for text view background frame rather than text frame. | boolean | no | iOS/Android | no | +| useGlobalCache | accessing or managing a cache that is available globally throughout the application. | boolean | no | iOS | no | ## 遗留问题 -- Gitee From 6ff870e4ca80b89a6a8ce3d0648c0db737ef5b63 Mon Sep 17 00:00:00 2001 From: haoxuchao Date: Sun, 23 Nov 2025 11:31:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20[Issues:=20#ID82PX]=20=E6=9B=B4?= =?UTF-8?q?=E6=96=B0react-native-waterflow-list=E6=8C=87=E5=AF=BC=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/react-native-text-gradient.md | 13 +++++++----- en/react-native-waterflow-list.md | 31 +++++++++++++++++----------- zh-cn/react-native-text-gradient.md | 24 +++++++++++---------- zh-cn/react-native-waterflow-list.md | 13 +++++++++++- 4 files changed, 52 insertions(+), 29 deletions(-) diff --git a/en/react-native-text-gradient.md b/en/react-native-text-gradient.md index 1788697e..1b80fbdd 100644 --- a/en/react-native-text-gradient.md +++ b/en/react-native-text-gradient.md @@ -17,12 +17,12 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-text-gradient Releases](https://github.com/react-native-oh-library/react-native-text-gradient/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 go to the corresponding Release release address of the third-party library to view the version information of the Release package: | version | Releases info | Support RN version | | ---------- | ------------------------------------------------------------ | ---------- | -| 0.1.7 | [@react-native-oh-tpl/react-native-text-gradient Releases](https://github.com/react-native-oh-library/react-native-text-gradient/releases) | 0.72 | -| 0.1.7 | [@react-native-ohos/react-native-text-gradient Releases]() | 0.77 | +| 0.1.7-0.0.4 | [@react-native-oh-tpl/react-native-text-gradient Releases](https://github.com/react-native-oh-library/react-native-text-gradient/releases) | 0.72 | +| 0.2.0 | [@react-native-ohos/react-native-text-gradient Releases]() | 0.77 | Go to the project directory and execute the following instruction: @@ -258,7 +258,10 @@ 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-tpl/react-native-text-gradient Releases](https://github.com/react-native-oh-library/react-native-text-gradient/releases) +Please go to the corresponding Release release address of the third-party library to view the version information of the Release package: + +1. RNOH: 0.72.33; SDK: Openharmony 5.0.0.71(API Version 12 Release); IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +2. RNOH: 0.77.1;SDK:HarmonyOS 5.1.1.208 (API Version 19 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 6.0.0.112 SP12; ## Properties @@ -274,7 +277,7 @@ Check the release version information in the release address of the third-party | loactions | An optional array of numbers defining the location of each gradient color stop, mapping to the color with the same index in prop. | number[] | no | iOS/Android | yes | | colors | An array of at least two color values that represent gradient colors. | string | yes | iOS/Android | yes | | useViewFrame | Optional. If true gradient will be calculated for text view background frame rather than text frame. | boolean | no | iOS/Android | no | -| useGlobalCache | accessing or managing a cache that is available globally throughout the application. | boolean | no | iOS | no | +| useGlobalCache | accessing or managing a cache that is available globally throughout the application. | boolean | no | iOS | no | ## Known Issues diff --git a/en/react-native-waterflow-list.md b/en/react-native-waterflow-list.md index 39a9c31e..7f7287fd 100644 --- a/en/react-native-waterflow-list.md +++ b/en/react-native-waterflow-list.md @@ -16,6 +16,12 @@ ## Installation and Usage +Please go to the Releases release address of the third-party library to view the supporting version information: [react-native-waterflow-list](https://github.com/ZakZheng/react-native-waterflow-list/releases). For older versions that are not published to npm, install the tgz package by referring to the [Installation Guide](/en/tgz-usage-en.md). + +| Version | Support RN version | +| ---------- | -------------- | +| 1.2.3 | 0.72/0.77 | + Go to the project directory and execute the following instruction: @@ -137,7 +143,8 @@ export default () => { This document is verified based on the following versions: 1. RNOH:0.72.29; SDK:HarmonyOS NEXT Developer Beta6 SDK; IDE:DevEco Studio 5.0.3.706; ROM:NEXT.0.0.60; -1. RNOH: 0.72.33; SDK: Openharmony 5.0.0.71(API Version 12 Release); IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +2. RNOH: 0.72.33; SDK: Openharmony 5.0.0.71(API Version 12 Release); IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH:0.77.1;SDK:HarmonyOS 5.1.1.208 (API Version 19 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 6.0.0.112 SP12; ## Properties @@ -145,24 +152,24 @@ This document is verified based on the following versions: > [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. -> 详情见 [react-native-waterflow-list 源库地址](https://github.com/ZakZheng/react-native-waterflow-list) +> For details, see [react-native-waterflow-list Source library address](https://github.com/ZakZheng/react-native-waterflow-list) | Name | Description | Type | Required | Platform | HarmonyOS Support | | :-------------------------- | :------------------------------------------------------------------------------------------------ | :------------------------------------------------------------: | :--------: | :---------------------: |:--------------:| -| **data** | 列表数据, 数据类型必须为 `Object` | Object[] | Yes | All | Yes | -| **numColumns** | 列数 | number | No | All | Yes | -| **keyForItem** | 用以检测是否以渲染该数据 | string | Yes | All | Yes | -| **heightForItem** | 如 renderItem 高度已知,则传入以提高性能和加载速度 | number | No | All | Yes | -| **asyncHeightForItem** | 如item的高度为异步获取的,则通过该函数返回item的真实高度 | Promise(number) | No | All | Yes | -| **renderItem** | 渲染列表条目 | JSX.Element | Yes | All | Yes | -| **onEndReached** | 上拉加载, 若传入 Promise 对象, 则须等待 Promise 事件回调后方能再次触发此事件. 若其他则不作处理 | function | No | All | Yes | -| **columnsFlatListProps** | 外层 FlatList 参数 | FlatListProps | No | All | Yes | -| **columnFlatListProps** | 列 FlatList 参数 | FlatListProps | No | All | Yes | +| **data** | List data, and the data type must be 'Object' | Object[] | Yes | All | Yes | +| **numColumns** | Number of columns | number | No | All | Yes | +| **keyForItem** | Used to check if the data is rendered | string | Yes | All | Yes | +| **heightForItem** | If the height of the renderItem is known, it is passed in to improve performance and loading speed | number | No | All | Yes | +| **asyncHeightForItem** | If the height of item is obtained asynchronously, this function returns the true height of item | Promise(number) | No | All | Yes | +| **renderItem** | Render list entry | JSX.Element | Yes | All | Yes | +| **onEndReached** | Pull-up loading: If a Promise object is passed in, you must wait for the Promise event callback before triggering this event again. If otherwise, no action will be taken | function | No | All | Yes | +| **columnsFlatListProps** | The outer FlatList parameter | FlatListProps | No | All | Yes | +| **columnFlatListProps** | Column the FlatList parameter | FlatListProps | No | All | Yes | ## Static Methods | Name | Description | Type | Required | Platform | HarmonyOS Support | | ----- | :-----------| :--: |:--------:| :------: |:-----------------:| -| **clear** | 清空渲染列表, 一般用于下拉刷新获取到数据化,清空之前的数据 | function | No | All | Yes | +| **clear** | Clearing the render list is generally used to pull down and refresh to obtain the data and clear the previous data | function | No | All | Yes | ## Known Issues diff --git a/zh-cn/react-native-text-gradient.md b/zh-cn/react-native-text-gradient.md index dcf8b84f..e5cfb7c9 100644 --- a/zh-cn/react-native-text-gradient.md +++ b/zh-cn/react-native-text-gradient.md @@ -17,8 +17,12 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-text-gradient Releases](https://github.com/react-native-oh-library/react-native-text-gradient/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 0.1.7-0.0.4 | [@react-native-oh-tpl/react-native-text-gradient Releases](https://github.com/react-native-oh-library/react-native-text-gradient/releases) | 0.72 | +| 0.2.0 | [@react-native-ohos/react-native-text-gradient Releases]() | 0.77 | 进入到工程目录并输入以下命令: @@ -260,10 +264,8 @@ ohpm install 请到三方库的 Releases 发布地址查看配套的版本信息: -| 三方库版本 | 发布信息 | 支持RN版本 | -| ---------- | ------------------------------------------------------------ | ---------- | -| 0.1.7 | [@react-native-oh-tpl/react-native-text-gradient Releases](https://github.com/react-native-oh-library/react-native-text-gradient/releases) | 0.72 | -| 0.1.7 | [@react-native-ohos/react-native-text-gradient Releases]() | 0.77 | +1. RNOH: 0.72.33; SDK: Openharmony 5.0.0.71(API Version 12 Release); IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +2. RNOH: 0.77.1;SDK:HarmonyOS 5.1.1.208 (API Version 19 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 6.0.0.112 SP12; 对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 @@ -275,12 +277,12 @@ ohpm install | Name | Description | Type | Required | Platform | HarmonyOS Support | | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------| ------ | -------- | -------------| ------------------ | -| start | Coordinates declare the position that the gradient starts at, as a fraction of the overall size of the gradient, starting from the top left corner. | number | no | iOS/Android | yes | -| end | Same as start, but for the end of the gradient. | number | no | iOS/Android | yes | -| loactions | An optional array of numbers defining the location of each gradient color stop, mapping to the color with the same index in prop. | number[] | no | iOS/Android | yes | -| colors | An array of at least two color values that represent gradient colors. | string | yes | iOS/Android | yes | -| useViewFrame | Optional. If true gradient will be calculated for text view background frame rather than text frame. | boolean | no | iOS/Android | no | -| useGlobalCache | accessing or managing a cache that is available globally throughout the application. | boolean | no | iOS | no | +| start | 渐变起始点的坐标位置,以整个渐变区域左上角为原点 | number | no | iOS/Android | yes | +| end | 渐变结束点的坐标位置 | number | no | iOS/Android | yes | +| loactions | 数组定义每个渐变色点的位置,映射到prop中索引相同的颜色 | number[] | no | iOS/Android | yes | +| colors | 一个至少包含两个颜色值的数组,代表渐变色 | string | yes | iOS/Android | yes | +| useViewFrame | 如果为真,将计算文本视图背景框而不是文本框的渐变 | boolean | no | iOS/Android | no | +| useGlobalCache | 访问或管理在整个应用程序中全局可用的缓存 | boolean | no | iOS | no | ## 遗留问题 diff --git a/zh-cn/react-native-waterflow-list.md b/zh-cn/react-native-waterflow-list.md index 2d86e197..1d5cf895 100644 --- a/zh-cn/react-native-waterflow-list.md +++ b/zh-cn/react-native-waterflow-list.md @@ -16,6 +16,16 @@ ## 安装与使用 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 支持RN版本 | +| ---------- | ---------- | +| 1.2.3 | 0.72/0.77 | + + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 + + 进入到工程目录并输入以下命令: @@ -137,7 +147,8 @@ export default () => { 在以下版本验证通过: 1. RNOH:0.72.29; SDK:HarmonyOS NEXT Developer Beta6 SDK; IDE:DevEco Studio 5.0.3.706; ROM:NEXT.0.0.60; -1. RNOH: 0.72.33; SDK: Openharmony 5.0.0.71(API Version 12 Release); IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +2. RNOH: 0.72.33; SDK: Openharmony 5.0.0.71(API Version 12 Release); IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; +3. RNOH: 0.77.1;SDK:HarmonyOS 5.1.1.208 (API Version 19 Release) ;IDE:DevEco Studio:5.1.1.830; ROM: HarmonyOS 6.0.0.112 SP12; ## 属性 -- Gitee