diff --git a/_navbar.md b/_navbar.md index 3b115bb15cbfb4519b4b7bdce9c9dcc97368da6d..48da9944b7daa72d6e38a53c035b92d22e0b709e 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 0000000000000000000000000000000000000000..fd3e2d8f74a923990cd1840a00f9a714ef51a9bd --- /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 0000000000000000000000000000000000000000..ba18330e2b8e52e2d76970525e4bb4de6274fe70 --- /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 0000000000000000000000000000000000000000..554067e1a01579c74960c318e66c48fd42a15c77 --- /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 0000000000000000000000000000000000000000..a7db105d35f717a7aff9df2f26ba8518b07318c6 --- /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 ( + +