2016-03-31 14:17:09 +08:00
|
|
|
---
|
|
|
|
category: Components
|
|
|
|
chinese: 穿梭框
|
2016-05-11 14:21:01 +08:00
|
|
|
type: Form Control
|
2016-03-31 14:17:09 +08:00
|
|
|
cols: 1
|
|
|
|
english: Transfer
|
|
|
|
---
|
2015-11-25 23:17:06 +08:00
|
|
|
|
2015-12-24 20:47:09 +08:00
|
|
|
双栏穿梭选择框。
|
2015-11-25 23:17:06 +08:00
|
|
|
|
|
|
|
## 何时使用
|
2015-12-24 20:47:09 +08:00
|
|
|
|
|
|
|
用直观的方式在两栏中移动元素,完成选择行为。
|
2015-11-25 23:17:06 +08:00
|
|
|
|
|
|
|
## API
|
|
|
|
|
|
|
|
|
2015-12-24 20:49:10 +08:00
|
|
|
| 参数 | 说明 | 类型 | 默认值 |
|
2015-12-23 19:41:56 +08:00
|
|
|
|-----------|------------------------------------------|------------|--------|
|
|
|
|
| dataSource | 数据源 | Array | [] |
|
2015-12-23 22:59:42 +08:00
|
|
|
| render | 每行数据渲染函数 | Function(record) | |
|
|
|
|
| targetKeys | 显示在右侧框数据的key集合 | Array | [] |
|
2016-02-01 14:07:17 +08:00
|
|
|
| onChange | 变化时回调函数 | Function(targetKeys, direction, moveKeys) | |
|
2015-12-24 17:44:54 +08:00
|
|
|
| listStyle | 两个穿梭框的自定义样式 | Object | |
|
|
|
|
| className | 自定义类 | String | |
|
2015-12-23 19:41:56 +08:00
|
|
|
| titles | 标题集合,顺序从左至右 | Array | ['源列表', '目的列表'] |
|
|
|
|
| operations | 操作文案集合,顺序从上至下 | Array | [] |
|
|
|
|
| showSearch | 是否显示搜索框 | Boolean | false |
|
2016-03-07 14:52:14 +08:00
|
|
|
| searchPlaceholder | 搜索框的默认值 | String | '请输入搜索内容' |
|
|
|
|
| notFoundContent | 当列表为空时显示的内容 | React.node | '列表为空' |
|
2016-04-14 11:22:53 +08:00
|
|
|
| footer | 底部渲染函数 | Function(props) | |
|