更新文档

This commit is contained in:
sh 2020-01-14 23:58:35 +08:00
parent 5bfbdec311
commit 1fd44659d0
5 changed files with 30 additions and 1 deletions

View File

@ -5,3 +5,4 @@ demo
.watchmanconfig
example.gif
yarn-error.log
example2.gif

View File

@ -134,6 +134,20 @@ const styles = StyleSheet.create({
| onDragRelease | (data) => void | no | Function will execute when item release, and will return the new ordered data |
| onResetSort | (data) => void | no | Function will execute when dragged item change sort |
## Item Props
| parameter | type | required | description |
| :-------- | :---- | :------- | :---------- |
| disabledDrag | boolean | no | It will disable drag for the item |
| disabledResorted | boolean | no | It will disable resort the item |
if you set disabledResorted be true, it will look like that
<p align="center">
<img alt="Issue Stats" width="400" src="https://github.com/SHISME/react-native-draggable-grid/blob/master/example2.gif?raw=true">
</p>
## Custom Drag Start Animation
If you want to use your custom animation, you can do like this

View File

@ -130,6 +130,20 @@ const styles = StyleSheet.create({
| onDragRelease | (data) => void | no | 拖动释放时的回调,会返回排序之后的数据 |
| onResetSort | (data) => void | no | 拖动时重新排序的回调,会返回排序后的数据 |
## Item Props
| parameter | type | required | description |
| :-------- | :---- | :------- | :---------- |
| disabledDrag | boolean | no | 禁止选项拖动 |
| disabledResorted | boolean | no | 禁止选项被重新排序 |
设置 `disabledResorted``true`, 那么那个选项拖动时排序的时候就会被忽略
<p align="center">
<img alt="Issue Stats" width="400" src="https://github.com/SHISME/react-native-draggable-grid/blob/master/example2.gif?raw=true">
</p>
## 自定义拖动开始时的动画
如果你想自定义拖动开始时的动画,你可以这样使用

BIN
example2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -5,7 +5,7 @@
"sortable",
"grid"
],
"version": "1.1.1",
"version": "1.2.0",
"description": "A draggable grid for react native",
"main": "built/index.js",
"types": "src/index.ts",