From 460ccdf1845a03eac72df017de000f940cec0449 Mon Sep 17 00:00:00 2001 From: Louis-C7 <972339262@qq.com> Date: Thu, 21 Dec 2023 11:22:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[Issues:=20#I8Q6RJ]=20Vmall=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _navbar.md | 23 +- vmall/README.md | 37 +++ vmall/_coverpage.md | 11 + vmall/_sidebar.md | 27 ++ vmall/datetimepicker.md | 262 ++++++++++++++++ vmall/flash-list.md | 1 + vmall/lottie-react-native.md | 247 ++++++++++++++++ vmall/model.md | 313 ++++++++++++++++++++ vmall/react-native-SmartRefreshLayout.md | 347 ++++++++++++++++++++++ vmall/react-native-exception-handler.md | 362 +++++++++++++++++++++++ vmall/react-native-fast-image.md | 259 ++++++++++++++++ vmall/react-native-gesture-handler.md | 1 + vmall/react-native-image-picker.md | 265 +++++++++++++++++ vmall/react-native-linear-gradient.md | 242 +++++++++++++++ vmall/react-native-masked-view.md | 252 ++++++++++++++++ vmall/react-native-netinfo.md | 294 ++++++++++++++++++ vmall/react-native-pager-view.md | 236 +++++++++++++++ vmall/react-native-safe-area-context.md | 270 +++++++++++++++++ vmall/react-native-screens.md | 33 +++ vmall/react-native-svg.md | 296 ++++++++++++++++++ vmall/react-native-tab-view.md | 349 ++++++++++++++++++++++ vmall/react-native-video.md | 342 +++++++++++++++++++++ vmall/react-native-webview.md | 240 +++++++++++++++ vmall/react-navigation-elements.md | 135 +++++++++ vmall/react-navigation.md | 33 +++ 25 files changed, 4864 insertions(+), 13 deletions(-) create mode 100644 vmall/README.md create mode 100644 vmall/_coverpage.md create mode 100644 vmall/_sidebar.md create mode 100644 vmall/datetimepicker.md create mode 100644 vmall/flash-list.md create mode 100644 vmall/lottie-react-native.md create mode 100644 vmall/model.md create mode 100644 vmall/react-native-SmartRefreshLayout.md create mode 100644 vmall/react-native-exception-handler.md create mode 100644 vmall/react-native-fast-image.md create mode 100644 vmall/react-native-gesture-handler.md create mode 100644 vmall/react-native-image-picker.md create mode 100644 vmall/react-native-linear-gradient.md create mode 100644 vmall/react-native-masked-view.md create mode 100644 vmall/react-native-netinfo.md create mode 100644 vmall/react-native-pager-view.md create mode 100644 vmall/react-native-safe-area-context.md create mode 100644 vmall/react-native-screens.md create mode 100644 vmall/react-native-svg.md create mode 100644 vmall/react-native-tab-view.md create mode 100644 vmall/react-native-video.md create mode 100644 vmall/react-native-webview.md create mode 100644 vmall/react-navigation-elements.md create mode 100644 vmall/react-navigation.md diff --git a/_navbar.md b/_navbar.md index 3b115bb15..48da9944b 100644 --- a/_navbar.md +++ b/_navbar.md @@ -1,15 +1,12 @@ -* 相关链接 - * [文档Gitee地址](https://gitee.com/react-native-oh-library/usage-docs/tree/master) - * [RNOH三方库源码](https://github.com/orgs/react-native-oh-library/repositories) - * [RNOH框架源码](https://github.com/react-native-openharmony/rnoh) - * [OpenHarmony应用开发](https://docs.openharmony.cn/pages/v4.0/zh-cn/application-dev/application-dev-guide.md/) - * [Docsify](https://docsify.js.org/#/) - - -* 语言 - * [中文](/zh-cn/) - * [En(待完善)](/zh-en/) - - \ No newline at end of file +- 相关链接 + - [文档 Gitee 地址](https://gitee.com/react-native-oh-library/usage-docs/tree/master) + - [RNOH 三方库源码](https://github.com/orgs/react-native-oh-library/repositories) + - [RNOH 框架源码](https://github.com/react-native-openharmony/rnoh) + - [OpenHarmony 应用开发](https://docs.openharmony.cn/pages/v4.0/zh-cn/application-dev/application-dev-guide.md/) + - [Docsify](https://docsify.js.org/#/) +- 版本 + - [中文](/zh-cn/) + - [En(待完善)](/zh-en/) + - [VMall](/vmall/) diff --git a/vmall/README.md b/vmall/README.md new file mode 100644 index 000000000..fd3e2d8f7 --- /dev/null +++ b/vmall/README.md @@ -0,0 +1,37 @@ +# 简介 + +> 欢迎开始 React-Native 的旅程!如果你在找如何搭建环境的文档,请移步开发文档的[搭建开发环境](https://react-native-oh-library.gitee.io/docs/#/zh-cn/environment)章节。 + +## 概述 + +该文档旨在帮助开发者在 OpenHarmony 平台使用 React Native OpenHarmony 的第三方库,并呈现每个三方库的信息。 + +## RNOH 三方库总览 (VMall) + +> [!tip] NPM 公仓坐标:@react-native-oh-tpl + +| 序号 | 原库名 | 原库基线版本 | 原库是否支持新架构 | 鸿蒙化进度 | Releases | 文档链接 | +| :--: | :----: | :----------: | :----------------: | :--------: | :------: | :------: | +| 1 | [@react-native-community/datetimepicker](https://github.com/react-native-datetimepicker/datetimepicker) | x | x | x | [@react-native-oh-tpl/datetimepicker](https://github.com/react-native-oh-library/datetimepicker) | [链接](vmall/datetimepicker.md) | +| 2 | [@shopify/flash-list](https://github.com/Shopify/flash-list) | 1.6.3 | 否 | 80% | [@react-native-oh-tpl/flash-list](https://github.com/react-native-oh-library/flash-list/tree/harmony) | [链接](vmall/flash-list.md) | +| 3 | [lottie-react-native](https://github.com/lottie-react-native/lottie-react-native) | 6.4.1 | 是 | 50% | [@react-native-oh-tpl/lottie-react-native](https://github.com/react-native-oh-library/lottie-react-native/releases) | [链接](vmall/lottie-react-native.md) | +| 4 | [react-native-exception-handler](https://github.com/a7ul/react-native-exception-handler) | 2.10.10 | 否 | 100% | [@react-native-oh-tpl/react-native-exception-handler](https://github.com/react-native-oh-library/react-native-exception-handler/releases) | [链接](vmall/react-native-exception-handler.md) | +| 5 | [react-native-fast-image](https://github.com/DylanVann/react-native-fast-image) | 8.6.3 | 否 | 70% | [@react-native-oh-tpl/react-native-fast-image](https://github.com/react-native-oh-library/react-native-fast-image/releases) | [链接](vmall/react-native-fast-image.md) | +| 6 | [react-native-gesture-handler](https://github.com/software-mansion/react-native-gesture-handler) | 2.12.1 | 是 | 50% | [@react-native-oh-tpl/react-native-gesture-handler](https://github.com/react-native-oh-library/react-native-gesture-handler/releases) | [链接](vmall/react-native-gesture-handler.md) | +| 7 | [react-native-image-picker](https://github.com/react-native-image-picker/react-native-image-picker) | 7.0.3 | 是 | 50% | [@react-native-oh-tpl/react-native-image-picker](https://github.com/react-native-oh-library/react-native-image-picker/releases) | [链接](vmall/react-native-image-picker.md) | +| 8 | [react-native-linear-gradient](https://github.com/react-native-linear-gradient/react-native-linear-gradient) | 3.0.0-alpha.1 | 是 | 90% | [@react-native-oh-tpl/react-native-linear-gradient](https://github.com/react-native-oh-library/react-native-linear-gradient/releases) | [链接](vmall/react-native-linear-gradient.md) | +| 9 | [@react-native-masked-view/masked-view](https://github.com/react-native-masked-view/masked-view) | 0.2.9 | 否 | 90% | [@react-native-oh-tpl/masked-view](https://github.com/react-native-oh-library/masked-view/releases) | [链接](vmall/react-native-masked-view.md) | +| 10 | [@react-native-community/netinfo](https://github.com/react-native-netinfo/react-native-netinfo) | 11.1.0 | 是 | 70% | [@react-native-oh-library/netinfo](https://github.com/react-native-oh-library/react-native-netinfo/releases) | [链接](vmall/react-native-netinfo.md) | +| 11 | [react-native-pager-view](https://github.com/callstack/react-native-pager-view) | 6.2.2 | 是 | 100% | [@react-native-oh-tpl/react-native-pager-view](https://github.com/react-native-oh-library/react-native-pager-view/releases) | [链接](vmall/react-native-pager-view.md) | +| 12 | [react-native-safe-area-context](https://github.com/th3rdwave/react-native-safe-area-context) | 4.7.4 | 是 |100% | [@react-native-oh-tpl/react-native-safe-area-context](https://github.com/react-native-oh-library/react-native-safe-area-context/releases) | [链接](vmall/react-native-safe-area-context.md) | +| 13 | [react-native-screens](https://github.com/software-mansion/react-native-screens) | 3.29.0 | 是 | 0% | [react-native-screens](https://github.com/software-mansion/react-native-screens/releases) | [链接](vmall/react-native-screens.md) | +| 14 | [react-native-SmartRefreshLayout](https://github.com/react-native-studio/react-native-SmartRefreshLayout) | 0.6.7 | 否 | 70% | [@react-native-oh-tpl/react-native-SmartRefreshLayout](https://github.com/react-native-oh-library/react-native-SmartRefreshLayout/releases) | [链接](zh-cn/react-native-SmartRefreshLayout.md) | +| 15 | [react-native-svg](https://github.com/software-mansion/react-native-svg) | 13.14.0 | 是 | 10% | [@react-native-oh-tpl/react-native-svg](https://github.com/react-native-oh-library/react-native-svg/releases) | [链接](zh-cn/react-native-svg.md) | +| 16 | [react-native-tab-view](https://github.com/react-navigation/react-navigation/tree/6.x/packages/react-native-tab-view) | 3.5.2 | - | 100% | [@react-native-oh-tpl/react-native-tab-view](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](zh-cn/react-native-tab-view.md) | +| 17 | [react-native-video](https://github.com/react-native-video/react-native-video) | 5.2.1 | 是 | x | [@react-native-oh-tpl/react-native-video](https://github.com/react-native-oh-library/react-native-video) | [链接](vmall/react-native-video.md) | +| 18 | [react-native-webview](https://github.com/react-native-webview/react-native-webview) | 13.6.2 | 是 | 15% | [@react-native-oh-tpl/react-native-webview](https://github.com/react-native-oh-library/react-native-webview/releases) | [链接](vmall/react-native-webview.md) | +| 19 | [@react-navigation/elements](https://github.com/react-navigation/react-navigation/tree/6.x/packages/elements) | 1.3.21 | - | 100% | [@react-native-oh-tpl/elements](https://github.com/react-native-oh-library/react-navigation/releases) | [链接](vmall/react-navigation-elements.md) | + +## 社区 + +[Github Organization: react-native-oh-library](https://github.com/react-native-oh-library) diff --git a/vmall/_coverpage.md b/vmall/_coverpage.md new file mode 100644 index 000000000..ba18330e2 --- /dev/null +++ b/vmall/_coverpage.md @@ -0,0 +1,11 @@ + + +![logo](./img/react.svg ":size=20%") + +# React Native OpenHarmony 三方库说明文档 + +> OpenHarmony 平台的 React Native 三方库使用和说明 + +[Gitee](https://gitee.com/react-native-oh-library/usage-docs) +[GitHub(待完善)]() +[快速开始](/zh-cn/README.md) diff --git a/vmall/_sidebar.md b/vmall/_sidebar.md new file mode 100644 index 000000000..554067e1a --- /dev/null +++ b/vmall/_sidebar.md @@ -0,0 +1,27 @@ + + +- [首页](vmall/README.md) + +- [文档模板](vmall/model.md) + +- 三方库说明文档合集(VMall 版本) + + - [@react-native-community/datetimepicker](vmall/datetimepicker.md) + - [lottie-react-native](vmall/lottie-react-native.md) + - [react-native-exception-handler](vmall/react-native-exception-handler.md) + - [react-native-fast-image](vmall/react-native-fast-image.md) + - [react-native-gesture-handler]() + - [react-native-image-picker](vmall/react-native-image-picker.md) + - [react-native-linear-gradient](vmall/react-native-linear-gradient.md) + - [@react-native-masked-view/masked-view](vmall/react-native-masked-view.md) + - [@react-native-community/netinfo](vmall/react-native-netinfo.md) + - [react-native-pager-view](vmall/react-native-pager-view.md) + - [react-native-safe-area-context](vmall/react-native-safe-area-context.md) + - [react-native-screens](vmall/react-native-screens.md) + - [react-native-SmartRefreshLayout](vmall/react-native-SmartRefreshLayout.md) + - [react-native-svg](vmall/react-native-svg.md) + - [react-native-tab-view](vmall/react-native-tab-view.md) + - [react-native-video](vmall/react-native-video.md) + - [react-native-webview](vmall/react-native-webview.md) + - [@react-navigation/elements](vmall/react-navigation-elements.md) + - [react-navigation](vmall/react-navigation.md) diff --git a/vmall/datetimepicker.md b/vmall/datetimepicker.md new file mode 100644 index 000000000..a7db105d3 --- /dev/null +++ b/vmall/datetimepicker.md @@ -0,0 +1,262 @@ +> 模板版本:v0.0.1 + +

+

@react-native-community/datetimepicker

+

+

+ + Supported platforms + + + License + +

+ +## 安装与使用 + +进入到工程目录并输入以下命令: + + + +**正在 npm 发布中,当前请先从仓库[Release](https://github.com/react-native-oh-library/datetimepicker/releases)中获取库 tgz,通过使用本地依赖来安装本库。** + +#### **yarn** + +```bash +yarn add xxx +``` + +#### **npm** + +```bash +npm install xxx +``` + + + +下面的代码展示了这个库的基本使用场景: + +```js +import DateTimePicker from '@react-native-community/datetimepicker'; + +export const App = () => { + const [date, setDate] = useState(new Date(1598051730000)); + const [mode, setMode] = useState('date'); + const [show, setShow] = useState(false); + + const onChange = (event, selectedDate) => { + const currentDate = selectedDate; + setShow(false); + setDate(currentDate); + }; + + const showMode = (currentMode) => { + setShow(true); + setMode(currentMode); + }; + + const showDatepicker = () => { + showMode('date'); + }; + + const showTimepicker = () => { + showMode('time'); + }; + + return ( + +