@uyun/ec-sortable
Sortable component from everest-components
Last updated 7 years ago by shenting .
UNLICENSED · Repository · Bugs ·
$ cnpm install @uyun/ec-sortable 
Private package

category: Components type: CMDB title: Sortable subtitle: 排序

基于 react-dnd 的排序组件。

作者:马琪斌

何时使用

通过拖拽操作对子组件进行排序,并触发相应的业务逻辑。

API

通过拖拽进行排序,为避免每一项重复渲染,建议使用 react-addons-update 更新 state

属性 说明 类型 默认值
collection 设置需要排序的数组 any[] -
itemRender 设置单列需要排序的组件 function
onDrop drop 后返回的新数据 function -
itemKey 排序行 key 的取值,可以是字符串或一个函数 string/function(record) 'key'
targetName 组件标签名称 string div
className 组件className string -
dragHandle 仅可以用来拖拽的组件 ReactNode -
itemClassName 每一项className,仅配合配合dragHandle组件使用 string -

Current Tags

  • 1.0.0-dev.0                                ...           dev (3 years ago)
  • 0.0.3                                ...           latest (7 years ago)

3 Versions

  • 1.0.0-dev.0                                ...           3 years ago
  • 0.0.2                                ...           8 years ago
  • 0.0.3                                ...           7 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org