npm.io
1.0.1-a.0 • Published 5 years ago

@riil-frontend/next-collapse

Licence
MIT
Version
1.0.1-a.0
Deps
3
Size
1019 kB
Vulns
0
Weekly
0

drag Collapse

collapse

基于 next collapse 组件封装了 dragDataSource onSort 两个属性,用来实现拖拽排序功能

API

参数名 说明 必填 类型 默认值 备注
dragSortable 是否支持拖拽排序 boolean false 只支持 dataSource 模式生成的折叠面板
onSort 拖拽后,回调方法,传出排序后的 dataSource (dataSource)=>{} - 只支持 dataSource 模式生成的折叠面板
dataSource 折叠面板数据模式 object[] - 若应用在拖拽模式,则需设置 key 属性,且 key 属性不应以数组序号定义,以避免拖拽后展开项不跟随拖拽生效