diff --git a/zh-cn/react-native-camera-kit.md b/zh-cn/react-native-camera-kit.md index 034f57f5d504f9d4373cbd261f08a52119a77e72..e8d0f6c5b9b848dc329fab793d7d4f51cc589a36 100644 --- a/zh-cn/react-native-camera-kit.md +++ b/zh-cn/react-native-camera-kit.md @@ -18,23 +18,37 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-library/react-native-camera-kit Releases](https://github.com/react-native-oh-library/react-native-camera-kit/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: -进入到工程目录并输入以下命令: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 14.0.1 | [@react-native-oh-library/react-native-camera-kit Releases](https://github.com/react-native-oh-library/react-native-camera-kit/releases) | 0.72 | +| 15.1.0 | [@react-native-ohos/react-native-camera-kit Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +进入到工程目录并输入以下命令: #### npm ```bash +# V14.0.1 npm install @react-native-oh-tpl/react-native-camera-kit + +# V15.1.0 +npm install @react-native-ohos/react-native-camera-kit ``` #### yarn ```bash +# V14.0.1 yarn add @react-native-oh-tpl/react-native-camera-kit + +# V15.1.0 +yarn add @react-native-ohos/react-native-camera-kit ``` @@ -191,6 +205,8 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 +- V14.0.1 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -198,6 +214,15 @@ const styles = StyleSheet.create({ } ``` +- V15.1.0 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-camera-kit": "file:../../node_modules/@react-native-ohos/react-native-camera-kit/harmony/camera_kit.har" + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -217,8 +242,12 @@ ohpm install ```diff ... +// V14.0.1 + import { RTNCameraKitView } from "@react-native-oh-tpl/react-native-camera-kit"; +// V15.1.0 ++ import { RTNCameraKitView } from "@react-native-ohos/react-native-camera-kit"; + @Builder export function buildCustomRNComponent(ctx: ComponentBuilderContext) { ... @@ -246,8 +275,12 @@ export function buildCustomRNComponent(ctx: ComponentBuilderContext) { ```diff ... +// V14.0.1 + import { RTNCameraKitPackage } from "@react-native-oh-tpl/react-native-camera-kit/ts"; +// V15.1.0 ++ import { RTNCameraKitPackage } from "@react-native-ohos/react-native-camera-kit/ts"; + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), @@ -275,7 +308,12 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-library/react-native-camera-kit Releases](https://github.com/react-native-oh-library/react-native-camera-kit/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 14.0.1 | [@react-native-oh-library/react-native-camera-kit Releases](https://github.com/react-native-oh-library/react-native-camera-kit/releases) | 0.72 | +| 15.1.0 | [@react-native-ohos/react-native-camera-kit Releases]() | 0.77 | ### 权限要求 @@ -398,6 +436,7 @@ ohpm install | laserColor | Color of barcode scanner laser visualization. Default: `red` | string | no | All | yes | | frameColor | Color of barcode scanner frame visualization. Default: `yellow` | string | no | All | yes | | onReadCode | Callback when scanner successfully reads barcode. Returned event contains `codeStringValue`. Default: `null`. Ex: `onReadCode={(event) => console.log(event.nativeEvent.codeStringValue)} | Function | no | All | yes | +| barcodeFrameSize | Frame size of barcode scanner. Default: `{ width: 300, height: 150 }` | object | no | All | yes | ## 静态方法 diff --git a/zh-cn/react-native-contacts.md b/zh-cn/react-native-contacts.md index 67da3312ea38b66aa4b2d8a2c00c197c42123485..d5fa08e3a4e2c4cd461d29e67a6c8cee491cdc18 100644 --- a/zh-cn/react-native-contacts.md +++ b/zh-cn/react-native-contacts.md @@ -16,7 +16,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-contacts Releases](https://github.com/react-native-oh-library/react-native-contacts/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 7.0.7 | [@react-native-oh-tpl/react-native-contacts Releases](https://github.com/react-native-oh-library/react-native-contacts/releases) | 0.72 | +| 8.0.5 | [@react-native-ohos/react-native-contacts Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +32,21 @@ #### **npm** ```bash +# V7.0.7 npm install @react-native-oh-tpl/react-native-contacts + +# V8.0.5 +npm install @react-native-ohos/react-native-contacts ``` #### **yarn** ```bash +# V7.0.7 yarn add @react-native-oh-tpl/react-native-contacts + +# V8.0.5 +yarn add @react-native-ohos/react-native-contacts ``` @@ -362,6 +377,8 @@ export const ContactsDemo = () => { 打开 `entry/oh-package.json5`,添加以下依赖 +- V7.0.7 + ```json "dependencies": { "@rnoh/react-native-openharmony" : "file:../react_native_openharmony", @@ -369,6 +386,15 @@ export const ContactsDemo = () => { } ``` +- V8.0.5 + +```json +"dependencies": { + "@rnoh/react-native-openharmony" : "file:../react_native_openharmony", + "@react-native-ohos/react-native-contacts": "file:../../node_modules/@react-native-ohos/react-native-contacts/harmony/contacts.har" + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -388,8 +414,12 @@ ohpm install ```diff ... +// V7.0.7 + import {ContactsPackage} from '@react-native-oh-tpl/react-native-contacts/ts'; +// V8.0.5 ++ import {ContactsPackage} from '@react-native-ohos/react-native-contacts/ts'; + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [new SamplePackage(ctx), + new ContactsPackage(ctx)]; @@ -415,7 +445,12 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-contacts Releases](https://github.com/react-native-oh-library/react-native-contacts/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 7.0.7 | [@react-native-oh-tpl/react-native-contacts Releases](https://github.com/react-native-oh-library/react-native-contacts/releases) | 0.72 | +| 8.0.5 | [@react-native-ohos/react-native-contacts Releases]() | 0.77 | ### 权限要求 diff --git a/zh-cn/react-native-file-viewer.md b/zh-cn/react-native-file-viewer.md index cf05fce417e47cd22c8211d31d13127886d5351d..7a2659eaf97d9abdefb04b5ef9339afc2e629538 100644 --- a/zh-cn/react-native-file-viewer.md +++ b/zh-cn/react-native-file-viewer.md @@ -17,7 +17,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-file-viewer Releases](https://github.com/react-native-oh-library/react-native-file-viewer/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.1.6 | [@react-native-oh-tpl/react-native-file-viewer Releases](https://github.com/react-native-oh-library/react-native-file-viewer/releases) | 0.72 | +| 2.1.6 | [@react-native-ohos/react-native-file-viewer Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -26,13 +33,21 @@ #### **npm** ```bash +# V2.1.6 npm install @react-native-oh-tpl/react-native-file-viewer + +# V2.1.6 +npm install @react-native-ohos/react-native-file-viewer ``` #### **yarn** ```bash +# V2.1.6 yarn add @react-native-oh-tpl/react-native-file-viewer + +# V2.1.6 +yarn add @react-native-ohos/react-native-file-viewer ``` @@ -163,6 +178,8 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 +- V2.1.6 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -170,6 +187,15 @@ const styles = StyleSheet.create({ } ``` +- V2.1.6 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-file-viewer": "file:../../node_modules/@react-native-ohos/react-native-file-viewer/harmony/file_viewer.har" + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -189,8 +215,12 @@ ohpm install ```diff ... +// V2.1.6 + import { RNFileViewerPackage } from '@react-native-oh-tpl/react-native-file-viewer/ts'; +// V2.1.6 ++ import { RNFileViewerPackage } from '@react-native-ohos/react-native-file-viewer/ts'; + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), @@ -218,7 +248,12 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-file-viewer Releases](https://github.com/react-native-oh-library/react-native-file-viewer/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.1.6 | [@react-native-oh-tpl/react-native-file-viewer Releases](https://github.com/react-native-oh-library/react-native-file-viewer/releases) | 0.72 | +| 2.1.6 | [@react-native-ohos/react-native-file-viewer Releases]() | 0.77 | ## API diff --git a/zh-cn/react-native-modal-popover.md b/zh-cn/react-native-modal-popover.md index a942adbcc040508fc3dd31a71e79318628048e45..99aeb8798300a8ff879d9610fb306d7c061460c7 100644 --- a/zh-cn/react-native-modal-popover.md +++ b/zh-cn/react-native-modal-popover.md @@ -16,7 +16,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-modal-popover Releases](https://github.com/react-native-oh-library/react-native-modal-popover/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.1.3 | [@react-native-oh-tpl/react-native-modal-popover Releases](https://github.com/react-native-oh-library/react-native-modal-popover/releases) | 0.72 | +| 2.1.3 | [@react-native-ohos/react-native-modal-popover Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +32,21 @@ #### **npm** ```bash +# V2.1.3 npm install @react-native-oh-tpl/react-native-modal-popover + +# V2.1.3 +npm install @react-native-ohos/react-native-modal-popover ``` #### **yarn** ```bash +# V2.1.3 yarn add @react-native-oh-tpl/react-native-modal-popover + +# V2.1.3 +yarn add @react-native-ohos/react-native-modal-popover ``` @@ -266,7 +281,12 @@ export function PopoverCenterExample() { 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-modal-popover Releases](https://github.com/react-native-oh-library/react-native-modal-popover/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 2.1.3 | [@react-native-oh-tpl/react-native-modal-popover Releases](https://github.com/react-native-oh-library/react-native-modal-popover/releases) | 0.72 | +| 2.1.3 | [@react-native-ohos/react-native-modal-popover Releases]() | 0.77 | ## 属性 diff --git a/zh-cn/react-native-orientation-locker.md b/zh-cn/react-native-orientation-locker.md index 45394872b7b09543b4fcfd1b16fde8c4f92723b7..bc8204ea4085496f75c6810280200a1100a3e63a 100644 --- a/zh-cn/react-native-orientation-locker.md +++ b/zh-cn/react-native-orientation-locker.md @@ -16,23 +16,37 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-library/react-native-orientation-locker Releases](https://github.com/react-native-oh-library/react-native-orientation-locker/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: -进入到工程目录并输入以下命令: +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.7.0 | [@react-native-oh-library/react-native-orientation-locker Releases](https://github.com/react-native-oh-library/react-native-orientation-locker/releases) | 0.72 | +| 1.7.0 | [@react-native-ohos/react-native-orientation-locker Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +进入到工程目录并输入以下命令: #### npm ```bash +# V1.7.0 npm install @react-native-oh-tpl/react-native-orientation-locker + +# V1.7.0 +npm install @react-native-ohos/react-native-orientation-locker ``` #### yarn ```bash +# V1.7.0 yarn add @react-native-oh-tpl/react-native-orientation-locker + +# V1.7.0 +yarn add @react-native-ohos/react-native-orientation-locker ``` @@ -241,6 +255,8 @@ const styles = StyleSheet.create({ 打开 `entry/oh-package.json5`,添加以下依赖 +- V1.7.0 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -248,6 +264,15 @@ const styles = StyleSheet.create({ } ``` +- V1.7.0 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-orientation-locker":"file:../../node_modules/@react-native-ohos/react-native-orientation-locker/harmony/orientation_locker.har" + } +``` + 点击右上角的 `sync` 按钮 或者在终端执行: @@ -263,6 +288,8 @@ ohpm install 打开 `entry/oh-package.json5`,添加以下依赖 +- V1.7.0 + ```json "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", @@ -270,6 +297,15 @@ ohpm install } ``` +- V1.7.0 + +```json +"dependencies": { + "@rnoh/react-native-openharmony": "file:../react_native_openharmony", + "@react-native-ohos/react-native-orientation-locker":"file:../../node_modules/@react-native-ohos/react-native-orientation-locker/harmony/orientation_locker" + } +``` + 打开终端,执行: ```bash @@ -283,7 +319,12 @@ ohpm install --no-link ```diff ... +// V1.7.0 + import { RNOrientationLockerPackage } from '@react-native-oh-tpl/react-native-orientation-locker/ts'; + +// V1.7.0 ++ import { RNOrientationLockerPackage } from '@react-native-ohos/react-native-orientation-locker/ts'; + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ new SamplePackage(ctx), @@ -311,12 +352,17 @@ ohpm install 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-library/react-native-orientation-locker Releases](https://github.com/react-native-oh-library/react-native-orientation-locker/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ---------- | ------------------------------------------------------------ | ---------- | +| 1.7.0 | [@react-native-oh-library/react-native-orientation-locker Releases](https://github.com/react-native-oh-library/react-native-orientation-locker/releases) | 0.72 | +| 1.7.0 | [@react-native-ohos/react-native-orientation-locker Releases]() | 0.77 | 本文档内容基于以下版本验证通过: 1. RNOH: 0.72.20; SDK:HarmonyOS NEXT Developer Beta1; IDE:DevEco Studio 5.0.3.200; ROM:3.0.0.18; -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; +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; ### 权限要求 由于此库获取加速度传感器的数据,使用时需要配置对应的权限,权限需配置在entry/src/main目录下module.json5 中添加如下权限: