1.2.5 • Published 5 years ago

icsoc-rc-dragable-transfer v1.2.5

Weekly downloads
2
License
ISC
Repository
-
Last release
5 years ago

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 不可缺,缺少将导致错误