forked from alibaba-fusion/next
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
132 lines (105 loc) · 2.35 KB
/
index.d.ts
File metadata and controls
132 lines (105 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
/// <reference types="react" />
import * as React from 'react';
interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
defaultValue?: any;
onChange?: any;
}
export interface TransferProps extends HTMLAttributesWeak {
/**
* 移动选项模式
*/
mode?: 'normal' | 'simple';
/**
* 数据源
*/
dataSource?: Array<any>;
/**
* (用于受控)当前值
*/
value?: Array<any>;
/**
* (用于非受控)初始值
*/
defaultValue?: Array<any>;
/**
* 值发生改变的时候触发的回调函数
*/
onChange?: (value: Array<any>, data: Array<any>, extra: {}) => void;
/**
* 是否禁用
*/
disabled?: boolean;
/**
* 是否禁用左侧面板
*/
leftDisabled?: boolean;
/**
* 是否禁用右侧面板
*/
rightDisabled?: boolean;
/**
* 列表项渲染函数
*/
itemRender?: (data: {}) => React.ReactNode;
/**
* 是否显示搜索框
*/
showSearch?: boolean;
/**
* 自定义搜索函数
*/
filter?: (searchedValue: string, data: {}) => boolean;
/**
* 搜索框输入时触发的回调函数
*/
onSearch?: (searchedValue: string, position: string) => void;
/**
* 搜索框占位符
*/
searchPlaceholder?: string;
/**
* 列表为空显示内容
*/
notFoundContent?: React.ReactNode;
/**
* 左右面板标题
*/
titles?: Array<any>;
/**
* 向右向左移动按钮显示内容
*/
operations?: Array<any>;
/**
* 左面板默认选中值
*/
defaultLeftChecked?: Array<any>;
/**
* 右面板默认选中值
*/
defaultRightChecked?: Array<any>;
/**
* 左右面板列表自定义样式类名
*/
listClassName?: string;
/**
* 左右面板列表自定义样式对象
*/
listStyle?: {};
/**
* 是否允许拖拽排序
*/
sortable?: boolean;
/**
* 拖拽排序时触发的回调函数
*/
onSort?: (value: Array<any>, position: string) => void;
/**
* 自定义国际化文案对象
*/
locale?: {};
/**
* 请设置 id 以保证transfer的可访问性
*/
id?: string;
}
export default class Transfer extends React.Component<TransferProps, any> {}