+
+> [!TIP] [GitCode 地址](https://gitcode.com/openharmony-sig/rntpc_react-navigation/tree/master/packages/react-native-drawer-layout)
+
+## 安装与使用
+
+进入到工程目录并输入以下命令:
+
+#### **npm**
+
+```bash
+npm install @react-native-ohos/react-native-drawer-layout
+```
+
+#### **yarn**
+
+```bash
+yarn add @react-native-ohos/react-native-drawer-layout
+```
+
+下面的代码展示了这个库的基本使用场景:
+
+> [!WARNING] 使用时 import 的库名不变。
+
+```js
+import * as React from 'react';
+import { Text, Button } from 'react-native';
+import { Drawer } from 'react-native-drawer-layout';
+
+export default function DrawerExample() {
+ const [open, setOpen] = React.useState(false);
+
+ return (
+ setOpen(true)}
+ onClose={() => setOpen(false)}
+ renderDrawerContent={() => {
+ return Drawer content;
+ }}
+ >
+
+ );
+}
+```
+
+## Link
+本库依赖以下三方库,请查看对应文档:
++ [@react-native-oh-tpl/react-native-gesture-handler](/zh-cn/react-native-gesture-handler.md)
++ [@react-native-oh-tpl/react-native-reanimated](/zh-cn/react-native-reanimated.md)
+
+本库 HarmonyOS 侧实现依赖@react-native-oh-tpl/react-native-gesture-handler、@react-native-oh-tpl/react-native-reanimated 的原生端代码,如已在 HarmonyOS 工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。
+
+如未引入请参照[@react-native-oh-tpl/react-native-gesture-handler 文档的 Link 章节](/zh-cn/react-native-gesture-handler.md#link)、[@react-native-oh-tpl/react-native-reanimated 文档的 Link 章节](/zh-cn/react-native-reanimated.md#link)
+
+## 约束与限制
+
+### 兼容性
+
+要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
+
+请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-library/react-navigation Releases](https://github.com/react-native-oh-library/react-navigation/releases)
+
+## 属性
+
+> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。
+
+> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。
+
+**Props**
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|----------|-------------|-------------------|
+| open | Whether the drawer is open or not. | boolean | no | all | yes |
+| onOpen | Callback which is called when the drawer is opened. | void | no | all | yes |
+| onClose | Callback which is called when the drawer is closed. | void | no | all | yes |
+| renderDrawerContent | Callback which returns a react element to render as the content of the drawer. | void | no | all | yes |
+| layout | Object containing the layout of the container. Defaults to the dimensions of the application's window. | 'width','height' | no | all | yes |
+| drawerPosition | Position of the drawer on the screen. Defaults to in RTL mode, otherwise .rightleft | 'left'|'right' | no | all | yes |
+| drawerType | Type of the drawer. It determines how the drawer looks and animates. | 'front'|'back'|'slide'|'permanent' | no | all | yes |
+| drawerStyle | Style object for the drawer. You can pass a custom background color for drawer or a custom width for the drawer. | StyleProp | no | all | yes |
+| overlayStyle | Style object for the overlay. | StyleProp | no | all | yes |
+| hideStatusBarOnOpen | Whether the statusbar should be hidden when the drawer is pulled or opens. | boolean | no | all | yes |
+| keyboardDismissMode | Whether the keyboard should be dismissed when the swipe gesture begins. | 'none'|'on-drag' | no | Android,IOS | no |
+| statusBarAnimation | Animation of the statusbar when hiding it. Use in combination with hideStatusBarOnOpen. | 'slide'|'fade'|'none' | no | all | no |
+| swipeEnabled | Whether you can use swipe gestures to open or close the drawer. | boolean | no | Android,IOS | no |
+| swipeEdgeWidth | How far from the edge of the screen the swipe gesture should activate. | number | no | Android,IOS | no |
+| swipeMinDistance | Minimum swipe distance that should activate opening the drawer. | number | no | Android,IOS | no |
+| swipeMinVelocity | Minimum swipe velocity that should activate opening the drawer. | number | no | Android,IOS | no |
+| configureGestureHandler | Function to modify the pan gesture handler via RNGH properties API. | PanGesture | no | Android,IOS | yes |
+| children | Content that the drawer should wrap. | PanGesture | no | all | yes |
+| useDrawerProgress | The hook returns a Reanimated which represents the progress of the drawer. It can be used to animate the content of the screen. | void | no | all | yes |
+
+
+## 遗留问题
+
+## 其他
+
+## 开源协议
+
+本项目基于 [The MIT License (MIT)](https://github.com/react-navigation/react-navigation/blob/main/packages/react-native-drawer-layout/LICENSE) ,请自由地享受和参与开源。
\ No newline at end of file
diff --git a/zh-cn/react-native-image-crop-picker.md b/zh-cn/react-native-image-crop-picker.md
index ed41411c..894845d2 100644
--- a/zh-cn/react-native-image-crop-picker.md
+++ b/zh-cn/react-native-image-crop-picker.md
@@ -6,16 +6,16 @@
本项目基于 [react-native-image-crop-picker@0.40.3](https://github.com/ivpusic/react-native-image-crop-picker/tree/v0.40.3) 开发。
-| Version | Package Name | Repository | Release |
-| --------------------------- | ------------------------------------ | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
-| <= 0.40.3-0.0.14@deprecated | @react-native-oh-tpl/react-native-image-crop-picker | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-image-crop-picker) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-image-crop-picker/releases) |
-| >= 0.40.4 | @react-native-ohos/react-native-image-crop-picker | [Gitee](https://gitee.com/openharmony-sig/rntpc_react-native-image-crop-picker) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_react-native-image-crop-picker/releases) |
+| Version | Package Name | Repository | Release | Version for RN |
+| --------------------------- | --------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -------------- |
+| <= 0.40.3-0.0.14@deprecated | @react-native-oh-tpl/react-native-image-crop-picker | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-image-crop-picker) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-image-crop-picker/releases) | 0.72 |
+| >= 0.40.4 | @react-native-ohos/react-native-image-crop-picker | [Gitee](https://gitee.com/openharmony-sig/rntpc_react-native-image-crop-picker) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_react-native-image-crop-picker/releases) | 0.72 |
+| 0.50.1 | @react-native-ohos/react-native-image-crop-picker | [Gitcode]() | [Gitcode Releases]() | 0.77 |
## 1.安装与使用
进入到工程目录并输入以下命令:
-
#### **npm**
@@ -908,8 +908,6 @@ export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
}
```
-
-
### 2.5. 配置Entry
**(1)在 entry/src/main/ets/entryability 下创建 ImageEditAbility.ets**
diff --git a/zh-cn/react-native-image-editor.md b/zh-cn/react-native-image-editor.md
index 655d84d4..b05354d8 100644
--- a/zh-cn/react-native-image-editor.md
+++ b/zh-cn/react-native-image-editor.md
@@ -8,10 +8,11 @@
该第三方库的仓库已迁移至 Gitee,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/image-editor`,具体版本所属关系如下:
-| Version | Package Name | Repository | Release |
-| ------------------------- | ------------------------------------------------- | ------------------ | -------------------------- |
-| <= 3.2.1@deprecated | @react-native-oh-tpl/image-editor | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-image-editor) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-image-editor/releases) |
-| > 3.2.1 | @react-native-ohos/image-editor | [Gitee](https://gitee.com/openharmony-sig/rntpc_react-native-image-editor) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_react-native-image-editor/releases) |
+| Version | Package Name | Repository | Release | Version for RN |
+| ------------------------- | ------------------------------------------------- | ------------------ | -------------------------- | ------------------------- |
+| <= 3.2.1@deprecated | @react-native-oh-tpl/image-editor | [Github(deprecated)](https://github.com/react-native-oh-library/react-native-image-editor) | [Github Releases(deprecated)](https://github.com/react-native-oh-library/react-native-image-editor/releases) | 0.72 |
+| > 3.2.1 | @react-native-ohos/image-editor | [Gitee](https://gitee.com/openharmony-sig/rntpc_react-native-image-editor) | [Gitee Releases](https://gitee.com/openharmony-sig/rntpc_react-native-image-editor/releases) | 0.72 |
+| 4.3.1 | @react-native-ohos/image-editor | [Gitcode]() | [Gitcode Releases]() | 0.77 |
## 1. 安装与使用
@@ -100,6 +101,8 @@ export default class ImageEditorComponent extends Component {
Alert.alert("The cropped size exceeds the original size");
return;
}
+
+ // > V3.2.1 begin
const croppedImageURI = await ImageEditor.cropImage(
this.state.photoUri,
cropData
@@ -112,7 +115,23 @@ export default class ImageEditorComponent extends Component {
height: cropData.size.height,
},
});
-
+ // > V3.2.1 end
+
+ // V4.3.1 begin
+ const cropResult = await ImageEditor.cropImage(
+ this.state.photoUri,
+ cropData
+ );
+ if (cropResult && cropResult.uri) {
+ this.setState({
+ croppedImageURI: cropResult.uri,
+ targetSize: {
+ width: cropData.size.width,
+ height: cropData.size.height
+ }
+ });
+ // V4.3.1 end
+
if (this.state.targetSize && this.state.targetSize.width >= this.state.targetSize.height) {
this.setState({
cropHorizontal: true,
@@ -311,6 +330,7 @@ ohpm install
> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。
+### ImageCropData
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| ---- | ----------- | ---- | -------- | -------- | ------------------ |
@@ -320,6 +340,21 @@ ohpm install
| `resizeMode` | Resizing mode to use when scaling the image**Default value**: `'cover'` | string | no | All | yes |
| `quality` | A value in range `0.0` - `1.0` specifying compression level of the result image. `1` means no compression (highest quality) and `0` the highest compression (lowest quality) **Default value**: `0.9` | number | no | All | yes |
| `format` | The format of the resulting image. **Default value**: based on the provided image; if value determination is not possible, `'jpeg'` will be used as a fallback. | string | no | All | yes |
+| `includeBase64`4.3.1+ | Indicates if Base64 formatted picture data should also be included in the [`CropResult`](#result-cropresult). **Default value**: `false` | boolean | no | All | yes |
+| `headers`4.3.1+ | An object interface representing the HTTP headers to send along with the request for a remote image. | object \| Headers | no | All | yes |
+
+### CropResult4.3.1+
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------ | ------------------------------------------------------------ | ------ | -------- | -------- | ----------------- |
+| url | The path to the image file (example: `'file:///data/user/0/.../image.jpg'`) **WEB:** `uri` is the data URI string (example `'data:image/jpeg;base64,/4AAQ...AQABAA'`) | string | yes | All | yes |
+| path | The URI of the image (example: `'/data/user/0/.../image.jpg'`) **WEB:** `path` is the blob URL (example `'blob:https://example.com/43ff7a16...e46b1'`) | string | yes | All | yes |
+| name | The name of the image file. (example: `'image.jpg'`) | string | yes | All | yes |
+| width | The width of the image in pixels. | number | yes | All | yes |
+| height | Height of the image in pixels. | number | yes | All | yes |
+| size | The size of the image in bytes. | number | yes | All | yes |
+| type | The MIME type of the image (`'image/jpeg'`, `'image/png'`, `'image/webp'`). | string | yes | All | yes |
+| base64 | The base64-encoded image data example: `'/9j/4AAQSkZJRgABAQAAAQABAAD'` if you need data URI as the `source` for an `Image` element for example, you can use `data:${type};base64,${base64}` | string | yes | All | yes |
## 5. API
@@ -329,7 +364,7 @@ ohpm install
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| ---- | ----------- | ---- | -------- | -------- | ------------------ |
-| cropImage | Crop the image specified by the URI param. If URI points to a remote image, it will be downloaded automatically. If the image cannot be loaded/downloaded, the promise will be rejected.
If the cropping process is successful, the resultant cropped image will be stored in the cache path, and the CropResult returned in the promise will point to the image in the cache path. ⚠️ Remember to delete the cropped image from the cache path when you are done with it. | function | yes | ios/Android | yes |
+| cropImage | Crop the image specified by the URI param. If URI points to a remote image, it will be downloaded automatically. If the image cannot be loaded/downloaded, the promise will be rejected.
If the cropping process is successful, the resultant cropped image will be stored in the cache path, and the CropResult returned in the promise will point to the image in the cache path. ⚠️ Remember to delete the cropped image from the cache path when you are done with it. > 3.2.1: public cropImage(uri: string, cropData: ImageCropData): Promise 4.3.1: public cropImage(uri: string, cropData: ImageCropData): Promise | function | yes | ios/Android | yes |
## 6. 遗留问题
diff --git a/zh-cn/react-native-maps.md b/zh-cn/react-native-maps.md
index 54d81d24..a494a464 100644
--- a/zh-cn/react-native-maps.md
+++ b/zh-cn/react-native-maps.md
@@ -16,7 +16,14 @@
## 安装与使用
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-maps Releases](https://github.com/react-native-oh-library/react-native-maps/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
+请到三方库的 Releases 发布地址查看配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 1.10.3 | [@react-native-oh-tpl/react-native-maps Releases](https://github.com/react-native-oh-library/react-native-maps/releases) | 0.72 |
+| 1.24.3 | [@react-native-ohos/react-native-maps Releases]() | 0.77 |
+
+对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
进入到工程目录并输入以下命令:
@@ -25,13 +32,21 @@
#### **npm**
```bash
+# V1.10.3
npm install @react-native-oh-tpl/react-native-maps
+
+# V1.24.3
+npm install @react-native-ohos/react-native-maps
```
#### **yarn**
```bash
+# V1.10.3
yarn add @react-native-oh-tpl/react-native-maps
+
+# V1.24.3
+yarn add @react-native-ohos/react-native-maps
```
@@ -222,6 +237,8 @@ const styles = StyleSheet.create({
打开 `entry/oh-package.json5`,添加以下依赖
+- V1.10.3
+
```json
"dependencies": {
"@rnoh/react-native-openharmony": "file:../react_native_openharmony",
@@ -229,6 +246,15 @@ const styles = StyleSheet.create({
}
```
+- V1.24.3
+
+```json
+"dependencies": {
+ "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
+ "@react-native-ohos/react-native-maps": "file:../../node_modules/@react-native-ohos/react-native-maps/harmony/maps.har"
+ }
+```
+
点击右上角的 `sync` 按钮
或者在终端执行:
@@ -264,7 +290,13 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn)
# RNOH_BEGIN: manual_package_linking_1
add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
+
+# V1.10.3
+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-maps/src/main/cpp" ./maps)
+
+# V1.24.3
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-maps/src/main/cpp" ./maps)
+
# RNOH_END: manual_package_linking_1
file(GLOB GENERATED_CPP_FILES "./generated/*.cpp")
@@ -425,8 +457,12 @@ const arkTsComponentNames: Array = [
```diff
...
+// V1.10.3
+ import {MapsPackage} from '@react-native-oh-tpl/react-native-maps/ts';
+// V1.24.3
++ import {MapsPackage} from '@react-native-ohos/react-native-maps/ts';
+
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
return [
new SamplePackage(ctx),
@@ -454,7 +490,12 @@ ohpm install
要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[react-natvie-maps Releases](https://github.com/react-native-oh-library/react-native-maps/releases)
+请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 1.10.3 | [react-natvie-maps Releases](https://github.com/react-native-oh-library/react-native-maps/releases) | 0.72 |
+| 1.24.3 | [react-natvie-maps Releases]() | 0.77 |
### 权限要求
@@ -551,55 +592,58 @@ ohpm install
### 属性
-| Name | Description | Type | Default | Required | Platform | HarmonyOS Support |
-| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------- | ---------- | -------- | ----------- | ----------------- |
-| provider | The map framework to use. Either `"google"` for GoogleMaps, otherwise `null` or `undefined` to use the native map framework (`MapKit` in iOS and `GoogleMaps` in android). | string | | no | ios/android | no |
-| region | The region to be displayed by the map.The region is defined by the center coordinates and the span of coordinates to display. | Region | | no | ios/android | yes |
-| initialRegion | The initial region to be displayed by the map. Use this prop instead of `region` only if you don't want to control the viewport of the map besides the initial region. | Region | | no | ios/android | yes |
-| camera | The camera view the map should display. If you use this, the `region` property is ignored. | Camera | | no | ios/android | yes |
-| initialCamera | Like `initialRegion`, use this prop instead of `camera` only if you don't want to control the viewport of the map besides the initial camera setting. | Camera | | no | ios/android | yes |
-| mapPadding | Adds custom padding to each side of the map. Useful when map elements/markers are obscured. | EdgePadding | | no | ios/android | yes |
-| paddingAdjustmentBehavior | Indicates how/when to affect padding with safe area insets (`GoogleMaps` in iOS only) | 'always' \ 'automatic' \ 'never' | 'never' | no | ios/android | no |
-| liteMode | Enable [lite mode](https://developers.google.com/maps/documentation/android-sdk/lite#overview_of_lite_mode). **Note**: Android only. | Boolean | false | no | android | no |
-| mapType | The map type to be displayed. | String | "standard" | | ios/android | partially(Support "none", "standard", "terrain") |
-| customMapStyle | Adds custom styling to the map component. | Array | | no | ios/android | yes |
-| userInterfaceStyle | Sets the map to the style selected. Default is whatever the system settings is. **Note:** iOS Maps only (aka MapKit). | 'light'/'dark' | 'light' | no | ios/android | yes |
-| showsUserLocation | If `true` the users location will be shown on the map. **NOTE**: You need runtime location permissions prior to setting this to true, otherwise it is going to _fail silently_! Checkout the excellent [react-native-permissions](https://github.com/zoontek/react-native-permissions) for this. | Boolean | false | no | ios/android | yes |
-| userLocationPriority | Set power priority of user location tracking. See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html). **Note:** Android only. | 'balanced' / 'high' / 'low' / 'passive' | 'high' | no | android | no |
-| userLocationUpdateInterval | Interval of user location updates in milliseconds. See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html). **Note:** Android only. | Number | 5000 | no | android | no |
-| userLocationFastestInterval | Fastest interval the application will actively acquire locations. See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html). **Note:** Android only. | Number | 5000 | no | android | no |
-| userLocationAnnotationTitle | The title of the annotation for current user location. This only works if `showsUserLocation` is true. There is a default value `My Location` set by MapView. **Note**: iOS only. | String | | no | ios | no |
-| followsUserLocation | If `true` the map will focus on the user's location. This only works if `showsUserLocation` is true and the user has shared their location. **Note**: Apple Maps only. | Boolean | false | no | ios | yes |
-| userLocationCalloutEnabled | If `true` clicking user location will show the default callout for userLocation annotation. **Note**: Apple Maps only. | Boolean | false | no | ios | no |
-| showsMyLocationButton | If `false` hide the button to move map to the current user's location. | Boolean | true | no | ios/android | yes |
-| showsPointsOfInterest | If `false` points of interest won't be displayed on the map. **Note**: Apple Maps only. | Boolean | true | no | ios | no |
-| showsCompass | If `false` compass won't be displayed on the map. | Boolean | true | no | ios/android | yes |
-| showsScale | A Boolean indicating whether the map shows scale information. **Note**: Apple Maps only. | Boolean | true | no | ios | yes |
-| showsBuildings | A Boolean indicating whether the map displays extruded building information. | Boolean | true | no | ios/android | yes |
-| showsTraffic | A Boolean value indicating whether the map displays traffic information. | Boolean | false | no | ios/android | yes |
-| showsIndoors | A Boolean indicating whether indoor maps should be enabled. | Boolean | true | no | ios/android | no |
-| showsIndoorLevelPicker | A Boolean indicating whether indoor level picker should be enabled. **Note:** Google Maps only (either Android or iOS with `PROVIDER_GOOGLE`). | Boolean | false | no | ios/android | no |
-| zoomEnabled | If `false` the user won't be able to pinch/zoom the map. | Boolean | true | no | ios/android | yes |
-| zoomTapEnabled | If `false` the user won't be able to double tap to zoom the map. **Note:** But it will greatly decrease delay of tap gesture recognition. **Note:** Google Maps on iOS only | Boolean | true | no | ios/android | yes |
-| zoomControlEnabled | If `false` the zoom control at the bottom right of the map won't be visible **Note:** Android only. | Boolean | true | no | android | yes |
-| minZoomLevel | Minimum zoom value for the map, must be between 0 and 20. **Note:** Deprecated on Apple Maps. Use cameraZoomRange instead. | Number | 0 | no | ios/android | yes |
-| maxZoomLevel | Maximum zoom value for the map, must be between 0 and 20. **Note:** Deprecated on Apple Maps. Use cameraZoomRange instead. | Number | 20 | no | ios/android | yes |
-| rotateEnabled | If `false` the user won't be able to pinch/rotate the map. | Boolean | true | no | ios/android | yes |
-| scrollEnabled | If `false` the user won't be able to adjust the camera’s pitch angle. | Boolean | true | no | ios/android | yes |
-| scrollDuringRotateOrZoomEnabled | If `false` the map will stay centered while rotating or zooming. **Note:** Google Maps only | Boolean | true | no | ios/android | no |
-| pitchEnabled | If `false` the user won't be able to adjust the camera’s pitch angle. | Boolean | true | no | ios/android | yes |
-| toolbarEnabled | `Android only` If `false` will hide 'Navigate' and 'Open in Maps' buttons on marker press. If you enable the toolbar, make sure to [edit your AndroidManifest.xml](https://github.com/react-native-maps/react-native-maps/issues/4403#issuecomment-1219856534) | Boolean | true | no | android | no |
-| cacheEnabled | If `true` map will be cached and displayed as an image instead of being interactable, for performance usage. **Note:** Apple Maps only | Boolean | false | no | ios | no |
-| loadingEnabled | If `true` a loading indicator will show while the map is loading. | Boolean | false | no | ios/android | yes |
-| loadingIndicatorColor | Sets loading indicator color, default to `#606060`. | Color | \#606060 | no | ios/android | yes |
-| loadingBackgroundColor | Sets loading background color, default to `#FFFFFF`. | Color | \#FFFFFF | no | ios/android | yes |
-| tintColor | Sets the tint color of the map. (Changes the color of the position indicator) Defaults to system blue. **Note:** iOS (Apple maps) only. | Color | | no | ios | no |
-| moveOnMarkerPress | `Android only` If `false` the map won't move when a marker is pressed. | Boolean | true | no | android | no |
-| legalLabelInsets | If set, changes the position of the "Legal" label link from the OS default. **Note:** iOS only. | EdgeInsets | | no | ios | no |
-| kmlSrc | The URL from KML file. **Note:** Google Maps and Markers only (either Android or iOS with `PROVIDER_GOOGLE`). | String | | no | ios/android | no |
-| compassOffset | If set, changes the position of the compass. **Note:** iOS Maps only. | Point | | no | ios | yes |
-| isAccessibilityElement | Determines whether the MapView captures VoiceOver touches or forwards them to children. When `true`, map markers are not visible to VoiceOver. **Note:** iOS Maps only. | Boolean | false | no | ios | no |
-| cameraZoomRange | Map camera distance limits. `minCenterCoordinateDistance` for minimum distance, `maxCenterCoordinateDistance` for maximum, `animated` for animated zoom range changes. Takes precedence if conflicting with `minZoomLevel`, `maxZoomLevel`. **Note**: iOS 13.0+ only. | cameraZoomRange | | no | ios | no |
+| Name | Description | Type | Default | Required | Platform | HarmonyOS Support |
+| ------------------------------------------------------ | ------------------------------------------------------------ | --------------------------------------- | ---------- | -------- | ----------- | ------------------------------------------------ |
+| provider | The map framework to use. Either `"google"` for GoogleMaps, otherwise `null` or `undefined` to use the native map framework (`MapKit` in iOS and `GoogleMaps` in android). | string | | no | ios/android | no |
+| region | The region to be displayed by the map.The region is defined by the center coordinates and the span of coordinates to display. | Region | | no | ios/android | yes |
+| initialRegion | The initial region to be displayed by the map. Use this prop instead of `region` only if you don't want to control the viewport of the map besides the initial region. | Region | | no | ios/android | yes |
+| camera | The camera view the map should display. If you use this, the `region` property is ignored. | Camera | | no | ios/android | yes |
+| initialCamera | Like `initialRegion`, use this prop instead of `camera` only if you don't want to control the viewport of the map besides the initial camera setting. | Camera | | no | ios/android | yes |
+| mapPadding | Adds custom padding to each side of the map. Useful when map elements/markers are obscured. | EdgePadding | | no | ios/android | yes |
+| paddingAdjustmentBehavior | Indicates how/when to affect padding with safe area insets (`GoogleMaps` in iOS only) | 'always' \ 'automatic' \ 'never' | 'never' | no | ios/android | no |
+| liteMode | Enable [lite mode](https://developers.google.com/maps/documentation/android-sdk/lite#overview_of_lite_mode). **Note**: Android only. | Boolean | false | no | android | no |
+| mapType | The map type to be displayed. | String | "standard" | | ios/android | partially(Support "none", "standard", "terrain") |
+| customMapStyle | Adds custom styling to the map component. | Array | | no | ios/android | yes |
+| userInterfaceStyle | Sets the map to the style selected. Default is whatever the system settings is. **Note:** iOS Maps only (aka MapKit). | 'light'/'dark' | 'light' | no | ios/android | yes |
+| showsUserLocation | If `true` the users location will be shown on the map. **NOTE**: You need runtime location permissions prior to setting this to true, otherwise it is going to _fail silently_! Checkout the excellent [react-native-permissions](https://github.com/zoontek/react-native-permissions) for this. | Boolean | false | no | ios/android | yes |
+| userLocationPriority | Set power priority of user location tracking. See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html). **Note:** Android only. | 'balanced' / 'high' / 'low' / 'passive' | 'high' | no | android | no |
+| userLocationUpdateInterval | Interval of user location updates in milliseconds. See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html). **Note:** Android only. | Number | 5000 | no | android | no |
+| userLocationFastestInterval | Fastest interval the application will actively acquire locations. See [Google APIs documentation](https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest.html). **Note:** Android only. | Number | 5000 | no | android | no |
+| userLocationAnnotationTitle | The title of the annotation for current user location. This only works if `showsUserLocation` is true. There is a default value `My Location` set by MapView. **Note**: iOS only. | String | | no | ios | no |
+| followsUserLocation | If `true` the map will focus on the user's location. This only works if `showsUserLocation` is true and the user has shared their location. **Note**: Apple Maps only. | Boolean | false | no | ios | yes |
+| userLocationCalloutEnabled | If `true` clicking user location will show the default callout for userLocation annotation. **Note**: Apple Maps only. | Boolean | false | no | ios | no |
+| showsMyLocationButton | If `false` hide the button to move map to the current user's location. | Boolean | true | no | ios/android | yes |
+| showsPointsOfInterestdeprecated from 1.24.3 | If `false` points of interest won't be displayed on the map. **Note**: Apple Maps only. | Boolean | true | no | ios | no |
+| showsCompass | If `false` compass won't be displayed on the map. | Boolean | true | no | ios/android | yes |
+| showsScale | A Boolean indicating whether the map shows scale information. **Note**: Apple Maps only. | Boolean | true | no | ios | yes |
+| showsBuildings | A Boolean indicating whether the map displays extruded building information. | Boolean | true | no | ios/android | yes |
+| showsTrafficdeprecated from 1.24.3 | A Boolean value indicating whether the map displays traffic information. | Boolean | false | no | ios/android | yes |
+| showsIndoors | A Boolean indicating whether indoor maps should be enabled. | Boolean | true | no | ios/android | no |
+| showsIndoorLevelPicker | A Boolean indicating whether indoor level picker should be enabled. **Note:** Google Maps only (either Android or iOS with `PROVIDER_GOOGLE`). | Boolean | false | no | ios/android | no |
+| zoomEnabled | If `false` the user won't be able to pinch/zoom the map. | Boolean | true | no | ios/android | yes |
+| zoomTapEnabled | If `false` the user won't be able to double tap to zoom the map. **Note:** But it will greatly decrease delay of tap gesture recognition. **Note:** Google Maps on iOS only | Boolean | true | no | ios/android | yes |
+| zoomControlEnabled | If `false` the zoom control at the bottom right of the map won't be visible **Note:** Android only. | Boolean | true | no | android | yes |
+| minZoomLevel | Minimum zoom value for the map, must be between 0 and 20. **Note:** Deprecated on Apple Maps. Use cameraZoomRange instead. | Number | 0 | no | ios/android | yes |
+| maxZoomLevel | Maximum zoom value for the map, must be between 0 and 20. **Note:** Deprecated on Apple Maps. Use cameraZoomRange instead. | Number | 20 | no | ios/android | yes |
+| rotateEnabled | If `false` the user won't be able to pinch/rotate the map. | Boolean | true | no | ios/android | yes |
+| scrollEnabled | If `false` the user won't be able to adjust the camera’s pitch angle. | Boolean | true | no | ios/android | yes |
+| scrollDuringRotateOrZoomEnabled | If `false` the map will stay centered while rotating or zooming. **Note:** Google Maps only | Boolean | true | no | ios/android | no |
+| pitchEnabled | If `false` the user won't be able to adjust the camera’s pitch angle. | Boolean | true | no | ios/android | yes |
+| toolbarEnabled | `Android only` If `false` will hide 'Navigate' and 'Open in Maps' buttons on marker press. If you enable the toolbar, make sure to [edit your AndroidManifest.xml](https://github.com/react-native-maps/react-native-maps/issues/4403#issuecomment-1219856534) | Boolean | true | no | android | no |
+| cacheEnabled | If `true` map will be cached and displayed as an image instead of being interactable, for performance usage. **Note:** Apple Maps only | Boolean | false | no | ios | no |
+| loadingEnabled | If `true` a loading indicator will show while the map is loading. | Boolean | false | no | ios/android | yes |
+| loadingIndicatorColor | Sets loading indicator color, default to `#606060`. | Color | \#606060 | no | ios/android | yes |
+| loadingBackgroundColor | Sets loading background color, default to `#FFFFFF`. | Color | \#FFFFFF | no | ios/android | yes |
+| tintColor | Sets the tint color of the map. (Changes the color of the position indicator) Defaults to system blue. **Note:** iOS (Apple maps) only. | Color | | no | ios | no |
+| moveOnMarkerPress | `Android only` If `false` the map won't move when a marker is pressed. | Boolean | true | no | android | no |
+| legalLabelInsets | If set, changes the position of the "Legal" label link from the OS default. **Note:** iOS only. | EdgeInsets | | no | ios | no |
+| kmlSrc | The URL from KML file. **Note:** Google Maps and Markers only (either Android or iOS with `PROVIDER_GOOGLE`). | String | | no | ios/android | no |
+| compassOffset | If set, changes the position of the compass. **Note:** iOS Maps only. | Point | | no | ios | yes |
+| isAccessibilityElement | Determines whether the MapView captures VoiceOver touches or forwards them to children. When `true`, map markers are not visible to VoiceOver. **Note:** iOS Maps only. | Boolean | false | no | ios | no |
+| cameraZoomRange | Map camera distance limits. `minCenterCoordinateDistance` for minimum distance, `maxCenterCoordinateDistance` for maximum, `animated` for animated zoom range changes. Takes precedence if conflicting with `minZoomLevel`, `maxZoomLevel`. **Note**: iOS 13.0+ only. | cameraZoomRange | | no | ios | no |
+| poiClickEnabled1.24.3+ | If `false` the map will not capture PoI clicks. | boolean | true | no | Android | yes |
+| googleRenderer1.24.3+ | google maps renderer. | string | LATEST | no | Android | no |
+| onRegionChangeStart1.24.3+ | Callback that is called once before the region changes, such as when the user starts moving the map. | function | | no | iOS/Android | yes |
注:HarmonyOS 侧的 mapType 支持以下字符串值
@@ -615,23 +659,23 @@ ohpm install
### API
-| Name | Description | Arguments | Platform | HarmonyOS Support |
-| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------- | ----------------- |
-| getCamera | Returns a `Promise` structure indicating the current camera configuration. | | ios/android | yes |
-| animateCamera | Animate the camera to a new view. You can pass a partial camera object here; any property not given will remain unmodified. | camera: Camera`, `{ duration: Number } | ios/android | yes |
-| setCamera | Like `animateCamera`, but sets the new view instantly, without an animation. | camera: Camera | ios/android | yes |
-| animateToRegion | Like `animateCamera` | region: Region`, `duration: Number | ios/android | yes |
-| getMapBoundaries | Promise<{northEast: LatLng, southWest: LatLng}> | | ios/android | yes |
-| setMapBoundaries | The boundary is defined by the map's center coordinates, not the device's viewport itself. **Note:** Google Maps only. | northEast: LatLng`, `southWest: LatLng | ios/android | yes |
-| setIndoorActiveLevelIndex | | levelIndex: Number | ios/android | no |
-| fitToElements | **Note** edgePadding is Google Maps only | options: { edgePadding: EdgePadding, animated: Boolean } | ios/android | no |
-| fitToSuppliedMarkers | If you need to use this in `ComponentDidMount`, make sure you put it in a timeout or it will cause performance problems. **Note** edgePadding is Google Maps only | markerIDs: String[], options: { edgePadding: EdgePadding, animated: Boolean } | ios/android | no |
-| fitToCoordinates | If called in `ComponentDidMount` in android, it will cause an exception. It is recommended to call it from the MapView `onLayout` event. | coordinates: Array, options: { edgePadding: EdgePadding, animated: Boolean } | ios/android | yes |
-| addressForCoordinate | Converts a map coordinate to a address (`Address`). Returns a `Promise` **Note** Not supported on Google Maps for iOS. | coordinate: LatLng | ios/android | yes |
-| pointForCoordinate | Converts a map coordinate to a view coordinate (`Point`). Returns a `Promise`. | coordinate: LatLng | ios/android | yes |
-| coordinateForPoint | Converts a view coordinate (`Point`) to a map coordinate. Returns a `Promise`. | point: Point | ios/android | yes |
-| getMarkersFrames | Get markers' centers and frames in view coordinates. Returns a `Promise<{ "markerID" : { point: Point, frame: Frame } }>`. **Note**: iOS only. | onlyVisible: Boolean | ios | no |
-| takeSnapshot | Takes a snapshot of the map and saves it to a picture file or returns the image as a base64 encoded string. | SnapshotOptions | ios/android | yes |
+| Name | Description | Arguments | Platform | HarmonyOS Support |
+| ------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ----------- | ----------------- |
+| getCamera | Returns a `Promise` structure indicating the current camera configuration. | | ios/android | yes |
+| animateCamera | Animate the camera to a new view. You can pass a partial camera object here; any property not given will remain unmodified. | camera: Camera`, `{ duration: Number } | ios/android | yes |
+| setCamera | Like `animateCamera`, but sets the new view instantly, without an animation. | camera: Camera | ios/android | yes |
+| animateToRegion | Like `animateCamera` | region: Region`, `duration: Number | ios/android | yes |
+| getMapBoundaries | Promise<{northEast: LatLng, southWest: LatLng}> | | ios/android | yes |
+| setMapBoundaries | The boundary is defined by the map's center coordinates, not the device's viewport itself. **Note:** Google Maps only. | northEast: LatLng`, `southWest: LatLng | ios/android | yes |
+| setIndoorActiveLevelIndex | | levelIndex: Number | ios/android | no |
+| fitToElements | **Note** edgePadding is Google Maps only | options: { edgePadding: EdgePadding, animated: Boolean } | ios/android | no |
+| fitToSuppliedMarkers | If you need to use this in `ComponentDidMount`, make sure you put it in a timeout or it will cause performance problems. **Note** edgePadding is Google Maps only | markerIDs: String[], options: { edgePadding: EdgePadding, animated: Boolean } | ios/android | no |
+| fitToCoordinates | If called in `ComponentDidMount` in android, it will cause an exception. It is recommended to call it from the MapView `onLayout` event. | coordinates: Array, options: { edgePadding: EdgePadding, animated: Boolean } | ios/android | yes |
+| addressForCoordinate | Converts a map coordinate to a address (`Address`). Returns a `Promise` **Note** Not supported on Google Maps for iOS. | coordinate: LatLng | ios/android | yes |
+| pointForCoordinate | Converts a map coordinate to a view coordinate (`Point`). Returns a `Promise`. | coordinate: LatLng | ios/android | yes |
+| coordinateForPoint | Converts a view coordinate (`Point`) to a map coordinate. Returns a `Promise`. | point: Point | ios/android | yes |
+| getMarkersFrames | Get markers' centers and frames in view coordinates. Returns a `Promise<{ "markerID" : { point: Point, frame: Frame } }>`. **Note**: iOS only. | onlyVisible: Boolean | ios | no |
+| takeSnapshot | Takes a snapshot of the map and saves it to a picture file or returns the image as a base64 encoded string. | SnapshotOptions | ios/android | yes |
## Marker
@@ -664,6 +708,9 @@ ohpm install
| opacity | The marker's opacity between 0.0 and 1.0. | Float | 1.0 | no | ios/android | yes |
| isPreselected | When true, the marker will be pre-selected. Setting this to true allows the user to drag the marker without needing to tap on it once to focus on it. **Note**: iOS Apple Maps only. | Boolean | false | no | ios | no |
| key | If no key or non-unique `key` is specified, the `` will be reused, therefore there is an animation when the position is changed. If you want to disable the animation, add a `key` prop with a unique value like `key_${item.longitude}_${item.latitude}`. **Note**: iOS only. | | | no | ios | no |
+| titleVisibility1.24.3+ | Visibility of the title text rendered beneath Marker balloon. | visible \| hidden \| adaptive | 'hidden' | no | iOS | no |
+| subtitleVisibility1.24.3+ | Visibility of the subtitle text rendered beneath Marker balloon. | visible \| hidden \| adaptive | 'hidden' | no | iOS | no |
+| useLegacyPinView1.24.3+ | Indicate type of default markers if it's true MKPinAnnotationView will be used and MKMarkerAnnotationView if it's false. | boolean | | no | iOS | no |
### 静态方法
@@ -824,25 +871,27 @@ ohpm install
### 属性
-| Name | Description | Type | Default | Required | Platform | HarmonyOS Support |
-| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | -------------------------------------------------- | -------- | ----------- | ----------------- |
-| geojson | [Geojson](https://geojson.org/) description of object. | GeoJSON | | yes | ios/android | yes |
-| strokeColor | The stroke color to use for polygons and polylines. | String | stroke`property in GeoJson if present else`#000 | no | ios/android | yes |
-| fillColor | The fill color to use for polygons. | String | `fill` property in GeoJson | no | ios/android | yes |
-| strokeWidth | The stroke width to use for polygons and polylines. | Number | stroke-width`property in Geojson if present else`1 | no | ios/android | yes |
-| color | The color to use for points. | String | `marker-color` property in GeoJson | no | ios/android | no |
-| lineDashPhase | (iOS only) The offset (in points) at which to start drawing the dash pattern. Use this property to start drawing a dashed line partway through a segment or gap. For example, a phase value of 6 for the patter 5-2-3-2 would cause drawing to begin in the middle of the first gap. | Number | | no | ios | no |
-| lineDashPattern | An array of numbers specifying the dash pattern to use for the path. The array contains one or more numbers that indicate the lengths (measured in points) of the line segments and gaps in the pattern. The values in the array alternate, starting with the first line segment length, followed by the first gap length, followed by the second line segment length, and so on. | Array | | no | ios/android | yes |
-| lineCap | The line cap style to apply to the open ends of the path. Possible values are `butt`, `round` or `square`. Note: lineCap is not yet supported for GoogleMaps provider on iOS. | 'butt' / 'round' / 'square' | 'round' | no | ios/android | yes |
-| lineJoin | The line join style to apply to corners of the path. Possible values are `miter`, `round` or `bevel`. | 'miter' / 'round' / 'bevel' | 'round' | no | ios/android | yes |
-| miterLimit | The limiting value that helps avoid spikes at junctions between connected line segments. The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style. If the ratio of the miter length—that is, the diagonal length of the miter join—to the line thickness exceeds the miter limit, the joint is converted to a bevel join. The default miter limit is 10, which results in the conversion of miters whose angle at the joint is less than 11 degrees. | Number | | no | ios/android | no |
-| zIndex | Layer level of the z-index value | Number | | no | ios/android | yes |
-| onPress | returns the selected overlay value with the onPress functionality | Function | | no | ios/android | yes |
-| markerComponent | Component to render in place of the default marker when the overlay type is a `point` | React Node | | no | ios/android | no |
-| title | The title of the marker. This is only used if the component has no children that are a `` | string | | no | ios/android | yes |
-| tracksViewChanges | Sets whether this marker should track view changes. It's recommended to turn it off whenever it's possible to improve custom marker performance. This is the default value for all point markers in your geojson data. It can be overriden on a per point basis by adding a `trackViewChanges` property to the `properties` object on the point. | Boolean | true | no | ios/android | no |
-| image | A custom image to be used as the marker's icon. Only local image resources are allowed to be used. | `ImageSource`\* | | no | ios/android | yes |
-| tappable | Boolean to allow a polygon and polyline to be tappable and use the onPress function. | Boolean | false | no | ios/android | yes |
+| Name | Description | Type | Default | Required | Platform | HarmonyOS Support |
+| ------------------------------ | ------------------------------------------------------------ | --------------------------- | -------------------------------------------------- | -------- | ----------- | ----------------- |
+| geojson | [Geojson](https://geojson.org/) description of object. | GeoJSON | | yes | ios/android | yes |
+| strokeColor | The stroke color to use for polygons and polylines. | String | stroke`property in GeoJson if present else`#000 | no | ios/android | yes |
+| fillColor | The fill color to use for polygons. | String | `fill` property in GeoJson | no | ios/android | yes |
+| strokeWidth | The stroke width to use for polygons and polylines. | Number | stroke-width`property in Geojson if present else`1 | no | ios/android | yes |
+| color | The color to use for points. | String | `marker-color` property in GeoJson | no | ios/android | no |
+| lineDashPhase | (iOS only) The offset (in points) at which to start drawing the dash pattern. Use this property to start drawing a dashed line partway through a segment or gap. For example, a phase value of 6 for the patter 5-2-3-2 would cause drawing to begin in the middle of the first gap. | Number | | no | ios | no |
+| lineDashPattern | An array of numbers specifying the dash pattern to use for the path. The array contains one or more numbers that indicate the lengths (measured in points) of the line segments and gaps in the pattern. The values in the array alternate, starting with the first line segment length, followed by the first gap length, followed by the second line segment length, and so on. | Array | | no | ios/android | yes |
+| lineCap | The line cap style to apply to the open ends of the path. Possible values are `butt`, `round` or `square`. Note: lineCap is not yet supported for GoogleMaps provider on iOS. | 'butt' / 'round' / 'square' | 'round' | no | ios/android | yes |
+| lineJoin | The line join style to apply to corners of the path. Possible values are `miter`, `round` or `bevel`. | 'miter' / 'round' / 'bevel' | 'round' | no | ios/android | yes |
+| miterLimit | The limiting value that helps avoid spikes at junctions between connected line segments. The miter limit helps you avoid spikes in paths that use the `miter` `lineJoin` style. If the ratio of the miter length—that is, the diagonal length of the miter join—to the line thickness exceeds the miter limit, the joint is converted to a bevel join. The default miter limit is 10, which results in the conversion of miters whose angle at the joint is less than 11 degrees. | Number | | no | ios/android | no |
+| zIndex | Layer level of the z-index value | Number | | no | ios/android | yes |
+| onPress | returns the selected overlay value with the onPress functionality | Function | | no | ios/android | yes |
+| markerComponent | Component to render in place of the default marker when the overlay type is a `point` | React Node | | no | ios/android | no |
+| title | The title of the marker. This is only used if the component has no children that are a `` | string | | no | ios/android | yes |
+| tracksViewChanges | Sets whether this marker should track view changes. It's recommended to turn it off whenever it's possible to improve custom marker performance. This is the default value for all point markers in your geojson data. It can be overriden on a per point basis by adding a `trackViewChanges` property to the `properties` object on the point. | Boolean | true | no | ios/android | no |
+| image | A custom image to be used as the marker's icon. Only local image resources are allowed to be used. | `ImageSource`\* | | no | ios/android | yes |
+| tappable | Boolean to allow a polygon and polyline to be tappable and use the onPress function. | Boolean | false | no | ios/android | yes |
+| anchor1.24.3+ | Sets the anchor point for the marker. | Point | (0.5, 1) | no | ios/android | yes |
+| centerOffset1.24.3+ | The offset (in points) at which to display the annotation view. | Point | (0, 0) | no | ios/android | yes |
## Heatmap
@@ -894,6 +943,7 @@ ohpm install
- [ ] AIRMapCallout AIRMapCalloutSubview 组件为 marker 子组件,华为地图中 marker 有自带的,但是目前不支持自定义样式显示 [issues#4](https://github.com/react-native-oh-library/react-native-maps/issues/4)
- [ ] AIRMapUrlTile AIRMapWMSTile 瓦片地图加载方式华为地图不支持 [issues#5](https://github.com/react-native-oh-library/react-native-maps/issues/5)
- [ ] Heatmap 华为地图不支持 [issues#6](https://github.com/react-native-oh-library/react-native-maps/issues/6)
+- [ ] V1.24.3中Marker部分属性未实现 HarmonyOS 化 [issues#1](https://gitcode.com/openharmony-sig/rntpc_react-native-maps/issues/1)
## 开源协议
diff --git a/zh-cn/react-native-masked-view-masked-view.md b/zh-cn/react-native-masked-view-masked-view.md
index fa920384..1bade8da 100644
--- a/zh-cn/react-native-masked-view-masked-view.md
+++ b/zh-cn/react-native-masked-view-masked-view.md
@@ -16,7 +16,14 @@
## 安装与使用
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/masked-view Releases](https://github.com/react-native-oh-library/masked-view/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
+请到三方库的 Releases 发布地址查看配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 0.2.9 | [@react-native-oh-tpl/masked-view Releases](https://github.com/react-native-oh-library/masked-view/releases) | 0.72 |
+| 0.3.2 | [@react-native-ohos/masked-view Releases]() | 0.77 |
+
+对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
进入到工程目录并输入以下命令:
@@ -25,13 +32,21 @@
#### **npm**
```bash
+# V0.2.9
npm install @react-native-oh-tpl/masked-view
+
+# V0.3.2
+npm install @react-native-ohos/masked-view
```
#### **yarn**
```bash
+# V0.2.9
yarn add @react-native-oh-tpl/masked-view
+
+# V0.3.2
+yarn add @react-native-ohos/masked-view
```
@@ -73,7 +88,7 @@ const styles = StyleSheet.create({
justifyContent: 'center',
},
maskElementText: {
- color: Colors.black,
+ color: "#00ccffff",
width:'100%',
height:60,
fontSize: 50,
@@ -88,7 +103,7 @@ const styles = StyleSheet.create({
justifyContent: 'center',
},
text: {
- color: Colors.darkChestnut,
+ color: "#ffee00ff",
fontSize: 8,
width:'100%',
height:40,
@@ -130,6 +145,8 @@ export default MaskedDemo
打开 `entry/oh-package.json5`,添加以下依赖
+- V 0.2.9
+
```json
"dependencies": {
"@rnoh/react-native-openharmony": "file:../react_native_openharmony",
@@ -138,6 +155,16 @@ export default MaskedDemo
}
```
+- V 0.3.2
+
+```json
+"dependencies": {
+ "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
+
+ "@react-native-ohos/masked-view": "file:../../node_modules/@react-native-ohos/masked-view/harmony/masked_view.har"
+ }
+```
+
点击右上角的 `sync` 按钮
或者在终端执行:
@@ -173,7 +200,13 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn)
# RNOH_BEGIN: manual_package_linking_1
add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
+
+# V0.2.9
+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/masked-view/src/main/cpp" ./masked-view)
+
+# V0.3.2
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/masked-view/src/main/cpp" ./masked-view)
+
# RNOH_END: manual_package_linking_1
file(GLOB GENERATED_CPP_FILES "./generated/*.cpp")
@@ -229,7 +262,12 @@ ohpm install
要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-library/masked-view Releases](https://github.com/react-native-oh-library/masked-view/releases)
+请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 0.2.9 | [@react-native-oh-tpl/masked-view Releases](https://github.com/react-native-oh-library/masked-view/releases) | 0.72 |
+| 0.3.2 | [@react-native-ohos/masked-view Releases]() | 0.77 |
## 属性
@@ -250,3 +288,4 @@ ohpm install
## 开源协议
本项目基于 [The MIT License (MIT)](https://github.com/react-native-masked-view/masked-view/blob/master/LICENSE) ,请自由地享受和参与开源。
+
diff --git a/zh-cn/react-native-popover-view.md b/zh-cn/react-native-popover-view.md
index 802977a4..c0ada2d1 100644
--- a/zh-cn/react-native-popover-view.md
+++ b/zh-cn/react-native-popover-view.md
@@ -17,7 +17,14 @@
## 安装与使用
-请到三方库的 Releases 发布地址查看配套的版本信息:[<@react-native-oh-tpl/react-native-popover-view> Releases](https://github.com/react-native-oh-library/react-native-popover-view/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
+请到三方库的 Releases 发布地址查看配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 5.1.7 | [<@react-native-oh-tpl/react-native-popover-view> Releases](https://github.com/react-native-oh-library/react-native-popover-view/releases) | 0.72 |
+| 6.1.0 | [<@react-native-ohos/react-native-popover-view> Releases]() | 0.77 |
+
+对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
进入到工程目录并输入以下命令:
@@ -26,13 +33,21 @@
#### npm
```bash
+# V5.1.7
npm install @react-native-oh-tpl/react-native-popover-view
+
+# V6.1.0
+npm install @react-native-ohos/react-native-popover-view
```
#### yarn
```bash
+# V5.1.7
yarn add @react-native-oh-tpl/react-native-popover-view
+
+# V6.1.0
+yarn add @react-native-ohos/react-native-popover-view
```
@@ -172,8 +187,8 @@ export default PopoverDemo;
| displayArea | Area where the popover is allowed to be displayed. By default, this will be automatically calculated to be the size of the display, or the size of the parent component if mode is not 'rn-modal'. | rect | no | All | yes |
| displayAreaInsets | Insets to apply to the display area. The Popover will not be allowed to go beyond the display area minus the insets. | object | no | All | yes |
| statusBarTranslucent | For 'rn-modal' mode on Android only. Determines whether the background should go under the status bar. Passed through to RN Modal component, see their docs as well. | bool | no | Android | no | 原库仅支持安卓 |
-| verticalOffset | The amount to vertically shift the popover on the screen, for use in correcting an occasional issue on Android. In certain Android configurations, you may need to apply a verticalOffset of -StatusBar.currentHeight for the popover to originate from the correct place. For shifting the popover in other situations, the offset prop should be used. | number | no | Android | no | 原库仅支持安卓 |
-| debug | Set this to true to turn on debug logging to the console. This is useful for figuring out why a Popover isn't showing. | bool | no | All | yes |
+| verticalOffsetdeprecated from 6.1.0 | The amount to vertically shift the popover on the screen, for use in correcting an occasional issue on Android. In certain Android configurations, you may need to apply a verticalOffset of -StatusBar.currentHeight for the popover to originate from the correct place. For shifting the popover in other situations, the offset prop should be used. | number | no | Android | no | 原库仅支持安卓 |
+| debug | Set this to true to turn on debug logging to the console. This is useful for figuring out why a Popover isn't showing. | bool | no | All | yes ||
## 遗留问题
diff --git a/zh-cn/react-native-tab-view.md b/zh-cn/react-native-tab-view.md
index db6a3aae..e46061aa 100644
--- a/zh-cn/react-native-tab-view.md
+++ b/zh-cn/react-native-tab-view.md
@@ -16,7 +16,14 @@
## 安装与使用
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-tab-view Releases](https://github.com/react-native-oh-library/react-navigation/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
+请到三方库的 Releases 发布地址查看配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 3.5.2 | [@react-native-oh-tpl/react-native-tab-view Releases](https://github.com/react-native-oh-library/react-navigation/releases) | 0.72 |
+| 4.0.10 | [@react-native-ohos/react-native-tab-view Releases](https://gitcode.com/openharmony-sig/rntpc_react-navigation/tree/master/packages/react-native-tab-view) | 0.77 |
+
+对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
进入到工程目录并输入以下命令:
@@ -25,13 +32,21 @@
#### **npm**
```bash
+# V3.5.2
npm install @react-native-oh-tpl/react-native-tab-view
+
+# V4.0.10
+npm install @react-native-ohos/react-native-tab-view
```
#### **yarn**
```bash
+# V3.5.2
yarn add @react-native-oh-tpl/react-native-tab-view
+
+# V4.0.10
+yarn add @react-native-ohos/react-native-tab-view
```
@@ -202,7 +217,12 @@ const styles = StyleSheet.create({
要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[ @react-native-oh-tpl/react-native-tab-view Releases](https://github.com/react-native-oh-library/react-navigation/releases/)
+请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 3.5.2 | [ @react-native-oh-tpl/react-native-tab-view Releases](https://github.com/react-native-oh-library/react-navigation/releases/) | 0.72 |
+| 4.0.10 | [ @react-native-ohos/react-native-tab-view Releases](https://gitcode.com/openharmony-sig/rntpc_react-navigation/tree/master/packages/react-native-tab-view) | 0.77 |
## 属性
@@ -211,53 +231,59 @@ const styles = StyleSheet.create({
> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。
**TabView**:选项卡组件
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-|-----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------|----------|----------|-------------------|
-| navigationState | State for the tab view. | fucntion | yes | all | yes |
-| onIndexChange | Callback which is called on tab change, receives the index of the new tab as argument. The navigation state needs to be updated when it's called, otherwise the change is dropped. | function | yes | all | yes |
-| renderScene | Callback which returns a react element to render as the page for the tab. | function | yes | all | yes |
-| renderTabBar | Callback which returns a custom React Element to use as the tab bar | function | no | all | yes |
-| tabBarPosition | Position of the tab bar in the tab view. | 'top'|'bottom' | no | all | yes |
-| lazy | Function which takes an object with the current route and returns a boolean to indicate whether to lazily render the scenes. | function | no | all | yes |
-| lazyPreloadDistance | When lazy is enabled, you can specify how many adjacent routes should be preloaded with this prop. This value defaults to 0 which means lazy pages are loaded as they come into the viewport. | number | no | all | yes |
-| renderLazyPlaceholder | Callback which returns a custom React Element to render for routes that haven't been rendered yet. Receives an object containing the route as the argument. The lazy prop also needs to be enabled. | string | no | all | yes |
-| keyboardDismissMode | String indicating whether the keyboard gets dismissed in response to a drag gesture. | 'auto'|'on-drag'|'none' | no | all | yes |
-| swipeEnabled | Boolean indicating whether to enable swipe gestures. Swipe gestures are enabled by default. Passing false will disable swipe gestures, but the user can still switch tabs by pressing the tab bar. | boolean | no | all | yes |
-| animationEnabled | Enables animation when changing tab. By default it's true. | boolean | no | all | yes |
-| onSwipeStart | Callback which is called when the swipe gesture starts, i.e. the user touches the screen and moves it. | boolean | no | all | yes |
-| onSwipeEnd | Callback which is called when the swipe gesture ends, i.e. the user lifts their finger from the screen after the swipe gesture. | boolean | no | all | yes |
-| initialLayout | Object containing the initial height and width of the screens. Passing this will improve the initial rendering performance. | object | no | all | yes |
-| overScrollMode | Used to override default value of pager's overScroll mode. Can be auto, always or never (Android only). | 'auto'|'always'|'never' | no | Android | yes |
-| sceneContainerStyle | Style to apply to the view wrapping each screen. You can pass this to override some default styles such as overflow clipping | object | no | all | yes |
-| pagerStyle | Style to apply to the pager view wrapping all the scenes. | object | no | all | yes |
-| style | Style to apply to the tab view container. | object | no | all | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ---------------------------------------------------- | ------------------------------------------------------------ | --------------------------------- | -------- | -------- | ----------------- |
+| navigationState | State for the tab view. | fucntion | yes | all | yes |
+| onIndexChange | Callback which is called on tab change, receives the index of the new tab as argument. The navigation state needs to be updated when it's called, otherwise the change is dropped. | function | yes | all | yes |
+| renderScene | Callback which returns a react element to render as the page for the tab. | function | yes | all | yes |
+| renderTabBar | Callback which returns a custom React Element to use as the tab bar | function | no | all | yes |
+| tabBarPosition | Position of the tab bar in the tab view. | 'top'|'bottom' | no | all | yes |
+| lazy | Function which takes an object with the current route and returns a boolean to indicate whether to lazily render the scenes. | function | no | all | yes |
+| lazyPreloadDistance | When lazy is enabled, you can specify how many adjacent routes should be preloaded with this prop. This value defaults to 0 which means lazy pages are loaded as they come into the viewport. | number | no | all | yes |
+| renderLazyPlaceholder | Callback which returns a custom React Element to render for routes that haven't been rendered yet. Receives an object containing the route as the argument. The lazy prop also needs to be enabled. | string | no | all | yes |
+| keyboardDismissMode | String indicating whether the keyboard gets dismissed in response to a drag gesture. | 'auto'|'on-drag'|'none' | no | all | yes |
+| swipeEnabled | Boolean indicating whether to enable swipe gestures. Swipe gestures are enabled by default. Passing false will disable swipe gestures, but the user can still switch tabs by pressing the tab bar. | boolean | no | all | yes |
+| animationEnabled | Enables animation when changing tab. By default it's true. | boolean | no | all | yes |
+| onSwipeStart | Callback which is called when the swipe gesture starts, i.e. the user touches the screen and moves it. | boolean | no | all | yes |
+| onSwipeEnd | Callback which is called when the swipe gesture ends, i.e. the user lifts their finger from the screen after the swipe gesture. | boolean | no | all | yes |
+| initialLayout | Object containing the initial height and width of the screens. Passing this will improve the initial rendering performance. | object | no | all | yes |
+| overScrollMode | Used to override default value of pager's overScroll mode. Can be auto, always or never (Android only). | 'auto'|'always'|'never' | no | Android | yes |
+| sceneContainerStyledeprecated from 4.0.10 | Style to apply to the view wrapping each screen. You can pass this to override some default styles such as overflow clipping | object | no | all | yes |
+| pagerStyle | Style to apply to the pager view wrapping all the scenes. | object | no | all | yes |
+| style | Style to apply to the tab view container. | object | no | all | yes |
+| options4.0.10+ | - | Record> | no | all | yes |
+| commonOptions4.0.10+ | - | TabDescriptor | no | all | yes |
+| direction4.0.10+ | Writing direction of the layout. | LocaleDirection | no | all | yes |
**TabBar**:选项卡标签栏
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-|-------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|----------|----------|-------------------|
-| getLabelText | Function which takes an object with the current route and returns the label text for the tab. Uses route.title by default. | function | no | all | yes |
-| getAccessible | Function which takes an object with the current route and returns a boolean to indicate whether to mark a tab as accessible. Defaults to true. | function | no | all | yes |
-| getAccessibilityLabel | Function which takes an object with the current route and returns a accessibility label for the tab button. Uses route.accessibilityLabel by default if specified, otherwise uses the route title. | function | no | all | yes |
-| renderIcon | Function which takes an object with the current route, focused status and color and returns a custom React Element to be used as a icon. | function | no | all | yes |
-| renderLabel | Function which takes an object with the current route, focused status and color and returns a custom React Element to be used as a label. | function | no | all | yes |
-| renderTabBarItem | Function which takes a TabBarItemProps object and returns a custom React Element to be used as a tab button. | function | no | all | yes |
-| renderIndicator | Function which takes an object with the current route and returns a custom React Element to be used as a tab indicator. | function | no | all | yes |
-| renderBadge | Function which takes an object with the current route and returns a custom React Element to be used as a badge. | function | no | all | yes |
-| onTabPress | Function to execute on tab press. It receives the scene for the pressed tab, useful for things like scroll to top. | function | no | all | yes |
-| onTabLongPress | Function to execute on tab long press, use for things like showing a menu with more options | function | no | all | yes |
-| activeColor | Custom color for icon and label in the active tab. | string | no | all | yes |
-| inactiveColor | Custom color for icon and label in the inactive tab. | string | no | all | yes |
-| pressColor | Color for material ripple (Android >= 5.0 only). | string | no | Android | no |
-| pressOpacity | Opacity for pressed tab (iOS and Android < 5.0 only). | number | no | all | yes |
-| scrollEnabled | Boolean indicating whether to make the tab bar scrollable. | boolean | no | all | yes |
-| bounces | Boolean indicating whether the tab bar bounces when scrolling. | boolean | no | iOS | no |
-| tabStyle | Style to apply to the individual tab items in the tab bar. | object | no | all | yes |
-| indicatorStyle | Style to apply to the active indicator. | object | no | all | yes |
-| indicatorContainerStyle | Style to apply to the container view for the indicator. | object | no | all | yes |
-| labelStyle | Style to apply to the tab item label. | object | no | all | yes |
-| contentContainerStyle | Style to apply to the inner container for tabs. | object | no | all | yes |
-| style (TabBar) | Style to apply to the tab bar container. | object | no | all | yes |
-| gap | Define a spacing between tabs. | number | no | all | yes |
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------------------------------------------------------ | ------------------------------------------------------------ | -------------------------------- | -------- | -------- | ----------------- |
+| getLabelTextdeprecated from 4.0.10 | Function which takes an object with the current route and returns the label text for the tab. Uses route.title by default. | function | no | all | yes |
+| getAccessibledeprecated from 4.0.10 | Function which takes an object with the current route and returns a boolean to indicate whether to mark a tab as accessible. Defaults to true. | function | no | all | yes |
+| getAccessibilityLabeldeprecated from 4.0.10 | Function which takes an object with the current route and returns a accessibility label for the tab button. Uses route.accessibilityLabel by default if specified, otherwise uses the route title. | function | no | all | yes |
+| renderIcondeprecated from 4.0.10 | Function which takes an object with the current route, focused status and color and returns a custom React Element to be used as a icon. | function | no | all | yes |
+| renderLabeldeprecated from 4.0.10 | Function which takes an object with the current route, focused status and color and returns a custom React Element to be used as a label. | function | no | all | yes |
+| renderTabBarItem | Function which takes a TabBarItemProps object and returns a custom React Element to be used as a tab button. | function | no | all | yes |
+| renderIndicator | Function which takes an object with the current route and returns a custom React Element to be used as a tab indicator. | function | no | all | yes |
+| renderBadgedeprecated from 4.0.10 | Function which takes an object with the current route and returns a custom React Element to be used as a badge. | function | no | all | yes |
+| onTabPress | Function to execute on tab press. It receives the scene for the pressed tab, useful for things like scroll to top. | function | no | all | yes |
+| onTabLongPress | Function to execute on tab long press, use for things like showing a menu with more options | function | no | all | yes |
+| activeColor | Custom color for icon and label in the active tab. | string | no | all | yes |
+| inactiveColor | Custom color for icon and label in the inactive tab. | string | no | all | yes |
+| pressColor | Color for material ripple (Android >= 5.0 only). | string | no | Android | no |
+| pressOpacity | Opacity for pressed tab (iOS and Android < 5.0 only). | number | no | all | yes |
+| scrollEnabled | Boolean indicating whether to make the tab bar scrollable. | boolean | no | all | yes |
+| bounces | Boolean indicating whether the tab bar bounces when scrolling. | boolean | no | iOS | no |
+| tabStyle | Style to apply to the individual tab items in the tab bar. | object | no | all | yes |
+| indicatorStyle | Style to apply to the active indicator. | object | no | all | yes |
+| indicatorContainerStyle | Style to apply to the container view for the indicator. | object | no | all | yes |
+| labelStyledeprecated from 4.0.10 | Style to apply to the tab item label. | object | no | all | yes |
+| contentContainerStyle | Style to apply to the inner container for tabs. | object | no | all | yes |
+| style (TabBar) | Style to apply to the tab bar container. | object | no | all | yes |
+| gap | Define a spacing between tabs. | number | no | all | yes |
+| direction4.0.10+ | Writing direction of the layout. | LocaleDirection | no | all | yes |
+| layout4.0.10+ | - | Layout | no | all | yes |
+| options4.0.10+ | - | Record> | no | all | yes |
## 遗留问题
@@ -270,4 +296,4 @@ const styles = StyleSheet.create({
## 开源协议
-本项目基于 [The MIT License (MIT)](https://github.com/satya164/react-native-tab-view/blob/main/LICENSE.md) ,请自由地享受和参与开源。
\ No newline at end of file
+本项目基于 [The MIT License (MIT)](https://github.com/react-navigation/react-navigation/blob/main/packages/react-native-tab-view/LICENSE) ,请自由地享受和参与开源。
\ No newline at end of file
diff --git a/zh-cn/react-native-video.md b/zh-cn/react-native-video.md
index dc07c057..82409d97 100644
--- a/zh-cn/react-native-video.md
+++ b/zh-cn/react-native-video.md
@@ -17,7 +17,14 @@
## 安装与使用
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
+请到三方库的 Releases 发布地址查看配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 5.2.1 | [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases) | 0.72 |
+| 6.13.0 | [@react-native-ohos/react-native-video Releases]() | 0.77 |
+
+对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
进入到工程目录并输入以下命令
@@ -26,17 +33,21 @@
#### **npm**
```bash
-
+# V5.2.1
npm install @react-native-oh-tpl/react-native-video
+# V6.13.0
+npm install @react-native-ohos/react-native-video
```
#### **yarn**
```bash
-
+# V5.2.1
yarn add @react-native-oh-tpl/react-native-video
+# V6.13.0
+yarn add @react-native-ohos/react-native-video
```
@@ -76,6 +87,8 @@ function RNCVideoDemo() {
const [onVideoProgress, setOnVideoProgress] = useState("onVideoProgress");
const [onVideoEnd, setOnVideoEnd] = useState("onVideoEnd");
const [onVideoBuffer, setOnVideoBuffer] = useState("onVideoBuffer");
+ // V5.2.1
+ const [onPlaybackStalled, setOnPlaybackStalled] = useState("onPlaybackStalled");
// V6.13.0
const [onPlaybackStateChanged, setPlaybackStateChanged] = useState("onPlaybackStateChanged");
@@ -133,6 +146,9 @@ function RNCVideoDemo() {
{onVideoEnd}{onVideoBuffer}
+ // V5.2.1
+ {onPlaybackStalled}
+
// V6.13.0
{onPlaybackStateChanged}
@@ -379,6 +395,18 @@ function RNCVideoDemo() {
onBuffer={(e) => {
setOnVideoBuffer("onVideoBuffer :" + e.isBuffering);
}}
+
+ // V5.2.1
+ onPlaybackStalled={() => {
+ setOnPlaybackStalled("onPlaybackStalled : true");
+ setOnPlaybackResume("onPlaybackResume :false");
+ }}
+
+ // V5.2.1
+ onPlaybackResume={() => {
+ setOnPlaybackStalled("onPlaybackStalled :false");
+ setOnPlaybackResume("onPlaybackResume :true");
+ }}
// V6.13.0
onPlaybackStateChanged={(data: OnPlaybackStateChangedData) => {
@@ -488,6 +516,7 @@ export default RNCVideoDemo;
打开 `entry/oh-package.json5`,添加以下依赖
+- V5.2.1
```json
"dependencies": {
@@ -497,6 +526,16 @@ export default RNCVideoDemo;
}
```
+- V6.13.0
+
+```json
+"dependencies": {
+ ...
+ "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
+ "@react-native-ohos/react-native-video": "file:../../node_modules/@react-native-ohos/react-native-video/harmony/rn_video.har"
+ }
+```
+
点击右上角的 `sync` 按钮
或者在终端执行:
@@ -533,8 +572,12 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn)
# RNOH_BEGIN: manual_package_linking_1
add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
+# V5.2.1
+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-video/src/main/cpp" ./video)
+# V6.13.0
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-video/src/main/cpp" ./video)
+
# RNOH_BEGIN: manual_package_linking_1
file(GLOB GENERATED_CPP_FILES "./generated/*.cpp")
@@ -577,8 +620,11 @@ std::vector> PackageProvider::getPackages(Package::Cont
```diff
...
+// V5.2.1
+ import { RNCVideo, RNC_VIDEO_TYPE } from "@react-native-oh-tpl/react-native-video"
+// V6.13.0
++ import { RNCVideo, RNC_VIDEO_TYPE } from "@react-native-ohos/react-native-video"
@Builder
function buildCustomRNComponent(ctx: ComponentBuilderContext) {
@@ -611,8 +657,12 @@ const arkTsComponentNames: Array = [
```diff
...
+// V5.2.1
+ import { RNCVideoPackage } from '@react-native-oh-tpl/react-native-video/ts';
+// V6.13.0
++ import { RNCVideoPackage } from '@react-native-ohos/react-native-video/ts';
+
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
return [
new SamplePackage(ctx),
@@ -638,7 +688,12 @@ ohpm install
要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-library/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases)
+请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 5.2.1 | [@react-native-oh-tpl/react-native-video Releases](https://github.com/react-native-oh-library/react-native-video/releases) | 0.72 |
+| 6.13.0 | [@react-native-ohos/react-native-video Releases]() | 0.77 |
## 属性
@@ -802,6 +857,9 @@ ohpm install
- [ ] source 暂时只支持在线 URL 资源问题: [issue#34](https://github.com/react-native-oh-library/react-native-video/issues/34)。
- [ ] react-native-video 部分属性和方法未实现 HarmonyOS 化: [issue#60](https://github.com/react-native-oh-library/react-native-video/issues/60)。
- [ ] V6.13.0原库部分接口在HarmonyOS中没有对应属性或接口支持: [issue#153](https://github.com/react-native-oh-library/react-native-video/issues/153)。
+- [ ] V6.13.0原库部分接口在HarmonyOS中没有对应属性或接口支持: [issue#1](https://gitcode.com/openharmony-sig/rntpc_react-native-video/issues/1)。
+- [ ] V6.13.0原库部分属性在HarmonyOS中没有对应属性或接口支持: [issue#2](https://gitcode.com/openharmony-sig/rntpc_react-native-video/issues/2)。
+- [ ] V6.13.0 鸿蒙化支持onSeek,但在V5.2.1未鸿蒙化。
## 其他
diff --git a/zh-cn/react-native-vision-camera.md b/zh-cn/react-native-vision-camera.md
index 60c05c2c..b48a1608 100644
--- a/zh-cn/react-native-vision-camera.md
+++ b/zh-cn/react-native-vision-camera.md
@@ -19,7 +19,14 @@
## 安装与使用
-请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-vision-camera Releases](https://github.com/react-native-oh-library/react-native-vision-camera/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
+请到三方库的 Releases 发布地址查看配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 4.0.1 | [@react-native-oh-tpl/react-native-vision-camera Releases](https://github.com/react-native-oh-library/react-native-vision-camera/releases) | 0.72 |
+| 4.7.0 | [@react-native-ohos/react-native-vision-camera Releases]() | 0.77 |
+
+对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。
进入到工程目录并输入以下命令:
@@ -28,13 +35,21 @@
#### **npm**
```bash
+# V4.0.1
npm install @react-native-oh-tpl/react-native-vision-camera
+
+# V4.7.0
+npm install @react-native-ohos/react-native-vision-camera
```
#### **yarn**
```bash
+# V4.0.1
yarn add @react-native-oh-tpl/react-native-vision-camera
+
+# V4.7.0
+yarn add @react-native-ohos/react-native-vision-camera
```
@@ -120,6 +135,8 @@ export default function VisionCameraDemo() {
打开 `entry/oh-package.json5`,添加以下依赖
+- V4.0.1
+
```json
"dependencies": {
"@rnoh/react-native-openharmony": "file:../react_native_openharmony",
@@ -127,6 +144,15 @@ export default function VisionCameraDemo() {
}
```
+- V4.7.0
+
+```json
+"dependencies": {
+ "@rnoh/react-native-openharmony": "file:../react_native_openharmony",
+ "@react-native-ohos/react-native-vision-camera": "file:../../node_modules/@react-native-ohos/react-native-vision-camera/harmony/vision_camera.har",
+ }
+```
+
点击右上角的 `sync` 按钮
或者在终端执行:
@@ -162,12 +188,23 @@ add_subdirectory("${RNOH_CPP_DIR}" ./rn)
# RNOH_BEGIN: manual_package_linking_1
add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package)
+
+# V4.0.1
+ add_subdirectory("${OH_MODULES}/@react-native-oh-tpl/react-native-vision-camera/src/main/cpp" ./vision-camera)
+
+# V4.7.0
++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-vision-camera/src/main/cpp" ./vision-camera)
+
# RNOH_END: manual_package_linking_1
file(GLOB GENERATED_CPP_FILES "./generated/*.cpp")
+
+# V4.0.1
+file(GLOB VISION_CAMERA_CPP_FILES "${OH_MODULES}/@react-native-oh-tpl/react-native-vision-camera/src/main/cpp/*.cpp")
+# V4.7.0
++file(GLOB VISION_CAMERA_CPP_FILES "${OH_MODULES}/@react-native-ohos/react-native-vision-camera/src/main/cpp/*.cpp")
+
add_library(rnoh_app SHARED
${GENERATED_CPP_FILES}
+ ${VISION_CAMERA_CPP_FILES}
@@ -207,8 +244,12 @@ std::vector> PackageProvider::getPackages(Package::Cont
```diff
...
+// V4.0.1
+ import { VisionCameraView } from "@react-native-oh-tpl/react-native-vision-camera";
+// V4.7.0
++ import { VisionCameraView } from "@react-native-ohos/react-native-vision-camera";
+
@Builder
export function buildCustomRNComponent(ctx: ComponentBuilderContext) {
...
@@ -238,8 +279,12 @@ export function buildCustomRNComponent(ctx: ComponentBuilderContext) {
```diff
...
+// V4.0.1
+ import { VisionCameraModulePackage } from "@react-native-oh-tpl/react-native-vision-camera/ts";
+// V4.7.0
++ import { VisionCameraModulePackage } from "@react-native-ohos/react-native-vision-camera/ts";
+
export function createRNPackages(ctx: RNPackageContext): RNPackage[] {
return [
new SamplePackage(ctx),
@@ -267,7 +312,12 @@ ohpm install
要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。
-请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-vision-camera Releases](https://github.com/react-native-oh-library/react-native-vision-camera/releases)
+请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:
+
+| 三方库版本 | 发布信息 | 支持RN版本 |
+| ---------- | ------------------------------------------------------------ | ---------- |
+| 4.0.1 | [@react-native-oh-tpl/react-native-vision-camera Releases](https://github.com/react-native-oh-library/react-native-vision-camera/releases) | 0.72 |
+| 4.7.0 | [@react-native-ohos/react-native-vision-camera Releases]() | 0.77 |
### 权限要求
@@ -342,6 +392,8 @@ ohpm install
> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。
> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。
+>
+> [!TIP] V4.7.0 isMirrored 1.鸿蒙拍照片仅支持前摄像头设置镜像拍照;2.录像不支持设置前后摄像头镜像;3.拍照和录像只能传入/data/storage/el2/base+其他路径。
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| ---------------------------------- | ------------------------------------------------------------ | -------- | -------- | ----------------- | ------------------ |
@@ -360,6 +412,7 @@ ohpm install
| resizeMode | Specifies the Preview's resize mode | string | no | All | yes |
| androidPreviewViewType | Specifies the implementation mode for the Preview View on Android | string | no | Android | no |
| fps | Specify the frames per second this camera should stream frames at. | number | no | All | yes |
+| isMirrored4.7.0+ | Enables or disables mirroring of outputs alongside the vertical axis. | boolean | no | All | yes |
| videoHdr | Enables or disables HDR Video Streaming for Preview, Video and Frame Processor via a 10-bit wide-color pixel format | boolean | no | All | yes |
| photoHdr | Enables or disables HDR Photo Capture via a double capture routine that combines low- and high exposure photos | boolean | no | Android/iOS | no |
| photoQualityBalance | Configures the photo pipeline for a specific quality balance prioritization. | string | no | All | yes |
@@ -371,11 +424,44 @@ ohpm install
| enableFpsGraph | If `true`, show a debug view to display the FPS of the Video Pipeline | boolean | no | Android/iOS | no |
| onError | Called when any kind of runtime error occured. | function | no | All | yes |
| onInitialized | Called when the camera session was successfully initialized. This will get called everytime a new device is set. | function | no | All | yes |
+| onOutputOrientationChanged4.7.0+ | Called whenever the output orientation changed. This might happen even if the screen/interface rotation is locked. | function | no | Android/iOS | no |
+| onPreviewOrientationChanged4.7.0+ | Called whenever the preview orientation changed. This will happen whenever the screen/interface rotates. | function | no | Android/iOS | no |
+| onPreviewStarted4.7.0+ | Called when the Preview View has received it's first frame and is now started. | function | no | Android/iOS | yes |
+| onPreviewStopped4.7.0+ | Called when the Preview View has stoppped streaming frames and is now stopped. | function | no | Android/iOS | no |
+| onUIRotationChanged4.7.0+ | Called whenever the target UI rotation/orientation changes. | function | no | Android/iOS | no |
+| outputOrientation4.7.0+ | Sets the orientation of all Camera Outputs (Photo, Snapshot and Video). | OutputOrientation | no | Android/iOS | no |
| onStarted | Called when the camera started the session (`isActive={true}`) | function | no | All | yes |
| onStopped | Called when the camera stopped the session (`isActive={false}`) | function | no | All | yes |
| onShutter | Called just before a photo or snapshot is captured. | function | no | All | yes |
| codeScanner | A CodeScanner that can detect QR-Codes or Barcodes using platform-native APIs | object | no | All | yes |
+**RecordVideoOptions**
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| --------------------- | ----------------------------------------------- | ------ | -------- | -------- | ------------------ |
+| path4.7.0+ | A custom path where the video will be saved to. | string | no | All | yes |
+
+**TakePhotoOptions**
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| --------------------- | ----------------------------------------------- | ------ | -------- | -------- | ------------------ |
+| path4.7.0+ | A custom path where the photo will be saved to. | string | no | All | yes |
+
+**CaptureError**
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------------------------------------- | ------------ | ------ | -------- | -------- | ------------------ |
+| capture/invalid-path4.7.0+ | invalid-path | string | no | All | yes |
+
+**CodeType**
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| -------------------------------------- | ----------------------------- | ------ | -------- | -------- | ------------------ |
+| gs1-data-bar4.7.0+ | The type of the code to scan. | string | no | iOS | no |
+| gs1-data-bar-limited4.7.0+ | The type of the code to scan. | string | no | iOS | no |
+| gs1-data-bar-expanded4.7.0+ | The type of the code to scan. | string | no | iOS | no |
+| itf-144.7.0+ | The type of the code to scan. | string | no | All | yes |
+
## 静态方法
> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。
@@ -400,6 +486,7 @@ ohpm install
| takeSnapshot | Captures a snapshot of the Camera view and write it's content to a temporary file. | function | no | Android/iOS | no |
| cancelRecording | Cancel the current video recording. The temporary video file will be deleted, | function | no | Android/iOS | no |
| addCameraDevicesChangedListener | Adds a listener that gets called everytime the Camera Devices change | function | no | Android/iOS | no |
+| createSkiaFrameProcessor | Create a new Frame Processor function which you can pass to the``
-
-> [!TIP] [Github 地址](https://github.com/react-navigation/react-navigation/tree/6.x/packages/bottom-tabs)
-
-## 安装与使用
-
-进入到工程目录并输入以下命令:
-
-
-
-
-#### **npm**
-
-```bash
-npm install @react-navigation/bottom-tabs@6.5.20
-```
-
-#### **yarn**
-
-```bash
-yarn add @react-navigation/bottom-tabs@6.5.20
-```
-
-
-
-下面的代码展示了这个库的基本使用场景:
-
-> [!WARNING] 使用时 import 的库名不变。
-
-```js
-import * as React from 'react';
-import { Text, View } from 'react-native';
-import { NavigationContainer } from '@react-navigation/native';
-import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
-
-function HomeScreen() {
- return (
-
- Home!
-
- );
-}
-
-function SettingsScreen() {
- return (
-
- Settings!
-
- );
-}
-
-const Tab = createBottomTabNavigator();
-
-export function NavigationBottomTabs() {
- return (
-
-
-
-
-
-
- );
-}
-```
-
-## Link
-
-本库依赖以下三方库,请查看对应文档:
-+ [@react-navigation/native](/zh-cn/react-navigation-native.md)
-+ [@react-native-oh-tpl/elements](/zh-cn/react-navigation-elements.md)
-+ [@react-native-oh-library/react-native-safe-area-context](/zh-cn/react-native-safe-area-context.md)
-
-本库 HarmonyOS 侧实现依赖@react-native-oh-library/react-native-safe-area-context 的原生端代码,如已在 HarmonyOS 工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。
-
-如未引入请参照[@react-native-oh-library/react-native-safe-area-context 文档的 Link 章节](/zh-cn/react-native-safe-area-context.md#link)进行引入
-
-
-## 约束与限制
-
-### 兼容性
-
-本文档内容基于以下版本验证通过:
-
-1. RNOH: 0.72.11; SDK: OpenHarmony(api11) 4.1.0.53; IDE: DevEco Studio 4.1.3.412; ROM: 2.0.0.52;
-2. RNOH: 0.72.13; SDK: HarmonyOS NEXT Developer Preview1; IDE: DevEco Studio 4.1.3.500; ROM: 2.0.0.58;
-3. RNOH: 0.72.20-CAPI; SDK: HarmonyOS NEXT Developer Beta1 B.0.18; IDE: DevEco Studio 5.0.3.200; ROM: 3.0.0.18;
-4. RNOH: 0.72.27; SDK: HarmonyOS-Next-DB1 5.0.0.25; IDE: DevEco Studio 5.0.3.400SP7; ROM: 3.0.0.25;
-
-## 属性
-
-> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。
-
-> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。
-
-以下属性已验证,更多属性详情请查看 [react-navigation/bottom-tabs 的文档介绍](https://reactnavigation.org/docs/bottom-tab-navigator)
-
-**Props**
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | -------- | ----------- | ----------------- |
-| id | Optional unique ID for the navigator. This can be used with navigation.getParent to refer to this navigator in a child navigator. | string | no | all | yes |
-| initialRouteName | The name of the route to render on first load of the navigator. | string | no | all | yes |
-| screenOptions | Default options to use for the screens in the navigator. | object | no | all | yes |
-| backBehavior | This controls what happens when goBack is called in the navigator. This includes pressing the device's back button or back gesture on Android. | 'firstRoute'|'initialRoute'|'order'|'history'|'none' | no | Android | yes |
-| detachInactiveScreens | Boolean used to indicate whether inactive screens should be detached from the view hierarchy to save memory. This enables integration with react-native-screens. Defaults to true. | boolean | no | Android,iOS | no |
-| sceneContainerStyle | Style object for the component wrapping the screen content. | object | no | all | yes |
-| tabBar | tabBar | function | no | all | yes |
-
-**Options & screenOptions**
-
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | ----------- | ----------------- |
-| title | Generic title that can be used as a fallback for headerTitle and tabBarLabel. | string | no | all | yes |
-| tabBarLabel | Title string of a tab displayed in the tab bar or a function that given { focused: boolean, color: string } returns a React.Node, | function | no | all | yes |
-| tabBarShowLabel | Whether the tab label should be visible. Defaults to true. | boolean | no | all | yes |
-| tabBarLabelPosition | Whether the label is shown below the icon or beside the icon. | 'below-icon'|'beside-icon' | no | all | yes |
-| tabBarLabelStyle | Style object for the tab label. | object | no | all | yes |
-| tabBarIcon | Function that given { focused: boolean, color: string, size: number } returns a React.Node, to display in the tab bar. | function | no | all | yes |
-| tabBarIconStyle | Style object for the tab icon. | object | no | all | yes |
-| tabBarBadge | Text to show in a badge on the tab icon. Accepts a string or a number. | string|number | no | all | yes |
-| tabBarBadgeStyle | Style for the badge on the tab icon. You can specify a background color or text color here. | object | no | all | yes |
-| tabBarAccessibilityLabel | Accessibility label for the tab button. | string | no | all | yes |
-| tabBarButton | Function which returns a React element to render as the tab bar button. | function | no | all | yes |
-| tabBarActiveTintColor | Color for the icon and label in the active tab. | string | no | all | yes |
-| tabBarInactiveTintColor | Color for the icon and label in the inactive tabs. | string | no | all | yes |
-| tabBarActiveBackgroundColor | Background color for the active tab. | string | no | all | yes |
-| tabBarInactiveBackgroundColor | Background color for the inactive tabs. | string | no | all | yes |
-| tabBarHideOnKeyboard | Whether the tab bar is hidden when the keyboard opens. Defaults to false. | boolean | no | all | yes |
-| tabBarItemStyle | Style object for the tab item container. | object | no | all | yes |
-| tabBarStyle | Style object for the tab bar. You can configure styles such as background color here. | object | no | all | yes |
-| tabBarBackground | Function which returns a React Element to use as background for the tab bar. | function | no | all | yes |
-| lazy | Whether this screens should render the first time it's accessed. | boolean | no | all | yes |
-| unmountOnBlur | Whether this screen should be unmounted when navigating away from it. | boolean | no | all | yes |
-| freezeOnBlur | Boolean indicating whether to prevent inactive screens from re-rendering. Defaults to false. Defaults to true when enableFreeze() from react-native-screens package is run at the top of the application. | boolean | no | Android,iOS | no | |
-
-**Header related options**
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ----------- | -------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | -------- | ----------------- |
-| header | Custom header to use instead of the default header. | function | no | all | yes |
-| headerShown | Whether to show or hide the header for the screen. The header is shown by default. Setting this to false hides the header. | boolean | no | all | yes |
-
-**Events**
-| Name | Description | Type | Required | Platform | HarmonyOS Support |
-| ------------ | ---------------------------------------------------------------------------------------------------------------------- | -------- | -------- | -------- | ----------------- |
-| tabPress | This event is fired when the user presses the tab button for the current screen in the tab bar. | function | no | all | yes |
-| tabLongPress | This event is fired when the user presses the tab button for the current screen in the tab bar for an extended period. | function | no | all | yes |
-
-## 遗留问题
-
-## 其他
-
-## 开源协议
-
-本项目基于 [The MIT License (MIT)](https://github.com/react-navigation/react-navigation/blob/6.x/packages/bottom-tabs/LICENSE) ,请自由地享受和参与开源。
\ No newline at end of file
+> 模板版本:v0.2.2
+
+
+
+> [!TIP] [Github 地址](https://github.com/react-navigation/react-navigation/tree/6.x/packages/bottom-tabs)
+
+## 安装与使用
+
+进入到工程目录并输入以下命令:
+
+
+
+#### **npm**
+
+```bash
+# V 6.5.20
+npm install @react-navigation/bottom-tabs@6.5.20
+
+# V7.3.10
+npm install @react-navigation/bottom-tabs@7.3.10
+```
+
+#### **yarn**
+
+```bash
+# V 6.5.20
+yarn add @react-navigation/bottom-tabs@6.5.20
+
+# V7.3.10
+yarn add @react-navigation/bottom-tabs@7.3.10
+```
+
+
+
+下面的代码展示了这个库的基本使用场景:
+
+> [!WARNING] 使用时 import 的库名不变。
+
+```js
+import * as React from 'react';
+import { Text, View } from 'react-native';
+import { NavigationContainer } from '@react-navigation/native';
+import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
+
+function HomeScreen() {
+ return (
+
+ Home!
+
+ );
+}
+
+function SettingsScreen() {
+ return (
+
+ Settings!
+
+ );
+}
+
+const Tab = createBottomTabNavigator();
+
+export function NavigationBottomTabs() {
+ return (
+
+
+
+
+
+
+ );
+}
+```
+
+## Link
+
+本库依赖以下三方库,请查看对应文档:
++ [@react-navigation/native](/zh-cn/react-navigation-native.md)
++ [@react-native-oh-tpl/elements](/zh-cn/react-navigation-elements.md)
++ [@react-native-oh-library/react-native-safe-area-context](/zh-cn/react-native-safe-area-context.md)
+
+本库 HarmonyOS 侧实现依赖@react-native-oh-library/react-native-safe-area-context 的原生端代码,如已在 HarmonyOS 工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。
+
+如未引入请参照[@react-native-oh-library/react-native-safe-area-context 文档的 Link 章节](/zh-cn/react-native-safe-area-context.md#link)进行引入
+
+
+## 约束与限制
+
+### 兼容性
+
+本文档内容基于以下版本验证通过:
+
+1. RNOH: 0.72.11; SDK: OpenHarmony(api11) 4.1.0.53; IDE: DevEco Studio 4.1.3.412; ROM: 2.0.0.52;
+2. RNOH: 0.72.13; SDK: HarmonyOS NEXT Developer Preview1; IDE: DevEco Studio 4.1.3.500; ROM: 2.0.0.58;
+3. RNOH: 0.72.20-CAPI; SDK: HarmonyOS NEXT Developer Beta1 B.0.18; IDE: DevEco Studio 5.0.3.200; ROM: 3.0.0.18;
+4. RNOH: 0.72.27; SDK: HarmonyOS-Next-DB1 5.0.0.25; IDE: DevEco Studio 5.0.3.400SP7; ROM: 3.0.0.25;
+
+## 属性
+
+> [!TIP] "Platform"列表示该属性在原三方库上支持的平台。
+
+> [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。
+
+以下属性已验证,更多属性详情请查看 [react-navigation/bottom-tabs 的文档介绍](https://reactnavigation.org/docs/bottom-tab-navigator)
+
+**Props**
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ | -------- | ----------- | ----------------- |
+| id | Optional unique ID for the navigator. This can be used with navigation.getParent to refer to this navigator in a child navigator. | string | no | all | yes |
+| initialRouteName | The name of the route to render on first load of the navigator. | string | no | all | yes |
+| screenOptions | Default options to use for the screens in the navigator. | object | no | all | yes |
+| backBehavior | This controls what happens when goBack is called in the navigator. This includes pressing the device's back button or back gesture on Android. | 'firstRoute'|'initialRoute'|'order'|'history'|'none' | no | Android | yes |
+| detachInactiveScreens | Boolean used to indicate whether inactive screens should be detached from the view hierarchy to save memory. This enables integration with react-native-screens. Defaults to true. | boolean | no | Android,iOS | no |
+| sceneContainerStyledeprecated from 7.3.10 | Style object for the component wrapping the screen content. | object | no | all | yes |
+| tabBar | tabBar | function | no | all | yes |
+| layout7.3.10+ | A layout is a wrapper around the navigator. | object | no | all | yes |
+| screenLayout7.3.10+ | A screen layout is a wrapper around each screen in the navigator. | object | no | all | yes |
+| screenListeners7.3.10+ | listeners for events from all screens for this navigator. | object | no | all | yes |
+
+**Options & screenOptions**
+
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | -------- | ----------- | ----------------- |
+| title | Generic title that can be used as a fallback for headerTitle and tabBarLabel. | string | no | all | yes |
+| tabBarLabel | Title string of a tab displayed in the tab bar or a function that given { focused: boolean, color: string } returns a React.Node, | function | no | all | yes |
+| tabBarShowLabel | Whether the tab label should be visible. Defaults to true. | boolean | no | all | yes |
+| tabBarLabelPosition | Whether the label is shown below the icon or beside the icon. | 'below-icon'|'beside-icon' | no | all | yes |
+| tabBarLabelStyle | Style object for the tab label. | object | no | all | yes |
+| tabBarIcon | Function that given { focused: boolean, color: string, size: number } returns a React.Node, to display in the tab bar. | function | no | all | yes |
+| tabBarIconStyle | Style object for the tab icon. | object | no | all | yes |
+| tabBarBadge | Text to show in a badge on the tab icon. Accepts a string or a number. | string|number | no | all | yes |
+| tabBarBadgeStyle | Style for the badge on the tab icon. You can specify a background color or text color here. | object | no | all | yes |
+| tabBarAccessibilityLabel | Accessibility label for the tab button. | string | no | all | yes |
+| tabBarButton | Function which returns a React element to render as the tab bar button. | function | no | all | yes |
+| tabBarActiveTintColor | Color for the icon and label in the active tab. | string | no | all | yes |
+| tabBarInactiveTintColor | Color for the icon and label in the inactive tabs. | string | no | all | yes |
+| tabBarActiveBackgroundColor | Background color for the active tab. | string | no | all | yes |
+| tabBarInactiveBackgroundColor | Background color for the inactive tabs. | string | no | all | yes |
+| tabBarHideOnKeyboard | Whether the tab bar is hidden when the keyboard opens. Defaults to false. | boolean | no | all | yes |
+| tabBarItemStyle | Style object for the tab item container. | object | no | all | yes |
+| tabBarStyle | Style object for the tab bar. You can configure styles such as background color here. | object | no | all | yes |
+| tabBarBackground | Function which returns a React Element to use as background for the tab bar. | function | no | all | yes |
+| lazy | Whether this screens should render the first time it's accessed. | boolean | no | all | yes |
+| unmountOnBlurdeprecated from 7.3.10 | Whether this screen should be unmounted when navigating away from it. | boolean | no | all | yes |
+| freezeOnBlur | Boolean indicating whether to prevent inactive screens from re-rendering. Defaults to false. Defaults to true when enableFreeze() from react-native-screens package is run at the top of the application. | boolean | no | Android,iOS | no | |
+| tabBarPosition7.3.10+ | Position of the tab bar. | 'bottom'\| 'top' \| 'left' \| 'right' | no | all | yes | |
+| tabBarVariant7.3.10+ | Variant of the tab bar.The material variant is currently only supported when the tabBarPosition is set to left or right. | 'uikit'\| 'material' | no | all | yes | |
+| popToTopOnBlur7.3.10+ | Boolean indicating whether any nested stack should be popped to the top of the stack when navigating away from this tab. | boolean | no | all | yes | |
+| sceneStyle7.3.10+ | Style object for the component wrapping the screen content. | object | no | all | yes | |
+
+
+**Header related options**
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ----------- | -------------------------------------------------------------------------------------------------------------------------- | -------- | -------- | -------- | ----------------- |
+| header | Custom header to use instead of the default header. | function | no | all | yes |
+| headerShown | Whether to show or hide the header for the screen. The header is shown by default. Setting this to false hides the header. | boolean | no | all | yes |
+
+**Events**
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ------------ | ---------------------------------------------------------------------------------------------------------------------- | -------- | -------- | -------- | ----------------- |
+| tabPress | This event is fired when the user presses the tab button for the current screen in the tab bar. | function | no | all | yes |
+| tabLongPress | This event is fired when the user presses the tab button for the current screen in the tab bar for an extended period. | function | no | all | yes |
+
+**Hooks**
+| Name | Description | Type | Required | Platform | HarmonyOS Support |
+| ----------------------- | ------------------------------------------------------------ | -------- | -------- | -------- | ----------------- |
+| useBottomTabBarHeight7.3.10+ | This hook returns the height of the bottom tab bar. By default, the screen content doesn't go under the tab bar. | function | no | all | yes |
+
+
+## 遗留问题
+
+## 其他
+
+## 开源协议
+
+本项目基于 [The MIT License (MIT)](https://github.com/react-navigation/react-navigation/blob/main/packages/bottom-tabs/LICENSE) ,请自由地享受和参与开源。
\ No newline at end of file
diff --git a/zh-cn/react-navigation-core.md b/zh-cn/react-navigation-core.md
index 359b6aac..7ef5a553 100644
--- a/zh-cn/react-navigation-core.md
+++ b/zh-cn/react-navigation-core.md
@@ -1,136 +1,144 @@
-> 模板版本:v0.2.2
-
-