@aliretail/drag-drop
v0.1.1
Published
拖拽组件
Downloads
7
Readme
MbcDragDrop
@aliretail/drag-drop
拖拽组件
API
| 参数名 | 说明 | 必填 | 类型 | 默认值 | 备注 | | ------ | ---- | ---- | ---- | ------ | ---- | | key | 拖拽的唯一Key | N | string | 'list' | - | | list | 渲染的数据 | Y | Array | - | - | | callback | 拖拽后的回调 | Y | callback: (dragIndex: number, dropIndex: number) => void | - | - | | renderItem | 子项渲染的逻辑 | Y | (IRenderItemProps<T>) => JSX.Element | - | - |
IRenderItemProps
interface IRenderItemProps<T = any> { record: T, key: number, list: Array, [propName: string]: any, }