From 7d63ea645fe4ad610ae22008a9464e9395a94893 Mon Sep 17 00:00:00 2001 From: feng Date: Wed, 3 Jul 2024 16:50:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?docs:=20[Issues:=20#IAA9RF]=20=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=A3=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/qrcode-generator.md | 131 ++++------ zh-cn/react-lifecycles-compat.md | 2 +- zh-cn/react-native-animate-number.md | 12 +- zh-cn/react-native-audio.md | 6 +- zh-cn/react-native-blob-util.md | 6 +- zh-cn/react-native-canvas.md | 10 +- zh-cn/react-native-clippath.md | 12 +- zh-cn/react-native-confirmation-code-field.md | 2 +- zh-cn/react-native-drawer-layout-polyfill.md | 2 +- zh-cn/react-native-fit-Image.md | 10 +- zh-cn/react-native-image-crop-picker.md | 2 +- zh-cn/react-native-image-editor.md | 6 +- zh-cn/react-native-image-viewer.md | 10 +- zh-cn/react-native-image-viewing.md | 6 +- zh-cn/react-native-image-zoom.md | 12 +- zh-cn/react-native-intersection-observer.md | 9 +- zh-cn/react-native-map-linking.md | 14 +- zh-cn/react-native-markdown-display.md | 4 +- zh-cn/react-native-marquee.md | 8 +- zh-cn/react-native-popup-menu.md | 2 +- zh-cn/react-native-pull.md | 241 +++++++++++++----- zh-cn/react-native-reanimated-table.md | 10 +- zh-cn/react-native-scrollable-tab-view.md | 51 ++-- zh-cn/react-native-sensors.md | 6 +- zh-cn/react-native-stickyheader.md | 2 +- zh-cn/react-native-swipe-list-view.md | 2 +- zh-cn/react-native-swiper.md | 132 +++++----- zh-cn/react-native-zip-archive.md | 4 +- 28 files changed, 436 insertions(+), 278 deletions(-) diff --git a/zh-cn/qrcode-generator.md b/zh-cn/qrcode-generator.md index d5403372..1441dd05 100644 --- a/zh-cn/qrcode-generator.md +++ b/zh-cn/qrcode-generator.md @@ -1,15 +1,20 @@ -> 模板版本:v0.2.0 + +> 模板版本:v0.2.2

qrcode-generator

- + + Supported platforms + + License

+ > [!tip] [Github 地址](https://github.com/kazuhikoarase/qrcode-generator) ## 安装与使用 @@ -66,88 +71,44 @@ export const CustomQrCode = ({ text, style }) => { 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18; -## API列表 - -**以下 `QRCode` 均为qrcode-generator导出的对象,即:** - -```js -import QRCode from "qrcode-generator"; -``` - -#### Base - -**静态方法** - -"HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 - -| Name | Description | Type | Required | HarmonyOS Support | -| --------------------------------------- | ----------------------- | -------- | -------- | ----------------- | -| QRCode(typeNumber,errorCorrectionLevel) | Create a QRCode Object. | function | Yes | Yes | - -**api** - -| Name | Description | Type | Required | HarmonyOS Support | -| -------------------- | ---------------------------------------------- | ------ | -------- | ----------------- | -| typeNumber | Type number (1 ~ 40), or 0 for auto detection. | number | Yes | Yes | -| errorCorrectionLevel | Error correction level ('L', 'M', 'Q', 'H') | string | Yes | Yes | - -**静态方法** - -| Name | Description | Type | Required | HarmonyOS Support | -| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | ----------------- | -| QRCode.stringToBytes(s) | Encodes a string into an array of number(byte) using any charset. This function is used by internal. Overwrite this function to encode using a multibyte charset. | function | Yes | Yes | - -api - -| Name | Description | Type | Required | HarmonyOS Support | -| ---- | ---------------- | ------ | -------- | ----------------- | -| s | string to encode | string | Yes | Yes | - -**静态方法** - -| Name | Description | Type | Required | HarmonyOS Support | -| ------------------------- | --------------------- | -------- | -------- | ----------------- | -| QRCode.addData(data,mode) | Add a data to encode. | function | Yes | Yes | - -api - -| Name | Description | Type | Required | HarmonyOS Support | -| ---- | ---------------------------------------------------------- | ------ | -------- | ----------------- | -| data | string to encode | string | Yes | Yes | -| mode | Mode ('Numeric', 'Alphanumeric', 'Byte'(default), 'Kanji') | Yes | | | - -**静态方法** - -| Name | Description | Type | Required | HarmonyOS Support | -| ----------------------- | ------------------------------------------------------------------------------------------- | -------- | -------- | ----------------- | -| QRCode.make() | Make a QR Code. | function | Yes | Yes | -| QRCode.getModuleCount() | The number of modules(cells) for each orientation. [Note] call make() before this function. | function | Yes | Yes | -| QRCode.isDark(row,col) | The module at row and col is dark or not. [Note] call make() before this function. | function | Yes | Yes | - -**api** - -| Name | Description | Type | Required | HarmonyOS Support | -| ---- | ------------------- | ------ | -------- | ----------------- | -| row | 0 ~ moduleCount - 1 | number | Yes | Yes | -| col | 0 ~ moduleCount - 1 | number | Yes | Yes | - -**静态方法** - -| Name | Description | Type | Required | HarmonyOS Support | -| ----------------------------------------- | ------------------------------------------------------------------------------------------------------ | -------- | -------- | ----------------- | -| QRCode.createDataURL(cellSize, margin) | Generate base64 links,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | Yes | -| QRCode.createImgTag(cellSize, margin,alt) | Generate img tag QR code,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | Yes | -| QRCode.createSvgTag(cellSize, margin) | Generate QR codes for svg tags,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | Yes | -| QRCode.createTableTag(cellSize, margin) | Generate QR codes for table tags,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | Yes | -| QRCode.createASCII(cellSize, margin) | Generate ASCII code,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | Yes | - -**api** - -| Name | Description | Type | Required | HarmonyOS Support | -| -------- | ---------------------- | -------- | -------- | ----------------- | -| cellSize | default: 2 | function | No | Yes | -| margin | default: cellSize \* 4 | function | No | Yes | -| alt | (optional) | function | No | Yes | +## API + +> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 + +> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| -------------------- | ---------------------------------------------------------- | -------- | -------- | ----------- | ----------------- | +| typeNumber | Type number (1 ~ 40), or 0 for auto detection. | number | Yes | IOS/Android | Yes | +| errorCorrectionLevel | Error correction level ('L', 'M', 'Q', 'H') | string | Yes | IOS/Android | Yes | +| s | string to encode | string | Yes | IOS/Android | Yes | +| data | string to encode | string | Yes | IOS/Android | Yes | +| mode | Mode ('Numeric', 'Alphanumeric', 'Byte'(default), 'Kanji') | Yes | | IOS/Android | | +| row | 0 ~ moduleCount - 1 | number | Yes | IOS/Android | Yes | +| col | 0 ~ moduleCount - 1 | number | Yes | IOS/Android | Yes | +| cellSize | default: 2 | function | No | IOS/Android | Yes | +| margin | default: cellSize \* 4 | function | No | IOS/Android | Yes | +| alt | (optional) | function | No | IOS/Android | Yes | + +## 静态方法 + +> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 + +> [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ----------------------------------------- | ------------------------------------------------------------ | -------- | ----------- | ----------- | ----------------- | +| QRCode(typeNumber,errorCorrectionLevel) | Create a QRCode Object. | function | Yes | IOS/Android | Yes | +| QRCode.stringToBytes(s) | Encodes a string into an array of number(byte) using any charset. This function is used by internal. Overwrite this function to encode using a multibyte charset. | function | Yes | IOS/Android | Yes | +| QRCode.make() | Make a QR Code. | function | IOS/Android | Yes | Yes | +| QRCode.getModuleCount() | The number of modules(cells) for each orientation. [Note] call make() before this function. | function | IOS/Android | Yes | Yes | +| QRCode.isDark(row,col) | The module at row and col is dark or not. [Note] call make() before this function. | function | IOS/Android | Yes | Yes | +| QRCode.addData(data,mode) | Add a data to encode. | function | Yes | IOS/Android | Yes | +| QRCode.createDataURL(cellSize, margin) | Generate base64 links,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | +| QRCode.createImgTag(cellSize, margin,alt) | Generate img tag QR code,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | +| QRCode.createSvgTag(cellSize, margin) | Generate QR codes for svg tags,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | +| QRCode.createTableTag(cellSize, margin) | Generate QR codes for table tags,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | +| QRCode.createASCII(cellSize, margin) | Generate ASCII code,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | ## 遗留问题 @@ -155,6 +116,6 @@ api ## 开源协议 -本项目基于 [The MIT License (MIT)](https://github.com/facebook/prop-types/blob/v15.8.1/LICENSE) ,请自由地享受和参与开源。 +本项目基于 [The MIT License (MIT)](https://github.com/kazuhikoarase/qrcode-generator/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file diff --git a/zh-cn/react-lifecycles-compat.md b/zh-cn/react-lifecycles-compat.md index 33ff079f..0bd09d1e 100644 --- a/zh-cn/react-lifecycles-compat.md +++ b/zh-cn/react-lifecycles-compat.md @@ -1,5 +1,5 @@ -> 模板版本:v0.1.3 +> 模板版本:v0.2.2

react-lifecycles-compat

diff --git a/zh-cn/react-native-animate-number.md b/zh-cn/react-native-animate-number.md index 0ce49caf..af65d96b 100644 --- a/zh-cn/react-native-animate-number.md +++ b/zh-cn/react-native-animate-number.md @@ -1,15 +1,19 @@ -模板版本:v0.2.0 +模板版本:v0.2.2

react-native-animate-number

+ + Supported platforms + License

+ > [!TIP] [Github 地址](https://github.com/wkh237/react-native-animate-number) ## 安装与使用 @@ -138,6 +142,8 @@ const styles = StyleSheet.create({ export default App; ``` +## 约束与限制 + ## 兼容性 在以下版本验证通过 @@ -161,4 +167,8 @@ export default App; ## 其他 +## 开源协议 + +本项目基于 [The MIT License (MIT)](https://github.com/wkh237/react-native-animate-number) ,请自由地享受和参与开源。 + \ No newline at end of file diff --git a/zh-cn/react-native-audio.md b/zh-cn/react-native-audio.md index 69975fe8..cd49c152 100644 --- a/zh-cn/react-native-audio.md +++ b/zh-cn/react-native-audio.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.1 +> 模板版本:v0.2.2

react-native-audio

@@ -100,6 +100,10 @@ AudioRecorder.onFinished = (data) => { } ``` +## 使用 Codegen + +本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 + ## Link 目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 diff --git a/zh-cn/react-native-blob-util.md b/zh-cn/react-native-blob-util.md index fd8fa4a9..c3124849 100644 --- a/zh-cn/react-native-blob-util.md +++ b/zh-cn/react-native-blob-util.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.1 +> 模板版本:v0.2.2

react-native-blob-util

@@ -411,6 +411,10 @@ const styles = StyleSheet.create({ }); ``` +## 使用 Codegen + +本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 + ## Link 目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 diff --git a/zh-cn/react-native-canvas.md b/zh-cn/react-native-canvas.md index 93bc7d14..8cf192a8 100644 --- a/zh-cn/react-native-canvas.md +++ b/zh-cn/react-native-canvas.md @@ -1,15 +1,19 @@ -模板版本:v0.2.0 +模板版本:v0.2.2

react-native-canvas

+ + Supported platforms + License

+ > [!TIP] [Github 地址](https://github.com/iddan/react-native-canvas) ## 安装与使用 @@ -39,6 +43,8 @@ npm install --save-dev @type/react-native-canvas@0.1.39 下面的代码展示了这个库的基本使用场景: +> [!WARNING] 使用时 import 的库名不变。 + ```tsx import React, { useRef, useEffect } from "react"; import { View, StyleSheet, Text, ScrollView } from "react-native"; @@ -131,7 +137,7 @@ export default CanvasDemo; 本库 HarmonyOS 侧实现依赖@react-native-oh-tpl/react-native-webview 的原生端代码,如已在 HarmonyOS 工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。 -如未引入请参照[@react-native-oh-tpl/react-native-webview 文档的 Link 章节](https://gitee.com/zhanghao2519/usage-docs/blob/master/zh-cn/react-native-webview.md)进行引入 +如未引入请参照[@react-native-oh-tpl/react-native-webview 文档的 Link 章节](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-canvas.md)进行引入 ## 兼容性 diff --git a/zh-cn/react-native-clippath.md b/zh-cn/react-native-clippath.md index 36c6f921..43bf594b 100644 --- a/zh-cn/react-native-clippath.md +++ b/zh-cn/react-native-clippath.md @@ -1,15 +1,19 @@ -> 模板版本:v0.2.0 +> 模板版本:v0.2.2

react-native-clippath

- + + Supported platforms + + License

+ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-clippath) ## 安装与使用 @@ -70,6 +74,10 @@ export default function index() { 1. RNOH: 0.72.26; SDK: HarmonyOS-NEXT-DP2; IDE: DevEco Studio 5.0.3.29; ROM: 205.0.0.18; 2. RNOH: 0.72.26; SDK: armonyOS NEXT Developer preview2、5.0.0.22(API Version 12 Canary3); IDE: DevEco Studio: 5.0.3.300;ROM: 3.0.0.22; +## 使用 Codegen + +本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 + ## Link 目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 diff --git a/zh-cn/react-native-confirmation-code-field.md b/zh-cn/react-native-confirmation-code-field.md index 6dca1fc6..e1895130 100644 --- a/zh-cn/react-native-confirmation-code-field.md +++ b/zh-cn/react-native-confirmation-code-field.md @@ -1,5 +1,5 @@ -> 模板版本:v0.1.3 +> 模板版本:v0.2.2

react-native-confirmation-code-field

diff --git a/zh-cn/react-native-drawer-layout-polyfill.md b/zh-cn/react-native-drawer-layout-polyfill.md index 215f1e6a..2c3eabf6 100644 --- a/zh-cn/react-native-drawer-layout-polyfill.md +++ b/zh-cn/react-native-drawer-layout-polyfill.md @@ -1,5 +1,5 @@ -模板版本:v0.2.0 +模板版本:v0.2.2

react-native-drawer-layout-polyfill

diff --git a/zh-cn/react-native-fit-Image.md b/zh-cn/react-native-fit-Image.md index 21bcf556..984e030f 100644 --- a/zh-cn/react-native-fit-Image.md +++ b/zh-cn/react-native-fit-Image.md @@ -1,10 +1,13 @@ -模板版本:v0.2.1 +模板版本:v0.2.2

react-native-fit-image

+ + Supported platforms + License @@ -12,6 +15,7 @@

+ > [!TIP] [Github 地址](https://github.com/huiseoul/react-native-fit-image) ## 安装与使用 @@ -310,8 +314,8 @@ export default FitImageDemo; ## 遗留问题 -1. 在react-native-fit-image三方库中`onError`.`onLoadStart`.`onLayout`回调方法,在原库文档(react-native-fit-image)作者已说明并没有适配(Some props are not working),有待开发[issues](https://github.com/huiseoul/react-native-fit-image/issues/76) -2. `borderRadius`图片圆角属性,在 HarmonyOS ,ios,安卓均不支持,官方文档互动有提到borderRadius不生效;[issues](https://github.com/huiseoul/react-native-fit-image/issues/111) +- [ ] 在react-native-fit-image三方库中`onError`.`onLoadStart`.`onLayout`回调方法,在原库文档(react-native-fit-image)作者已说明并没有适配(Some props are not working),有待开发:[issues](https://github.com/huiseoul/react-native-fit-image/issues/76) +- [ ] `borderRadius`图片圆角属性,在 HarmonyOS ,ios,安卓均不支持,官方文档互动有提到borderRadius不生效:[issues](https://github.com/huiseoul/react-native-fit-image/issues/111) ## 其他 diff --git a/zh-cn/react-native-image-crop-picker.md b/zh-cn/react-native-image-crop-picker.md index 66b8ee3e..e00a04a7 100644 --- a/zh-cn/react-native-image-crop-picker.md +++ b/zh-cn/react-native-image-crop-picker.md @@ -788,7 +788,7 @@ const styles = StyleSheet.create({ export default ImageCropPickDemo; ``` -## 使用 Codegen(如本库已适配了 Codegen ) +## 使用 Codegen 本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 diff --git a/zh-cn/react-native-image-editor.md b/zh-cn/react-native-image-editor.md index 17303ed2..07811e9f 100644 --- a/zh-cn/react-native-image-editor.md +++ b/zh-cn/react-native-image-editor.md @@ -1,5 +1,5 @@ -> 模板版本:V0.2.1 +> 模板版本:V0.2.2

@react-native-community/image-editor

@@ -181,6 +181,10 @@ const styles = StyleSheet.create({ }); ``` +## 使用 Codegen + +本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 + ## Link 目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 diff --git a/zh-cn/react-native-image-viewer.md b/zh-cn/react-native-image-viewer.md index 6471ad14..82424f0e 100644 --- a/zh-cn/react-native-image-viewer.md +++ b/zh-cn/react-native-image-viewer.md @@ -1,5 +1,5 @@ -> 模板版本:v0.1.3 +> 模板版本:v0.2.2

react-native-image-viewer

@@ -223,7 +223,11 @@ export default ReactImageZoon; ## 兼容性 -在以下版本验证通过 +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[<@react-native-oh-tpl/react-native-image-viewer> Releases](https://github.com/react-native-oh-library/react-native-image-viewer/releases) + +本文档内容基于以下版本验证通过: 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18; @@ -275,6 +279,6 @@ export default ReactImageZoon; ## 开源协议 -本项目基于 [MIT License](https://github.com/react-native-oh-library/react-native-image-viewer/blob/sig/LICENSE) ,请自由地享受和参与开源。 +本项目基于 [MIT License](https://github.com/ascoders/react-native-image-viewer/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file diff --git a/zh-cn/react-native-image-viewing.md b/zh-cn/react-native-image-viewing.md index f1476123..46d20ad2 100644 --- a/zh-cn/react-native-image-viewing.md +++ b/zh-cn/react-native-image-viewing.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.0 +> 模板版本:v0.2.2

react-native-image-viewing

@@ -186,7 +186,9 @@ const styles = StyleSheet.create({ ## 兼容性 -在下述版本验证通过: +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[<@react-native-oh-tpl/react-native-image-viewing>Releases](https://github.com/react-native-oh-library/react-native-image-viewing/releases) + +本文档内容基于以下版本验证通过: 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18; diff --git a/zh-cn/react-native-image-zoom.md b/zh-cn/react-native-image-zoom.md index a6a582e9..2ee244e5 100644 --- a/zh-cn/react-native-image-zoom.md +++ b/zh-cn/react-native-image-zoom.md @@ -1,15 +1,19 @@ -模板版本:v0.2.0 +模板版本:v0.2.2

react-native-image-zoom

- + + Supported platforms + + License

+ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-image-zoom) ## 安装与使用 @@ -541,4 +545,8 @@ export default ImageZoomDemo; ## 其他 +## 开源协议 + +本项目基于 [The MIT License (MIT)](https://github.com/ascoders/react-native-image-zoom/blob/master/LICENSE) ,请自由地享受和参与开源。 + \ No newline at end of file diff --git a/zh-cn/react-native-intersection-observer.md b/zh-cn/react-native-intersection-observer.md index babe7aa9..3763899a 100644 --- a/zh-cn/react-native-intersection-observer.md +++ b/zh-cn/react-native-intersection-observer.md @@ -1,19 +1,20 @@ -> 模板版本:v0.2.0 +> 模板版本:v0.2.2

react-native-intersection-observer

- + Supported platforms - + License

+ > [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-intersection-observer/tree/sig) ## 安装与使用 @@ -135,6 +136,6 @@ Methods: Inherits [FlatList Methods](https://reactnative.dev/docs/flatlist#metho ## 开源协议 -本项目基于 [MIT License](https://github.com/react-native-oh-library/react-native-intersection-observer/blob/sig/LICENSE) ,请自由地享受和参与开源。 +本项目基于 [MIT License](https://github.com/zhbhun/react-native-intersection-observer/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file diff --git a/zh-cn/react-native-map-linking.md b/zh-cn/react-native-map-linking.md index aedfc6d8..d6961aa5 100644 --- a/zh-cn/react-native-map-linking.md +++ b/zh-cn/react-native-map-linking.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.0 +> 模板版本:v0.2.2

react-native-map-link

@@ -108,7 +108,9 @@ export default MapLinkingDemo; ## 约束与限制 ### 兼容性 -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 电脑ROM。 +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-map-linking Releases](https://github.com/react-native-oh-library/react-native-map-linking/releases/tag/1.0.1-0.0.1) 本文档内容基于以下版本验证通过: @@ -141,17 +143,17 @@ navigate(distLocation) | 启动当前位置到目标位置的导航 | distLocati ### Harmony配置Schema支持 Harmony系统下需要在module.json5中配置querySchemes支持才能唤起花瓣地图,后续要唤起高德地图和百度地图,也需要将它们的scheme加到这里。 - + ``` "querySchemes":[ "maps" ] ``` + - - + ### iOS配置Schema支持 - + iOS系统下需要在App的`info.plist`中配置Schema支持才能唤起地图: ``` diff --git a/zh-cn/react-native-markdown-display.md b/zh-cn/react-native-markdown-display.md index 1b98dc79..7f894e65 100644 --- a/zh-cn/react-native-markdown-display.md +++ b/zh-cn/react-native-markdown-display.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.1 +> 模板版本:v0.2.2

react-native-markdown-display

@@ -125,6 +125,6 @@ export default App; ## 开源协议 -本项目基于 [The MIT License (MIT)](https://github.com/react-native-oh-library/react-native-markdown-display/blob/sig/LICENSE) ,请自由地享受和参与开源。 +本项目基于 [The MIT License (MIT)](https://github.com/iamacup/react-native-markdown-display/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file diff --git a/zh-cn/react-native-marquee.md b/zh-cn/react-native-marquee.md index f5ce7bb8..647e57a3 100644 --- a/zh-cn/react-native-marquee.md +++ b/zh-cn/react-native-marquee.md @@ -1,5 +1,5 @@ -> 模板版本:v0.1.3 +> 模板版本:v0.2.2

react-native-marquee

@@ -75,8 +75,6 @@ const styles = StyleSheet.create({ }); ``` -## Link - ## 属性 MarqueText组件基本上继承了TextProps,以下是附加组件: @@ -92,6 +90,10 @@ MarqueText组件基本上继承了TextProps,以下是附加组件: ## 兼容性 +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[<@react-native-oh-tpl/react-native-marquee> Releases](https://github.com/react-native-oh-library/react-native-marquee/releases) + 本文档内容基于以下版本验证通过: 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18; diff --git a/zh-cn/react-native-popup-menu.md b/zh-cn/react-native-popup-menu.md index 4ffb266c..a867e022 100644 --- a/zh-cn/react-native-popup-menu.md +++ b/zh-cn/react-native-popup-menu.md @@ -1,5 +1,5 @@ -> 模板版本:v0.1.3 +> 模板版本:v0.2.2

react-native-popup-menu

diff --git a/zh-cn/react-native-pull.md b/zh-cn/react-native-pull.md index 80f404fd..91ea07c8 100644 --- a/zh-cn/react-native-pull.md +++ b/zh-cn/react-native-pull.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.0 +> 模板版本:v0.2.2

react-native-pull

@@ -52,8 +52,6 @@ yarn add @react-native-oh-tpl/react-native-pull@file:# **PullViewDemo** -![img](https://raw.githubusercontent.com/greatbsky/react-native-pull-demo/master/PullViewDemo/image/demo.gif) - > 代码示例 ```js @@ -129,7 +127,7 @@ const onPullRelease = (resolve) => { topIndicatorRender={topIndicatorRender} topIndicatorHeight={60}> - 1*************** + 1*************** onPulling:{testObj.pulling} 3 onPullOk:{testObj.pullok} @@ -156,8 +154,6 @@ const styles = StyleSheet.create({ **PullListDemo** -![img](https://raw.githubusercontent.com/greatbsky/react-native-pull-demo/master/PullListDemo/image/demo.gif) - > 代码示例 ```jsx @@ -168,6 +164,7 @@ import { View, ActivityIndicator, Dimensions, + RefreshControl } from 'react-native'; import {PullList} from 'react-native-pull'; @@ -183,32 +180,58 @@ const PullListDemo = () => { const [count, setCount] = useState(0); const [data, setData] = useState(testObj); - const [stateList, setStateList] = useState([ - { - id: 'bd7acbea-c1b1-46c2-aed5-3ad53abb2cba', - title: 'First Item1', - }, - { - id: '3ac68afc-c605-48d3-a4f8-fbd91a397f63', - title: 'Second Item2', - }, - { - id: '58694a0f-3da1-471f-bd96-145573e29d72', - title: 'Third Item3', - }, - { - id: 'bd7acbea-c1b1-26c2-aed5-3ad53abb2cba', - title: 'First Item4', - }, - { - id: '3ac68afc-c605-4843-a4f8-fbd91a397f63', - title: 'Second Item5', - }, - { - id: '58694a0f-3da1-451f-bd96-145573e29d72', - title: 'Third Item6', - }, - ]); + const [stateList, setStateList] = useState( + [ + { + id: 1, + title: '------>Item1', + }, + { + id: 2, + title: '------>Item2', + }, + { + id: 3, + title: '------>Item3', + }, + { + id: 4, + title: '------>Item4', + }, + { + id: 5, + title: '------>Item5', + }, + { + id: 6, + title: '------>Item6', + }, + { + id: 7, + title: '------>Item7', + }, + { + id: 8, + title: '------>Item8', + }, + { + id: 9, + title: '------>Item9', + }, + { + id: 10, + title: '------>Item10', + }, + { + id: 11, + title: '------>Item11', + }, + { + id: 12, + title: '------>Item12', + }, + ] + ); const onPulling = () => { testObj.pulling='pulling--------->' @@ -225,6 +248,56 @@ const PullListDemo = () => { testObj.pullrelease='pullrelease--------->' setData(testObj) setTimeout(() => { + setStateList([ + { + id: 1, + title: '------>Item1', + }, + { + id: 2, + title: '------>Item2', + }, + { + id: 3, + title: '------>Item3', + }, + { + id: 4, + title: '------>Item4', + }, + { + id: 5, + title: '------>Item5', + }, + { + id: 6, + title: '------>Item6', + }, + { + id: 7, + title: '------>Item7', + }, + { + id: 8, + title: '------>Item8', + }, + { + id: 9, + title: '------>Item9', + }, + { + id: 10, + title: '------>Item10', + }, + { + id: 11, + title: '------>Item11', + }, + { + id: 12, + title: '------>Item12', + }, + ]); resolve(); }, 3000); }; @@ -237,11 +310,11 @@ const PullListDemo = () => { const topIndicatorRender = (pulling, pullok, pullrelease) => { if (pulling) { - setCount('下拉刷新pulling...') + setCount('当前PullList状态: pulling...') } else if (pullok) { - setCount('松开刷新pullok......') + setCount('当前PullList状态: pullok......') } else if (pullrelease) { - setCount('玩命刷新中pullrelease......') + setCount('当前PullList状态: pullrelease......') } return ( @@ -264,7 +337,6 @@ const PullListDemo = () => { } const renderRow = ({item}) => { - console.log('renderRow', item.title) return ( {item.title} @@ -281,50 +353,84 @@ const PullListDemo = () => { } const loadMore = () => { - const list = [ { - id: 'bd7acbea-c1b1-46c2-aed5-3ad53abb28ba', - title: 'First Item', - }] + const list = [] + const num = stateList.length for(var i = 0; i < 5; i++) { list.push({ - id: (i + 1) + '', - title: `this is ${i}`, + id: (i + 1 + num) + '', + title: `------>Item${(i+num+1)}`, }) } - setTimeout(() => { + setTimeout(() => { setStateList([...stateList,...list]); }, 1000); } + + const [refreshing, setRefreshing] = useState(false) + const onRefresh = () => { + // 加载数据的逻辑 + setRefreshing(true) + // 数据加载完成后 + setTimeout(() => { + setRefreshing(false) + }, 2000); // 假设数据加载需要2秒 + }; + const refreshControl = ( + + ); + return ( - item.id} - /> + item.id} + /> ); }; const styles = StyleSheet.create({ - container: { + container: { flex: 1, - justifyContent: 'center', - alignItems: 'center', + flexDirection: 'column', backgroundColor: '#F5FCFF', + width:'100%', + height:'100%', + overflow: 'scroll' + }, + welcome: { + fontSize: 20, + textAlign: 'center', + margin: 10, + }, + instructions: { + textAlign: 'center', + color: '#333333', + marginBottom: 5, }, }); @@ -335,12 +441,15 @@ export default PullListDemo; ## 约束与限制 ### 兼容性 + +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[ Releases](https://gitee.com/link?target=https%3A%2F%2Fgithub.com%2F%3C%E4%BB%93%E5%BA%93%E5%9C%B0%E5%9D%80%3E%2Freleases) + 本文档内容基于以下版本验证通过: 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:3.0.0.21; -请到三方库相应的发布地址查看版本信息:[@react-native-oh-tpl/react-native-pull/releases](https://github.com/react-native-oh-library/react-native-pull/releases) - ## 属性配置项 > [!tip] "Platform"列表示该属性在原三方库上支持的平台。 diff --git a/zh-cn/react-native-reanimated-table.md b/zh-cn/react-native-reanimated-table.md index 6003133b..b9d059ab 100644 --- a/zh-cn/react-native-reanimated-table.md +++ b/zh-cn/react-native-reanimated-table.md @@ -1,15 +1,19 @@ -模板版本:v0.2.1 +模板版本:v0.2.2

react-native-reanimated-table

+ + Supported platforms + License

+ > [!TIP] [Github 地址](https://github.com/dohooo/react-native-reanimated-table) ## 安装与使用 @@ -84,7 +88,9 @@ const styles = StyleSheet.create({ }); ``` -## 兼容性 +## 约束与限制 + +### 兼容性 本文档内容基于以下版本验证通过: diff --git a/zh-cn/react-native-scrollable-tab-view.md b/zh-cn/react-native-scrollable-tab-view.md index adc4ab35..912a05e1 100644 --- a/zh-cn/react-native-scrollable-tab-view.md +++ b/zh-cn/react-native-scrollable-tab-view.md @@ -1,18 +1,19 @@ -> 模板版本:v0.2.1 +> 模板版本:v0.2.2

react-native-scrollable-tab-view

- + Supported platforms - + npm package

+ > [!tip] [Github 地址](https://github.com/react-native-oh-library/react-native-scrollable-tab-view) ## 安装与使用 @@ -72,33 +73,39 @@ export default () => { ## 兼容性 +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: [Releases](https://github.com/react-native-oh-library/react-native-scrollable-tab-view/releases) + 本文档内容基于以下版本验证通过: 1. RNOH:0.72.20; SDK:HarmonyOS NEXT Developer Preview2; IDE:DevEco Studio 5.0.3.200; ROM:205.0.0.18; ## 属性 +> [!tip] "Platform"列表示该属性在原三方库上支持的平台。 + > [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | -------- | ------------ | ----------------- | -| renderTabBar | 用于渲染TabBar。添加该属性,需要在引入组件之时加上它的子组件。系统提供两种方式,DefaultTabBar和ScrollableTabBar。DefaultTabBar表示Tab.item会平分水平方向上的空间,而ScrollableTabBar表示所有的tabBar.item的长度将会超过屏幕宽度,但是当滚动屏幕之时可以显示出来。当然也可以自定义它的模式。 | Function | 否 | ios,android | yes | -| tabBarPosition | 表示TabBar的位置。一共有四个取值:top(放在界面上方)、bottom(放在界面底部)、overlayTop(有悬浮效果在上方)、overlayBottom(有悬浮效果在下方) | String | 否 | ios,android | yes | -| onChangeTab | 切换界面的时候会调用该方法,该属性中包含一个参数,它是一个object对象,这个对象有两个参数,i表示被选中的下标,ref表示被选中的对象。 | Function | 否 | ios,android | yes | -| onScroll | 视图滑动时调用,该属性会传递一个Float类型的数字,范围是[0,tab的数量-1] | Function | 否 | ios,android | yes | -| locked | 手指是否能拖动,默认为false(可拖动),如为true则表示只能通过点击tab来切换视图。 | Bool | 否 | ios,android | yes | -| initialPage | 初始化时被选中的下标,默认为0 | Integer | 否 | ios,android | yes | -| page | 设置选中指定的tab(已废弃,详情请看 [#126](https://github.com/ptomasroos/react-native-scrollable-tab-view/issues/126)) | Integer | 否 | ios,android | no | -| children | 每个顶级子组件都应该有一个tabLabel属性,选项卡栏组件可以使用它来呈现标签。默认是字符串,但也可以自定义内容。 | ReactComponents | 否 | ios,android | yes | -| tabBarUnderlineStyle | 设置选项卡栏下划线的样式。注意,该属性只是在系统提供的ScrollableTabBarTab状态下才有效果。 | View.propTypes.style | 否 | ios,android | yes | -| tabBarBackgroundColor | 设置选项卡栏背景的颜色,默认为white。 | String | 否 | ios,android | yes | -| tabBarActiveTextColor | 设置选中的tabBar的文字颜色,默认navy。 | String | 否 | ios,android | yes | -| tabBarInactiveTextColor | 设置未选中的tabBar的文字颜色,默认black。 | String | 否 | android,ios | yes | -| tabBarTextStyle | 选项卡栏文本的其他样式。例如:{fontFamily: 'Roboto', fontSize: 15} | Object | 否 | android,ios | yes | -| style | view所拥有的属性 | View.propTypes.style | 否 | android,ios | yes | -| contentProps | 应用于ScrollView/ViewPagerAndroid的属性。请注意,重写库设置的默认值可能会破坏功能; | Object | 否 | android,ios | yes | -| scrollWithoutAnimation | 设置点击Tab时,视图切换是否有动画,默认为false(即:有动画效果)。 | Bool | 否 | android,ios | yes | -| prerenderingSiblingsNumber | 预渲染附近的同级,Infinity===渲染所有同级,默认为0===渲染当前页面。 | Integer | 否 | android,ios | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| -------------------------- | ------------------------------------------------------------ | -------------------- | -------- | ------------ | ----------------- | +| renderTabBar | 用于渲染TabBar。添加该属性,需要在引入组件之时加上它的子组件。系统提供两种方式,DefaultTabBar和ScrollableTabBar。DefaultTabBar表示Tab.item会平分水平方向上的空间,而ScrollableTabBar表示所有的tabBar.item的长度将会超过屏幕宽度,但是当滚动屏幕之时可以显示出来。当然也可以自定义它的模式。 | Function | no | ios,android | yes | +| tabBarPosition | 表示TabBar的位置。一共有四个取值:top(放在界面上方)、bottom(放在界面底部)、overlayTop(有悬浮效果在上方)、overlayBottom(有悬浮效果在下方) | String | no | ios,android | yes | +| onChangeTab | 切换界面的时候会调用该方法,该属性中包含一个参数,它是一个object对象,这个对象有两个参数,i表示被选中的下标,ref表示被选中的对象。 | Function | no | ios,android | yes | +| onScroll | 视图滑动时调用,该属性会传递一个Float类型的数字,范围是[0,tab的数量-1] | Function | no | ios,android | yes | +| locked | 手指是否能拖动,默认为false(可拖动),如为true则表示只能通过点击tab来切换视图。 | Bool | no | ios,android | yes | +| initialPage | 初始化时被选中的下标,默认为0 | Integer | no | ios,android | yes | +| page | 设置选中指定的tab(已废弃,详情请看 [#126](https://github.com/ptomasroos/react-native-scrollable-tab-view/issues/126)) | Integer | no | ios,android | no | +| children | 每个顶级子组件都应该有一个tabLabel属性,选项卡栏组件可以使用它来呈现标签。默认是字符串,但也可以自定义内容。 | ReactComponents | no | ios,android | yes | +| tabBarUnderlineStyle | 设置选项卡栏下划线的样式。注意,该属性只是在系统提供的ScrollableTabBarTab状态下才有效果。 | View.propTypes.style | no | ios,android | yes | +| tabBarBackgroundColor | 设置选项卡栏背景的颜色,默认为white。 | String | no | ios,android | yes | +| tabBarActiveTextColor | 设置选中的tabBar的文字颜色,默认navy。 | String | no | ios,android | yes | +| tabBarInactiveTextColor | 设置未选中的tabBar的文字颜色,默认black。 | String | no | android,ios | yes | +| tabBarTextStyle | 选项卡栏文本的其他样式。例如:{fontFamily: 'Roboto', fontSize: 15} | Object | no | android,ios | yes | +| style | view所拥有的属性 | View.propTypes.style | no | android,ios | yes | +| contentProps | 应用于ScrollView/ViewPagerAndroid的属性。请注意,重写库设置的默认值可能会破坏功能; | Object | no | android,ios | yes | +| scrollWithoutAnimation | 设置点击Tab时,视图切换是否有动画,默认为false(即:有动画效果)。 | Bool | no | android,ios | yes | +| prerenderingSiblingsNumber | 预渲染附近的同级,Infinity===渲染所有同级,默认为0===渲染当前页面。 | Integer | no | android,ios | yes | ## 遗留问题 diff --git a/zh-cn/react-native-sensors.md b/zh-cn/react-native-sensors.md index 37ae606d..630b07ce 100644 --- a/zh-cn/react-native-sensors.md +++ b/zh-cn/react-native-sensors.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.1 +> 模板版本:v0.2.2

react-native-sensors

@@ -87,6 +87,10 @@ gravity.subscribe(({ x, y, z, timestamp }) => setUpdateIntervalForType(SensorTypes.accelerometer, 100); ``` +## 使用 Codegen + +本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 + ## Link 目前 HarmonyOS 暂不支持 AutoLink,所以 Link 步骤需要手动配置。 diff --git a/zh-cn/react-native-stickyheader.md b/zh-cn/react-native-stickyheader.md index 5bf7aa06..53cbe675 100644 --- a/zh-cn/react-native-stickyheader.md +++ b/zh-cn/react-native-stickyheader.md @@ -1,5 +1,5 @@ -> 模板版本:v0.1.3 +> 模板版本:v0.2.2

react-native-stickyheader

diff --git a/zh-cn/react-native-swipe-list-view.md b/zh-cn/react-native-swipe-list-view.md index 5793f491..677df78a 100644 --- a/zh-cn/react-native-swipe-list-view.md +++ b/zh-cn/react-native-swipe-list-view.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.1 +> 模板版本:v0.2.2

react-native-swipe-list-view

diff --git a/zh-cn/react-native-swiper.md b/zh-cn/react-native-swiper.md index 26e8d84e..cce462bb 100644 --- a/zh-cn/react-native-swiper.md +++ b/zh-cn/react-native-swiper.md @@ -1,15 +1,23 @@ -> 模板版本:v0.1.3 +> 模板版本:v0.2.2

react-native-swiper

+ + Supported platforms + License

+ + + + + > [!tip] [Github 地址](https://github.com/leecade/react-native-swiper) ## 安装与使用 @@ -86,6 +94,8 @@ export default class SwiperComponent extends Component { AppRegistry.registerComponent("myproject", () => SwiperComponent); ``` +## 约束与限制 + ### 兼容性 在下述版本验证通过: @@ -101,48 +111,48 @@ AppRegistry.registerComponent("myproject", () => SwiperComponent); #### basics -| Prop | Default | Type | Description | platform | HarmonyOS Support | remark | -| :------------- | :-------------: | :------: | :---------------------------------------------------------------------------------------------------------- | -------- | ----------------- | ------ | -| horizontal | true | `bool` | If `true`, the scroll view's children are arranged horizontally in a row instead of vertically in a column. | All | YES | -- | -| loop | true | `bool` | Set to `false` to disable continuous loop mode. | All | YES | -- | -| index | 0 | `number` | Index number of initial slide. | All | YES | -- | -| showsButtons | false | `bool` | Set to `true` make control buttons visible. | All | YES | -- | -| autoplay | false | `bool` | Set to `true` enable auto play mode. | All | YES | -- | -| onIndexChanged | (index) => null | `func` | Called with the new index when the user swiped | All | YES | -- | +| Name | Description | Type | Default | platform | HarmonyOS Support | +| :------------- | ------------------------------------------------------------ | :------: | :-------------: | -------- | ----------------- | +| horizontal | If `true`, the scroll view's children are arranged horizontally in a row instead of vertically in a column. | `bool` | true | All | YES | +| loop | Set to `false` to disable continuous loop mode. | `bool` | true | All | YES | +| index | Index number of initial slide. | `number` | 0 | All | YES | +| showsButtons | Set to `true` make control buttons visible. | `bool` | false | All | YES | +| autoplay | Set to `true` enable auto play mode. | `bool` | false | All | YES | +| onIndexChanged | Called with the new index when the user swiped | `func` | (index) => null | All | YES | #### Custom basic style & content -| Prop | Default | Type | Description | platform | HarmonyOS Support | remark | -| :---------------- | :---------------------: | :-------: | :------------------------------------------------------------------------- | -------- | ----------------- | ------ | -| width | - | `number` | If no specify default enable fullscreen mode by `flex: 1`. | All | YES | -- | -| height | - | `number` | If no specify default fullscreen mode by `flex: 1`. | All | YES | -- | -| style | {...} | `style` | See default style in source. | All | YES | -- | -| containerStyle | {...} | `style` | See default container style in source. | All | YES | -- | -| loadMinimal | false | `bool` | Only load current index slide , `loadMinimalSize` slides before and after. | All | YES | -- | -| loadMinimalSize | 1 | `number` | see `loadMinimal` | All | YES | -- | -| loadMinimalLoader | `` | `element` | Custom loader to display when slides aren't loaded | All | YES | -- | +| Name | Description | Type | Default | platform | HarmonyOS Support | +| :---------------- | :----------------------------------------------------------- | :-------: | :---------------------: | -------- | ----------------- | +| width | If no specify default enable fullscreen mode by `flex: 1`. | `number` | - | All | YES | +| height | If no specify default fullscreen mode by `flex: 1`. | `number` | - | All | YES | +| style | See default style in source. | `style` | {...} | All | YES | +| containerStyle | See default container style in source. | `style` | {...} | All | YES | +| loadMinimal | Only load current index slide , `loadMinimalSize` slides before and after. | `bool` | false | All | YES | +| loadMinimalSize | see `loadMinimal` | `number` | 1 | All | YES | +| loadMinimalLoader | Custom loader to display when slides aren't loaded | `element` | `` | All | YES | #### Pagination -| Prop | Default | Type | Description | platform | HarmonyOS Support | remark | -| :--------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------- | ------ | -| showsPagination | true | `bool` | Set to `true` make pagination visible. | All | YES | -- | -| paginationStyle | {...} | `style` | Custom styles will merge with the default styles. | All | YES | -- | -| renderPagination | - | `function` | Complete control how to render pagination with three params (`index`, `total`, `context`) ref to `this.state.index` / `this.state.total` / `this`, For example: show numbers instead of dots. | All | YES | -- | -| dot | `` | `element` | Allow custom the dot element. | All | YES | -- | -| activeDot | `` | `element` | Allow custom the active-dot element. | All | YES | -- | -| dotStyle | - | `object` | Allow custom the dot element. | All | YES | -- | -| dotColor | - | `string` | Allow custom the dot element. | All | YES | -- | -| activeDotColor | - | `string` | Allow custom the active-dot element. | All | YES | -- | -| activeDotStyle | - | `object` | Allow custom the active-dot element. | All | YES | -- | +| Name | Description | Type | Default | platform | HarmonyOS Support | +| :--------------- | :----------------------------------------------------------- | :--------: | :----------------------------------------------------------: | -------- | ----------------- | +| showsPagination | Set to `true` make pagination visible. | `bool` | true | All | YES | +| paginationStyle | Custom styles will merge with the default styles. | `style` | {...} | All | YES | +| renderPagination | Complete control how to render pagination with three params (`index`, `total`, `context`) ref to `this.state.index` / `this.state.total` / `this`, For example: show numbers instead of dots. | `function` | - | All | YES | +| dot | Allow custom the dot element. | `element` | `` | All | YES | +| activeDot | Allow custom the active-dot element. | `element` | `` | All | YES | +| dotStyle | Allow custom the dot element. | `object` | - | All | YES | +| dotColor | Allow custom the dot element. | `string` | - | All | YES | +| activeDotColor | Allow custom the active-dot element. | `string` | - | All | YES | +| activeDotStyle | Allow custom the active-dot element. | `object` | - | All | YES | #### Autoplay -| Prop | Default | Type | Description | platform | HarmonyOS Support | remark | -| :---------------- | :-----: | :------: | :----------------------------------------------- | -------- | ----------------- | ------ | -| autoplay | true | `bool` | Set to `true` enable auto play mode. | All | YES | -- | -| autoplayTimeout | 2.5 | `number` | Delay between auto play transitions (in second). | All | YES | -- | -| autoplayDirection | true | `bool` | Cycle direction control. | All | YES | -- | +| Name | Description | Type | Default | platform | HarmonyOS Support | +| :---------------- | :----------------------------------------------- | :------: | :-----: | -------- | ----------------- | +| autoplay | Set to `true` enable auto play mode. | `bool` | true | All | YES | +| autoplayTimeout | Delay between auto play transitions (in second). | `number` | 2.5 | All | YES | +| autoplayDirection | Cycle direction control. | `bool` | true | All | YES | #### Control buttons @@ -155,37 +165,37 @@ AppRegistry.registerComponent("myproject", () => SwiperComponent); #### Props of Children -| Prop | Default | Type | Description | platform | HarmonyOS Support | remark | -| :---- | :----------------------------------: | :-------: | :------------------------------------------------------------- | -------- | ----------------- | ------ | -| style | {...} | `style` | Custom styles will merge with the default styles. | All | YES | -- | -| title | {...} | `element` | If this parameter is not specified, will not render the title. | All | YES | -- | +| Name | Description | Type | Default | platform | HarmonyOS Support | +| :---- | :----------------------------------------------------------- | :-------: | :----------------------------------: | -------- | ----------------- | +| style | Custom styles will merge with the default styles. | `style` | {...} | All | YES | +| title | If this parameter is not specified, will not render the title. | `element` | {...} | All | YES | #### Basic props of `` -| Prop | Default | Type | Description | platform | HarmonyOS Support | remark | -| :------------------------------- | :-----: | :----: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ----------------- | ---------------------------------------------------------------------------------- | -| horizontal | true | `bool` | If `true`, the scroll view's children are arranged horizontally in a row instead of vertically in a column. | All | YES | -- | -| pagingEnabled | true | `bool` | If true, the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. | All | YES | -- | -| showsHorizontalScrollIndicator | false | `bool` | Set to `true` if you want to show horizontal scroll bar. | All | YES | -- | -| showsVerticalScrollIndicator | false | `bool` | Set to `true` if you want to show vertical scroll bar. | All | YES | -- | -| bounces | false | `bool` | If `true`, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction. If `false`, it disables all bouncing even if the alwaysBounce\* props are true. | All | YES | -- | -| scrollsToTop | false | `bool` | If true, the scroll view scrolls to top when the status bar is tapped. | All | NO | 组件属性继承RNOH scrollview,当前RNOH中的scrollsToTop暂时不支持 | -| removeClippedSubviews | true | `bool` | If true, offscreen child views (whose overflow value is hidden) are removed from their native backing superview when offscreen. This canimprove scrolling performance on long lists. | All | NO | 组件属性继承RNOH scrollview,当前RNOH中的removeClippedSubviews暂时不支持 | -| automaticallyAdjustContentInsets | false | `bool` | Set to `true` if you need adjust content insets automation. | All | NO | 组件属性继承RNOH scrollview,当前RNOH中的automaticallyAdjustContentInsets暂时不支持 | -| scrollEnabled | true | `bool` | Enables/Disables swiping | All | YES | -- | +| Name | Description | Type | Default | platform | HarmonyOS Support | remark | +| :------------------------------- | :----------------------------------------------------------- | :----: | :-----: | -------- | ----------------- | ------------------------------------------------------------ | +| horizontal | If `true`, the scroll view's children are arranged horizontally in a row instead of vertically in a column. | `bool` | true | All | YES | -- | +| pagingEnabled | If true, the scroll view stops on multiples of the scroll view's size when scrolling. This can be used for horizontal pagination. | `bool` | true | All | YES | -- | +| showsHorizontalScrollIndicator | Set to `true` if you want to show horizontal scroll bar. | `bool` | false | All | YES | -- | +| showsVerticalScrollIndicator | Set to `true` if you want to show vertical scroll bar. | `bool` | false | All | YES | -- | +| bounces | If `true`, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction. If `false`, it disables all bouncing even if the alwaysBounce\* props are true. | `bool` | false | All | YES | -- | +| scrollsToTop | If true, the scroll view scrolls to top when the status bar is tapped. | `bool` | false | All | NO | 组件属性继承RNOH scrollview,当前RNOH中的scrollsToTop暂时不支持 | +| removeClippedSubviews | If true, offscreen child views (whose overflow value is hidden) are removed from their native backing superview when offscreen. This canimprove scrolling performance on long lists. | `bool` | true | All | NO | 组件属性继承RNOH scrollview,当前RNOH中的removeClippedSubviews暂时不支持 | +| automaticallyAdjustContentInsets | Set to `true` if you need adjust content insets automation. | `bool` | false | All | NO | 组件属性继承RNOH scrollview,当前RNOH中的automaticallyAdjustContentInsets暂时不支持 | +| scrollEnabled | Enables/Disables swiping | `bool` | true | All | YES | -- | > @see: http://facebook.github.io/react-native/docs/scrollview.html #### Supported ScrollResponder -| Prop | Params | Type | Description | platform | HarmonyOS Support | remark | -| :------------------ | :-----------------------: | :--------: | :---------------------------------------------------------- | -------- | ----------------- | ------ | -| onScrollBeginDrag | `e` / `state` / `context` | `function` | When animation begins after letting up | All | YES | -- | -| onMomentumScrollEnd | `e` / `state` / `context` | `function` | Makes no sense why this occurs first during bounce | All | YES | -- | -| onTouchStartCapture | `e` / `state` / `context` | `function` | Immediately after `onMomentumScrollEnd` | All | YES | -- | -| onTouchStart | `e` / `state` / `context` | `function` | Same, but bubble phase | All | YES | -- | -| onTouchEnd | `e` / `state` / `context` | `function` | You could hold the touch start for a long time | All | YES | -- | -| onResponderRelease | `e` / `state` / `context` | `function` | When lifting up - you could pause forever before \* lifting | All | YES | -- | +| Name | Description | Type | Params | platform | HarmonyOS Support | +| :------------------ | :---------------------------------------------------------- | :--------: | :-----------------------: | -------- | ----------------- | +| onScrollBeginDrag | When animation begins after letting up | `function` | `e` / `state` / `context` | All | YES | +| onMomentumScrollEnd | Makes no sense why this occurs first during bounce | `function` | `e` / `state` / `context` | All | YES | +| onTouchStartCapture | Immediately after `onMomentumScrollEnd` | `function` | `e` / `state` / `context` | All | YES | +| onTouchStart | Same, but bubble phase | `function` | `e` / `state` / `context` | All | YES | +| onTouchEnd | You could hold the touch start for a long time | `function` | `e` / `state` / `context` | All | YES | +| onResponderRelease | When lifting up - you could pause forever before \* lifting | `function` | `e` / `state` / `context` | All | YES | > Note: each ScrollResponder be injected with two params: `state` and `context`, you can get `state` and `context`(ref to swiper's `this`) from params, for example: @@ -211,10 +221,10 @@ var swiper = React.createClass({ #### scrollBy(index, animated) -| Name | Type | default | Description | platform | HarmonyOS Support | remark | -| :------- | :------: | :---------: | :----------- | -------- | ----------------- | ------ | -| index | `number` | `undefined` | offset index | All | YES | -- | -| animated | `bool` | `true` | offset index | All | YES | -- | +| Name | Description | Type | default | platform | HarmonyOS Support | +| :------- | :----------- | :------: | :---------: | -------- | ----------------- | +| index | offset index | `number` | `undefined` | All | YES | +| animated | offset index | `bool` | `true` | All | YES | ### 遗留问题 diff --git a/zh-cn/react-native-zip-archive.md b/zh-cn/react-native-zip-archive.md index c1f0f6f6..792db529 100644 --- a/zh-cn/react-native-zip-archive.md +++ b/zh-cn/react-native-zip-archive.md @@ -1,5 +1,5 @@ -> 模板版本:v0.2.1 +> 模板版本:v0.2.2

react-native-zip-archive

@@ -400,7 +400,9 @@ const styles = StyleSheet.create({ }) ``` +## 使用 Codegen +本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 ## Link -- Gitee From fda4c65c90b247971e473f733922991caa92b8ae Mon Sep 17 00:00:00 2001 From: feng Date: Wed, 3 Jul 2024 17:23:18 +0800 Subject: [PATCH 2/3] =?UTF-8?q?docs:=20[Issues:=20#IAAB34]=20=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=A3=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/qrcode-generator.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/zh-cn/qrcode-generator.md b/zh-cn/qrcode-generator.md index 1441dd05..965c346c 100644 --- a/zh-cn/qrcode-generator.md +++ b/zh-cn/qrcode-generator.md @@ -83,7 +83,7 @@ export const CustomQrCode = ({ text, style }) => { | errorCorrectionLevel | Error correction level ('L', 'M', 'Q', 'H') | string | Yes | IOS/Android | Yes | | s | string to encode | string | Yes | IOS/Android | Yes | | data | string to encode | string | Yes | IOS/Android | Yes | -| mode | Mode ('Numeric', 'Alphanumeric', 'Byte'(default), 'Kanji') | Yes | | IOS/Android | | +| mode | Mode ('Numeric', 'Alphanumeric', 'Byte'(default), 'Kanji') | function | Yes | IOS/Android | Yes | | row | 0 ~ moduleCount - 1 | number | Yes | IOS/Android | Yes | | col | 0 ~ moduleCount - 1 | number | Yes | IOS/Android | Yes | | cellSize | default: 2 | function | No | IOS/Android | Yes | @@ -96,19 +96,19 @@ export const CustomQrCode = ({ text, style }) => { > [!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| ----------------------------------------- | ------------------------------------------------------------ | -------- | ----------- | ----------- | ----------------- | -| QRCode(typeNumber,errorCorrectionLevel) | Create a QRCode Object. | function | Yes | IOS/Android | Yes | -| QRCode.stringToBytes(s) | Encodes a string into an array of number(byte) using any charset. This function is used by internal. Overwrite this function to encode using a multibyte charset. | function | Yes | IOS/Android | Yes | -| QRCode.make() | Make a QR Code. | function | IOS/Android | Yes | Yes | -| QRCode.getModuleCount() | The number of modules(cells) for each orientation. [Note] call make() before this function. | function | IOS/Android | Yes | Yes | -| QRCode.isDark(row,col) | The module at row and col is dark or not. [Note] call make() before this function. | function | IOS/Android | Yes | Yes | -| QRCode.addData(data,mode) | Add a data to encode. | function | Yes | IOS/Android | Yes | -| QRCode.createDataURL(cellSize, margin) | Generate base64 links,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | -| QRCode.createImgTag(cellSize, margin,alt) | Generate img tag QR code,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | -| QRCode.createSvgTag(cellSize, margin) | Generate QR codes for svg tags,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | -| QRCode.createTableTag(cellSize, margin) | Generate QR codes for table tags,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | -| QRCode.createASCII(cellSize, margin) | Generate ASCII code,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| ----------------------------------------- | ------------------------------------------------------------ | -------- | -------- | ----------- | ----------------- | +| QRCode(typeNumber,errorCorrectionLevel) | Create a QRCode Object. | function | Yes | IOS/Android | Yes | +| QRCode.stringToBytes(s) | Encodes a string into an array of number(byte) using any charset. This function is used by internal. Overwrite this function to encode using a multibyte charset. | function | Yes | IOS/Android | Yes | +| QRCode.make() | Make a QR Code. | function | Yes | IOS/Android | Yes | +| QRCode.getModuleCount() | The number of modules(cells) for each orientation. [Note] call make() before this function. | function | Yes | IOS/Android | Yes | +| QRCode.isDark(row,col) | The module at row and col is dark or not. [Note] call make() before this function. | function | Yes | IOS/Android | Yes | +| QRCode.addData(data,mode) | Add a data to encode. | function | Yes | IOS/Android | Yes | +| QRCode.createDataURL(cellSize, margin) | Generate base64 links,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | +| QRCode.createImgTag(cellSize, margin,alt) | Generate img tag QR code,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | +| QRCode.createSvgTag(cellSize, margin) | Generate QR codes for svg tags,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | +| QRCode.createTableTag(cellSize, margin) | Generate QR codes for table tags,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | +| QRCode.createASCII(cellSize, margin) | Generate ASCII code,Helper functions for HTML. [Note] call make() before these functions. | function | Yes | IOS/Android | Yes | ## 遗留问题 -- Gitee From 9fcc93c07320de55fe42c0143707264659810cc4 Mon Sep 17 00:00:00 2001 From: feng Date: Thu, 4 Jul 2024 11:28:18 +0800 Subject: [PATCH 3/3] =?UTF-8?q?docs:=20[Issues:=20#IAAIC8]=20react-native-?= =?UTF-8?q?code-push=20=E4=BF=AE=E6=94=B9=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/react-native-code-push.md | 221 +++++++++++++++++++++++++++++--- 1 file changed, 204 insertions(+), 17 deletions(-) diff --git a/zh-cn/react-native-code-push.md b/zh-cn/react-native-code-push.md index 93f1e605..8bf732dd 100644 --- a/zh-cn/react-native-code-push.md +++ b/zh-cn/react-native-code-push.md @@ -21,21 +21,208 @@ ### code-push-cli -请到三方库下载并安装[code-push-cli](https://github.com/react-native-oh-library/react-native-code-push/tree/sig/code-push-cli) 脚手架,本仓库的目的是为了适配开源的code-push-server.源库地址[code-push-cli](https://github.com/shm-open/code-push-cli) +1.下载源库地址[code-push-cli](https://github.com/shm-open/code-push-cli),`npm install -g @shm-open/code-push-cli` + +2.修改`src\lib\react-native-utils.ts` + +```diff ++31 if (command.platform === 'ios' || command.platform === 'harmony') { + ... ++49 const iOSDirectory: string = command.platform; + ... + } +... ++530 export function getiOSHermesEnabled(platform: string,podFile: string): Promise { ++531 let podPath = path.join(platform, 'Podfile'); + ... + } +``` + +3.修改`src\commands\debug.ts` + +```diff +class iOSDebugPlatform implements IDebugPlatform { + ... +} ++class HarmonyPlatform implements IDebugPlatform { ++ private getSimulatorID(): string { ++ const output: any = simctl.list({ devices: true, silent: true }); ++ const simulators: string[] = output.json.devices ++ .map((platform: any) => platform.devices) ++ .reduce((prev: any, next: any) => prev.concat(next)) ++ .filter((device: any) => device.state === 'Booted') ++ .map((device: any) => device.id); ++ ++ return simulators[0]; ++ } ++ ++ public getLogProcess(): any { ++ if (process.platform !== 'darwin') { ++ throw new Error('harmony debug logs can only be viewed on OS X.'); ++ } ++ ++ const simulatorID: string = this.getSimulatorID(); ++ if (!simulatorID) { ++ throw new Error('No harmony simulators found. Re-run this command after starting one.'); ++ } ++ ++ const logFilePath: string = path.join( ++ process.env.HOME, ++ 'Library/Logs/CoreSimulator', ++ simulatorID, ++ 'system.log', ++ ); ++ return childProcess.spawn('tail', ['-f', logFilePath]); ++ } ++ ++ public normalizeLogMessage(message: string): string { ++ return message; ++ } ++} +``` + +4.修改`src\command-parser.ts` + +```diff ++341 .example( ++342 'app add MyApp harmony react-native', ++343 'Adds app "MyApp", indicating that it\'s an Harmony React Native app', ++344 ) + ... ++437 .example('debug harmony', 'View the CodePush debug logs for the Harmony simulator'); + ... ++838 .example( ++839 'release-cordova MyApp harmony', ++840 'Releases the Cordova Harmony project in the current working directory to the "MyApp" app\'s "Staging" deployment', ++841 ) + ... ++941 .example( ++942 'release-react MyApp harmony', ++943 'Releases the React Native Harmony project in the current working directory to the "MyApp" app\'s "Staging" deployment', ++944 ) +``` + +5.修改`src\command-executor.ts` + +```diff ++186 else if (normalizedOs === 'harmony') { ++187 os = 'Harmony'; + }else{ + return Promise.reject( + new Error( ++ `"${command.os}" is an unsupported OS. Available options are "ios", "android", "windows" and "harmony".`, + ), + ); + } +... + else{ ++1232 throw new Error('Platform must be either "ios","android" or "harmony".'); + } +... ++1216 if (platform === 'ios' || platform === 'harmony') { + outputFolder = path.join(platformFolder, 'www'); + } +... + else{ ++1234 throw new Error('Platform must be either "ios","android" or "harmony".'); + } +... +1310 switch(platform){ + case 'android': + case 'ios': ++ case 'harmony': + case 'windows': + if (!bundleName) { + bundleName = ++ platform === 'ios' || platform === 'harmony' ? 'main.jsbundle' : `index.${platform}.bundle`; + } + + break; + default: ++ throw new Error('Platform must be "android", "ios", "harmony" ,or "windows".'); +} +... +1405 if (platform === 'android') { + ... ++1416 }else if(platform === 'ios' || platform === 'harmony'){ ++1417 return getiOSHermesEnabled(platform,command.podFile).then((isHermesEnabled) => { + ... + }); + } + +``` + +6.发包命令 ``` -code-push -v // 2.6.5 -code-push login //登录 -code-push app add harmony react-native //创建应用 -code-push app list //列出账号下所有的app -code-push deployment ls -k //查询部署环境的key -code-push deployment ls //查看 应用部署信息 code-push release "<版本号>" --description "" -m //发布命令,加-m是强制更新, * 代表所有版本,例如:code-push release CodePush_Local ./bundle.harmony.js "*" --description "v1.0.0 测试更新" ``` ### code-push-server -请到三方库下载并搭建[code-push-server](https://github.com/react-native-oh-library/react-native-code-push/tree/sig/code-push-server) 服务,此库担任类似中间仓库的角色,开发者可以把更新(JS,HTML,CSS和图片)发布到这个仓库上,然后那些Apps就能查询到更新了.源库地址[code-push-server](https://github.com/shm-open/code-push-server) +1.下载并搭建[code-push-server](https://github.com/shm-open/code-push-server) 服务 + +2.修改`src\core\const.ts` + +```diff ++ export const HARMONY = 4; ++ export const HARMONY_NAME = 'Harmony'; +``` + +3.修改`src\core\services\app-manager.ts` + +```diff +import { AppError } from '../app-error'; +import { + ... ++ HARMONY, ++ HARMONY_NAME, + ... +} from '../const'; +... +125 else if (info.os === WINDOWS) { +126 os = WINDOWS_NAME; ++127 }else if(info.os === HARMONY){ ++128 os = HARMONY_NAME; + } +... +``` + +4.修改`src\core\utils\security.ts` + +```diff ++ import { ANDROID, HARMONY, IOS } from '../const'; +... +142 const aregex = /android\.bundle/; +143 const aregexIOS = /main\.jsbundle/; ++144 const aregexHarmony = /harmony\.jsbundle/; + ... ++155 if (aregexHarmony.test(value)) { ++156 packageType = HARMONY; ++157 return false; ++158 } +``` + +5.修改`src\routes\apps.ts` + +```diff +import { + ... ++ HARMONY, ++ HARMONY_NAME, + .... +} from '../core/const'; + + +1212 else if (osName === _.toLower(WINDOWS_NAME)) { +1213 os = WINDOWS; ++1214 } else if (osName === _.toLower(HARMONY_NAME)) { ++1215 os = HARMONY; + } else { ++1217 res.status(406).send('Please input os [iOS|Android|Windows|Harmony]!'); + return; + } +``` ## 安装与使用 @@ -402,15 +589,15 @@ build() { 当使用**CodePush.SyncStatus**时,codePushStatusDidChange回调函数中获取应用状态 -| Name | Description | Type | Required | Platform | HarmonyOS Support | -| -------------------- | ------------------------------------------------------------------- | -------- | -------- | ----------- | ----------------- | -| UP_TO_DATE | 值为0,代表应用程序已完全更新到配置的部署, | number | no | Android IOS | yes | -| UPDATE_INSTALLED | 值为1,已安装可用更新,并将在syncStatusChangedCallback函数返回后立即运行或在下次应用程序恢复/重新启动时运行 | number | no | Android IOS | yes | -| UNKNOWN_ERROR | 值为3,同步操作发现未知错误 | number | no | Android IOS | yes | -| CHECKING_FOR_UPDATE | 值为5,正在查询 CodePush 服务器是否有更新 | number | no | Android IOS | yes | -| AWAITING_USER_ACTION | 值为6,有更新可用,并向最终用户显示确认对话框。(仅在updateDialog使用时适用) | number | no | Android IOS | yes | -| DOWNLOADING_PACKAGE | 值为7,在从 CodePush 服务器下载可用更新 | number | no | Android IOS | yes | -| INSTALLING_UPDATE | 值为8,已下载可用更新并将安装 | 参number数 | no | Android IOS | yes | +| Name | Description | Type | Required | Platform | HarmonyOS Support | +| -------------------- | ------------------------------------------------------------------- | ------ | -------- | ----------- | ----------------- | +| UP_TO_DATE | 值为0,代表应用程序已完全更新到配置的部署, | number | no | Android IOS | yes | +| UPDATE_INSTALLED | 值为1,已安装可用更新,并将在syncStatusChangedCallback函数返回后立即运行或在下次应用程序恢复/重新启动时运行 | number | no | Android IOS | yes | +| UNKNOWN_ERROR | 值为3,同步操作发现未知错误 | number | no | Android IOS | yes | +| CHECKING_FOR_UPDATE | 值为5,正在查询 CodePush 服务器是否有更新 | number | no | Android IOS | yes | +| AWAITING_USER_ACTION | 值为6,有更新可用,并向最终用户显示确认对话框。(仅在updateDialog使用时适用) | number | no | Android IOS | yes | +| DOWNLOADING_PACKAGE | 值为7,在从 CodePush 服务器下载可用更新 | number | no | Android IOS | yes | +| INSTALLING_UPDATE | 值为8,已下载可用更新并将安装 | number | no | Android IOS | yes | -- Gitee