icsoc-rc-dragable-transfer

1.2.5 • Public • Published

category: Components order: 0 subtitle: 拖拽穿梭框 type: 新增组件 title: DragableTransfer modifiedJs: 1 cols: 1

支持拖拽的穿梭框,基于 sortablejs。风格类似 antd 的穿梭框。

左侧备选项的顺序会按照数据的 key 值进行排序,右侧可随意调整顺序。

API

参数 说明 类型 默认值
className 自定义类 string
titles 标题集合,顺序从左到右 string[] ['全部字段', '列表中展示的字段']
placeholders 搜索框提示集合,顺序从左到右 string[] ["请输入搜索内容", "请输入搜索内容"]
onChange 选项在两栏之间转移时的回调函数 (targetKeys, direction, moveKeys): void
dataSource 数据源,其中 chosen 为 true 或者 required 为 ture 的会被渲染到右侧;required 为 true 的代表不可被拖拽到左侧,请严格遵守下方 注意 里的要求 [] []

注意

你的 dataSource 必须为 [{key:1,title:'yourTitle',chosen:true,required:true}] 的形式, key 和 title 不可缺,缺少将导致错误

Readme

Keywords

none

Package Sidebar

Install

npm i icsoc-rc-dragable-transfer

Weekly Downloads

0

Version

1.2.5

License

ISC

Unpacked Size

72 kB

Total Files

9

Last publish

Collaborators

  • icsoc