From 5ffa3c3e9d3798e7703d82c6c91b3b0601e1b636 Mon Sep 17 00:00:00 2001 From: liang_tao001 Date: Thu, 29 Jan 2026 15:59:42 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E4=BF=AE=E6=94=B9recat-native-share=20?= =?UTF-8?q?=E5=BA=93=E7=9A=84=E4=BD=BF=E7=94=A8=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liang_tao001 --- en/react-native-share.md | 173 +++++++++++++++--------------------- zh-cn/react-native-share.md | 160 +++++++++++++-------------------- 2 files changed, 133 insertions(+), 200 deletions(-) diff --git a/en/react-native-share.md b/en/react-native-share.md index c9ad8253..cb4d60bb 100644 --- a/en/react-native-share.md +++ b/en/react-native-share.md @@ -1,42 +1,33 @@ -> Template version: v0.2.2 +> Template version: v0.4.0

react-native-share

-

- - Supported platforms - - - License - -

-> [!TIP] [Github address](https://github.com/react-native-share/react-native-share) +This project is based on [react-native-share](https://github.com/react-native-share/react-native-share) 。 -## Installation and Usage +This third-party library has been migrated to Gitcode and is now available for direct download from npm, the new package name is:`@react-native-ohos/react-native-share` The version correspondence details are as follows: +| Name | Version | Release Information | Supported RN Version | Supported Autolink | Compile API Version | Community Baseline Version | npm Address | +| ------------ | ------------ | ------------------------------ | ------------- | ------------- |------------------------ | ------------- | ------------- | +| @react-native-ohos/react-native-share | 12.2.1 | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.82 | No | API12+ | 12.2.0 | [Npm Address](https://www.npmjs.com/package/@react-native-ohos/react-native-share) | +| @react-native-ohos/react-native-share | 12.1.1 | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.77 | No API12+ | 12.1.0 | [Npm Address](https://www.npmjs.com/package/@react-native-ohos/react-native-share) | +| @react-native-ohos/react-native-share | 10.2.2 | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.72 | Yes | API12+ | 10.2.1 | [Npm Address](https://www.npmjs.com/package/@react-native-ohos/react-native-share) | +| @react-native-oh-tpl/react-native-share | <=10.2.1-0.0.6@deprecated | [Github Releases](https://github.com/react-native-oh-library/react-native-share/releases) | 0.72 | No | API12+ | 1.7.0 | [Npm Address](https://www.npmjs.com/package/@react-native-oh-tpl/react-native-share) | -Please refer to the Releases page of the third-party library for the corresponding version information -| Third-party Library Version | Release Information | Supported RN Version | -| ---------- | ------------------------------------------------------------ | ---------- | -| <=10.2.1-0.0.6@deprecated | [@react-native-oh-tpl/react-native-share Releases(deprecated)](https://github.com/react-native-oh-library/react-native-share/releases) | 0.72 | -| 10.2.2 | [@react-native-ohos/react-native-share Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.72 | -| 12.1.1 | [@react-native-ohos/react-native-share Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.77 | +## 1. Installation and Usage -For older versions not published on npm, please refer to the [Installation Guide](/en/tgz-usage-en.md) to install the tgz package. - -Go to the project directory and enter the following command: +Go to the project directory and execute the following instruction: -#### **npm** +#### npm ```bash npm install @react-native-ohos/react-native-share ``` -#### **yarn** +#### yarn ```bash yarn add @react-native-ohos/react-native-share @@ -58,7 +49,8 @@ The following code shows the basic use scenario of the repository: > [!WARNING] The name of the imported repository remains unchanged. -```js +```tsx + import React from "react"; import { Button } from "react-native"; import RNShare, { ShareSheet } from "react-native-share"; @@ -81,45 +73,46 @@ function App() { ); } - -export default App; ``` -## Use Codegen - -This library has been adapted for `Codegen`. Before using it, you need to proactively generate the bridge code for the third-party library. For details, please refer to the [Codegen Usage Documentation](/en/codegen.md). +## 2. Manual Link -## Link +| | Supported Autolink | Supported RN Version | +|----------------------------|--------------|--------| +| ~12.2.1 | No | 0.82 | +| ~12.1.1 | No | 0.77 | +| ~10.2.2 | Yes | 0.72 | +| <= 10.2.1-0.0.6@deprecated | No | 0.72 | -| | Is supported autolink | Supported RN Version | -|--------------------------------------|-----------------------|----------------------| -| ~12.1.1 | No | 0.77 | -| ~10.2.2 | Yes | 0.72 | -| <= 10.2.1-0.0.6@deprecated | No | 0.72 | +Projects using AutoLink need to be configured according to this document, AutoLink framework guide.:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md -Using AutoLink need to be configured according to this document, Autolink Framework Guide Documentation: https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md +If the version you are using supports Autolink and the project has integrated Autolink, you can skip the ManualLink configuration. -If the version you use supports Autolink and the project has been connected to Autolink, skip the ManualLink configuration.
- ManualLink: this step is a guide to manually configure native dependencies. + ManualLink: This step provides guidance for manually configuring native dependencies. + +Open the `harmony` directory of the HarmonyOS project in DevEco Studio. -First, use DevEco Studio to open the HarmonyOS project `harmony` in the project directory. +### 2.1. Overrides RN SDK -### 1. Adding the overrides Field to oh-package.json5 File in the Root Directory of the Project +To ensure the project relies on the same version of the RN SDK, you need to add an `overrides` field in the project's root `oh-package.json5` file, specifying the RN SDK version to be used. The replacement version can be a specific version number, a semver range, or a locally available HAR package or source directory. +For more information about the purpose of this field, please refer to the [official documentation](https://developer.huawei.com/consumer/en/doc/harmonyos-guides-V5/ide-oh-package-json5-V5#en-us_topic_0000001792256137_overrides). ```json { - ... "overrides": { - "@rnoh/react-native-openharmony" : "./react_native_openharmony" + "@rnoh/react-native-openharmony": "file:../react_native_openharmony" } } ``` -### 2. Introducing Native Code +### 2.2. Introducing Native Code Currently, two methods are available: +- Use the HAR file. +- Directly link to the source code。 + Method 1 (recommended): Use the HAR file. > [!TIP] The HAR file is stored in the `harmony` directory in the installation path of the third-party library. @@ -127,12 +120,10 @@ Method 1 (recommended): Use the HAR file. Open `entry/oh-package.json5` file and add the following dependencies: ```json - "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-ohos/react-native-share": "file:../../node_modules/@react-native-ohos/react-native-share/harmony/react_native_share.har" - } - +} ``` Click the `sync` button in the upper right corner. @@ -146,74 +137,60 @@ ohpm install Method 2: Directly link to the source code. -> [!TIP] For details, see [Directly Linking Source Code](/zh-cn/link-source-code.md). - -### 3. Introducing RNSharePackage to ArkTS - -Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: - -```diff -+ import {RNSharePackage} from '@react-native-ohos/react-native-share/ts'; - -export function createRNPackages(ctx: RNPackageContext): RNPackage[] { - return [ - new SamplePackage(ctx), -+ new RNSharePackage(ctx) - ]; -} -``` +> [!TIP] For details, see [Directly Linking Source Code](/en/link-source-code.md). -### 4. Configure CMakeLists and Import RNSharePackage +### 2.3. Configuring CMakeLists and Introducing RNSharePackage -> If you are using version <=10.2.1-0.0.6, please skip this chapter. +> If you are using version <= 1.7.0-0.0.7, please skip this chapter. -Open `entry/src/main/cpp/CMakeLists.txt` and add: +Open `entry/src/main/cpp/CMakeLists.txt` and add the following code: ```diff -... - -project(rnapp) -cmake_minimum_required(VERSION 3.4.1) -set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") + set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") -set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../react-native-harmony/harmony/cpp") - -add_subdirectory("${RNOH_CPP_DIR}" ./rn) +# RNOH_BEGIN: manual_package_linking_1 ++ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-share/src/main/cpp" ./share) # RNOH_END: manual_package_linking_1 -add_subdirectory("../../../../sample_package/src/main/cpp" ./sample-package) -+ add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-share/src/main/cpp" ./react_native_share) -# RNOH_END: manual_package_linking_1 - -add_library(rnoh_app SHARED - "./PackageProvider.cpp" - "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" -) - -target_link_libraries(rnoh_app PUBLIC rnoh) # RNOH_BEGIN: manual_package_linking_2 -target_link_libraries(rnoh_app PUBLIC rnoh_sample_package) + target_link_libraries(rnoh_app PUBLIC rnoh_share) -# RNOH_BEGIN: manual_package_linking_2 +# RNOH_END: manual_package_linking_2 ``` -Open `entry/src/main/cpp/PackageProvider.cpp` and add: +Open `entry/src/main/cpp/PackageProvider.cpp` and add the following code: ```diff #include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" + #include "RNSharePackage.h" using namespace rnoh; std::vector> PackageProvider::getPackages(Package::Context ctx) { return { -+ std::make_shared(ctx) + std::make_shared(ctx), ++ std::make_shared(ctx) + }; +} +``` + +### 2.4. Introducing RNSharePackage to ArkTS + +Open the `entry/src/main/ets/RNPackagesFactory.ts` file and add the following code: + +```diff + ... ++ import {RNSharePackage} from '@react-native-ohos/react-native-share/ts'; + +export function createRNPackages(ctx: RNPackageContext): RNPackage[] { + return [ ++ new RNSharePackage(ctx) + ]; } ```
-## Running +### 2.5. Running Click the `sync` button in the upper right corner. @@ -226,19 +203,17 @@ ohpm install Then build and run the code. -## Constraints - -### Compatibility +## 3. Constraints -To use this library, you need to use the correct React-Native and RNOH versions. Additionally, you need to use the matching DevEco Studio and phone ROM. +### 3.1. Compatibility -Verified successfully in the following versions: +This document is verified based on the following versions: 1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; -## Properties +## 4. Properties > [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. @@ -278,11 +253,8 @@ Verified successfully in the following versions: | visible | 是否显示 | boolean | no | iOS,Android | yes | | children | JSX element | React.ReactNode | no | iOS,Android | yes | -## API - -> [!TIP] The **Platform** column indicates the platform where the properties are supported in the original third-party library. -> [!TIP] If the value of **HarmonyOS Support** is **yes**, it means that the HarmonyOS platform supports this property; **no** means the opposite; **partially** means some capabilities of this property are supported. The usage method is the same on different platforms and the effect is the same as that of iOS or Android. +## 5. API | Name | Description | Type | Required | Platform | HarmonyOS Support | | -------------------------------------------------------------------------------- | ------------------------- | ------- | -------- | ----------- | ----------------- | @@ -423,12 +395,13 @@ Verified successfully in the following versions: | thumbnailImage | 分享数据的缩略图 | string | no | iOS | no | | linkMetadata | 分享的数据 | LinkMetadata | no | iOS | no | -## Known Issues + +## 6. Known Issues - [ ] 无法分享三方 APP 问题: [issue#1](https://github.com/react-native-oh-library/react-native-share/issues/1) -## Others +## 7. Others -## License +## 8. License This project is licensed under [The MIT License (MIT)](https://github.com/react-native-share/react-native-share/blob/main/LICENSE). diff --git a/zh-cn/react-native-share.md b/zh-cn/react-native-share.md index 14188dc4..69943c1e 100644 --- a/zh-cn/react-native-share.md +++ b/zh-cn/react-native-share.md @@ -1,46 +1,38 @@ -> 模板版本:v0.2.2 +> 模板版本:v0.4.0

react-native-share

-

- - Supported platforms - - - License - -

- - [!TIP] [Github 地址](https://github.com/react-native-share/react-native-share) -## 安装与使用 +本项目基于 [react-native-share](https://github.com/react-native-share/react-native-share) 开发。 -请到三方库的 Releases 发布地址查看配套的版本信息: +该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:`@react-native-ohos/react-native-share` 版本所属关系如下: +| 三方库名称 | 三方库版本 | 发布信息 | 支持RN版本 | Autolink | 编译API版本 | 社区基线版本 | npm地址 | +| ------------ | ------------ | ------------------------------ | ------------- | ------------- |------------------------ | ------------- | ------------- | +| @react-native-ohos/react-native-share | 12.2.1 | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.82 | 否 | API12+ | 12.2.0 | [Npm Address](https://www.npmjs.com/package/@react-native-ohos/react-native-share) | +| @react-native-ohos/react-native-share | 12.1.1 | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.77 | 否 | API12+ | 12.1.0 | [Npm Address](https://www.npmjs.com/package/@react-native-ohos/react-native-share) | +| @react-native-ohos/react-native-share | 10.2.2 | [Gitcode Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.72 | 是 | API12+ | 10.2.1 | [Npm Address](https://www.npmjs.com/package/@react-native-ohos/react-native-share) | +| @react-native-oh-tpl/react-native-share | <=10.2.1-0.0.6@deprecated | [Github Releases](https://github.com/react-native-oh-library/react-native-share/releases) | 0.72 | 否 | API12+ | 10.2.1 | [Npm Address](https://www.npmjs.com/package/@react-native-oh-tpl/react-native-share) | -| 三方库版本 | 发布信息 | 支持RN版本 | -|--------| ------------------------------------------------------------ | ---------- | -| <=10.2.1-0.0.6@deprecated | [@react-native-oh-tpl/react-native-share Releases(deprecated)](https://github.com/react-native-oh-library/react-native-share/releases) | 0.72 | -| 10.2.2 | [@react-native-ohos/react-native-share Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.72 | -| 12.1.1 | [@react-native-ohos/react-native-share Releases](https://gitcode.com/openharmony-sig/rntpc_react-native-share/releases) | 0.77 | -对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +## 1. 安装与使用 进入到工程目录并输入以下命令: -#### **npm** +#### npm ```bash npm install @react-native-ohos/react-native-share ``` -#### **yarn** +#### yarn ```bash yarn add @react-native-ohos/react-native-share ``` + 进入项目的 HarmonyOS 工程 harmony,打开 `entry/src/main/module.json5`,在module中添加:querySchemes字段,表示允许当前应用进行跳转查询的URI schemes,只允许entry类型模块配置,最多50个。例如如需要查询是否可以跳转微博,可以添加 @@ -57,7 +49,7 @@ yarn add @react-native-ohos/react-native-share > [!WARNING] 使用时 import 的库名不变。 -```js +```tsx import React from 'react'; import { Button } from 'react-native'; @@ -84,17 +76,14 @@ yarn add @react-native-ohos/react-native-share ``` -## 使用 Codegen - -本库已经适配了 `Codegen` ,在使用前需要主动执行生成三方库桥接代码,详细请参考[ Codegen 使用文档](/zh-cn/codegen.md)。 - -## Link +## 2. Link -| | 是否支持autolink | RN框架版本 | -|--------------------------------------|-----------------|------------| -| ~12.1.1 | No | 0.77 | -| ~10.2.2 | Yes | 0.72 | -| <= 10.2.1-0.0.6@deprecated | No | 0.72 | +| | 是否支持autolink | RN框架版本 | +|----------------------------|--------------|--------| +| ~12.2.1 | No | 0.82 | +| ~12.1.1 | No | 0.77 | +| ~10.2.2 | Yes | 0.72 | +| <= 10.2.1-0.0.6@deprecated | No | 0.72 | 使用AutoLink的工程需要根据该文档配置,Autolink框架指导文档:https://gitcode.com/openharmony-sig/ohos_react_native/blob/master/docs/zh-cn/Autolinking.md @@ -104,24 +93,26 @@ yarn add @react-native-ohos/react-native-share 首先需要使用 DevEco Studio 打开项目里的 HarmonyOS 工程 `harmony`。 -### 1.在工程根目录的 `oh-package.json` 添加 overrides 字段 +### 2.1. Overrides RN SDK + +为了让工程依赖同一个版本的 RN SDK,需要在工程根目录的 `oh-package.json5` 添加 overrides 字段,指向工程需要使用的 RN SDK 版本。替换的版本既可以是一个具体的版本号,也可以是一个模糊版本,还可以是本地存在的 HAR 包或源码目录。 + +关于该字段的作用请阅读[官方说明](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/ide-oh-package-json5-V5#zh-cn_topic_0000001792256137_overrides) ```json { - ... "overrides": { - "@rnoh/react-native-openharmony" : "./react_native_openharmony" + "@rnoh/react-native-openharmony": "file:../react_native_openharmony" } } ``` -### 2.引入原生端代码 +### 2.2. 引入原生端代码 目前有两种方法: -1. 通过 har 包引入(在 IDE 完善相关功能后该方法会被遗弃,目前首选此方法); - -2. 直接链接源码。 +- 通过 har 包引入; +- 直接链接源码。 方法一:通过 har 包引入(推荐) @@ -130,17 +121,15 @@ yarn add @react-native-ohos/react-native-share 打开 `entry/oh-package.json5`,添加以下依赖 ```json - "dependencies": { "@rnoh/react-native-openharmony": "file:../react_native_openharmony", "@react-native-ohos/react-native-share": "file:../../node_modules/@react-native-ohos/react-native-share/harmony/react_native_share.har" - } - +} ``` 点击右上角的 `sync` 按钮 -或者在终端执行: +或者在命令行终端执行: ```bash cd entry @@ -151,86 +140,62 @@ ohpm install > [!TIP] 如需使用直接链接源码,请参考[直接链接源码说明](/zh-cn/link-source-code.md) -### 3.配置CMakeLists和引入RNSharePackage +### 2.3. 配置 CMakeLists 和引入 RNSharePackage + +> 若使用的是 <= 10.2.1-0.0.6 版本,请跳过本章。 ->[!TIP] V12.1.0及以上需要配置CMakeLists和引入RNSharePackage。 +打开 `entry/src/main/cpp/CMakeLists.txt`,添加: ```diff -project(rnapp) -cmake_minimum_required(VERSION 3.4.1) -set(CMAKE_SKIP_BUILD_RPATH TRUE) -set(RNOH_APP_DIR "${CMAKE_CURRENT_SOURCE_DIR}") -set(NODE_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../node_modules") -set(OH_MODULE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") -set(RNOH_CPP_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules/@rnoh/react-native-openharmony/src/main/cpp") -set(RNOH_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/generated") -set(LOG_VERBOSITY_LEVEL 1) -set(CMAKE_ASM_FLAGS "-Wno-error=unused-command-line-argument -Qunused-arguments") -set(CMAKE_CXX_FLAGS "-fstack-protector-strong -Wl,-z,relro,-z,now,-z,noexecstack -s -fPIE -pie") -set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") - -set(WITH_HITRACE_SYSTRACE 1) # for other CMakeLists.txt files to use -add_compile_definitions(WITH_HITRACE_SYSTRACE) - -# (VM) Define a variable and assign it to the current module's cpp directory -set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) - -# Add the Header File directory, including cpp, cpp/include, and tell cmake to find the Header Files introduced by the code here -include_directories(${NATIVERENDER_ROOT_PATH} - ${NATIVERENDER_ROOT_PATH}/include) - -add_subdirectory("${RNOH_CPP_DIR}" ./rn) ++ set(OH_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../oh_modules") +# RNOH_BEGIN: manual_package_linking_1 + add_subdirectory("${OH_MODULES}/@react-native-ohos/react-native-share/src/main/cpp" ./share) +# RNOH_END: manual_package_linking_1 -file(GLOB GENERATED_CPP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/generated/*.cpp") # this line is needed by codegen v1 - -add_library(rnoh_app SHARED - ${GENERATED_CPP_FILES} - "./PackageProvider.cpp" - "${RNOH_CPP_DIR}/RNOHAppNapiBridge.cpp" -) -target_link_libraries(rnoh_app PUBLIC rnoh) +# RNOH_BEGIN: manual_package_linking_2 + target_link_libraries(rnoh_app PUBLIC rnoh_share) - +# RNOH_END: manual_package_linking_2 ``` -打开`entry/src/main/cpp/PackageProvider.cpp`,添加: +打开 `entry/src/main/cpp/PackageProvider.cpp`,添加: ```diff #include "RNOH/PackageProvider.h" +#include "generated/RNOHGeneratedPackage.h" + #include "RNSharePackage.h" + using namespace rnoh; -std::vector> PackageProvider::getPackages(Package::Context ctx) -{ +std::vector> PackageProvider::getPackages(Package::Context ctx) { return { -+ std::make_shared(ctx) + std::make_shared(ctx), ++ std::make_shared(ctx) }; } ``` -### 4.在 ArkTs 侧引入 RNSharePackage +### 2.4. 在 ArkTs 侧引入 RNSharePackage 打开 `entry/src/main/ets/RNPackagesFactory.ts`,添加: ```diff + ... + import {RNSharePackage} from '@react-native-ohos/react-native-share/ts'; export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return [ - new SamplePackage(ctx), + new RNSharePackage(ctx) ]; } ``` -## 运行 +### 2.5. 运行 点击右上角的 `sync` 按钮 -或者在终端执行: +或者在命令行终端执行: ```bash cd entry @@ -239,26 +204,23 @@ ohpm install 然后编译、运行即可。 -## 约束与限制 - +## 3. 约束与限制 -### 兼容性 +### 3.1. 兼容性 -要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 - -在以下版本验证通过: +本文档内容基于以下版本验证通过: 1. RNOH: 0.72.96; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; 2. RNOH: 0.72.33; SDK: HarmonyOS NEXT B1; IDE: DevEco Studio: 5.0.3.900; ROM: Next.0.0.71; 3. RNOH: 0.77.18; SDK: HarmonyOS 6.0.0 Release SDK; IDE: DevEco Studio 6.0.0.858; ROM: 6.0.0.112; -## 属性 +## 4. 属性 > [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 > [!TIP] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 - **Overlay**:分享面板弹窗组件 +**Overlay**:分享面板弹窗组件 | Name | Description | Type | Required | Platform | HarmonyOS Support | | ---- | ----------- | ---- | -------- | -------- | ------------------ | @@ -292,7 +254,7 @@ ohpm install | visible | 是否显示 | boolean | no | iOS,Android | yes | | children | JSX element | React.ReactNode | no | iOS,Android | yes | -## API +## 5. API > [!TIP] "Platform"列表示该属性在原三方库上支持的平台。 @@ -438,14 +400,12 @@ ohpm install | thumbnailImage | 分享数据的缩略图 | string | no | iOS | no | | linkMetadata | 分享的数据 | LinkMetadata | no | iOS | no | - -## 遗留问题 +## 6. 遗留问题 - [ ] 无法分享三方APP问题:[issue#1](https://github.com/react-native-oh-library/react-native-share/issues/1) +## 7. 其他 -## 其他 - -## 开源协议 +## 8. 开源协议 本项目基于 [The MIT License (MIT)](https://github.com/react-native-share/react-native-share/blob/main/LICENSE) ,请自由地享受和参与开源。 -- Gitee