文档模板:v0.4.2

react-native-drax

本项目基于 react-native-drax 开发。

该第三方库的仓库已迁移至 Gitcode,且支持直接从 npm 下载,新的包名为:@react-native-ohos/react-native-drax,版本所属关系如下:

三方库名称 三方库版本(npm地址) 发布信息 支持RN版本 Autolink 编译API版本 社区基线版本 源码地址
@react-native-ohos/react-native-drax ~ 1.0.0(开发中) Gitcode Releases 0.82.* 否 API12+ 1.1.0 br_rnoh0.82
@react-native-ohos/react-native-drax ~ 0.12.0 Gitcode Releases 0.77.* 否 API12+ 0.11.0-alpha.2 br_rnoh0.77
@react-native-ohos/react-native-drax ~ 0.10.4 Gitcode Releases 0.72.* 否 API12+ 0.10.3 br_rnoh0.72
@react-native-oh-tpl/react-native-drax <= 0.10.3-0.0.1@deprecated Github Releases(deprecated) 0.72.* 否 API12+ 0.10.3 sig

简介

react-native-drax 是一个 React Native 的拖拽库,提供跨平台的拖拽功能支持。
它提供了 DraxProvider、DraxView、DraxList、DraxScrollView 等组件,支持拖拽检测、拖拽样式、拖拽传递数据、列表项重新排序等功能。

下载安装

进入到工程目录并输入以下命令:

npm

npm install @react-native-ohos/react-native-drax

yarn

yarn add @react-native-ohos/react-native-drax

本库实现依赖 react-native-reanimated、react-native-gesture-handler的原生端代码,如已在鸿蒙工程中引入过该库,则无需再次引入,可跳过本章节步骤,直接使用。

请参照以下文档进行引入:react-native-reanimated 文档、react-native-gesture-handler 文档。