1 |
|
2 |
|
3 | import * as React from "react";
|
4 |
|
5 | interface HTMLAttributesWeak extends React.HTMLAttributes<HTMLElement> {
|
6 | defaultValue?: any;
|
7 | onChange?: any;
|
8 | }
|
9 |
|
10 | export interface CascaderSelectProps extends HTMLAttributesWeak {
|
11 | |
12 |
|
13 |
|
14 | size?: "small" | "medium" | "large";
|
15 |
|
16 | |
17 |
|
18 |
|
19 | placeholder?: string;
|
20 |
|
21 | |
22 |
|
23 |
|
24 | disabled?: boolean;
|
25 |
|
26 | |
27 |
|
28 |
|
29 | hasArrow?: boolean;
|
30 |
|
31 | |
32 |
|
33 |
|
34 | hasBorder?: boolean;
|
35 |
|
36 | |
37 |
|
38 |
|
39 | hasClear?: boolean;
|
40 |
|
41 | |
42 |
|
43 |
|
44 | label?: React.ReactNode;
|
45 |
|
46 | |
47 |
|
48 |
|
49 | readOnly?: boolean;
|
50 |
|
51 | |
52 |
|
53 |
|
54 | dataSource?: Array<any>;
|
55 |
|
56 | |
57 |
|
58 |
|
59 | defaultValue?: string | Array<any>;
|
60 |
|
61 | |
62 |
|
63 |
|
64 | value?: string | Array<any>;
|
65 |
|
66 | |
67 |
|
68 |
|
69 | onChange?: (
|
70 | value: string | Array<any>,
|
71 | data: {} | Array<any>,
|
72 | extra: {}
|
73 | ) => void;
|
74 |
|
75 | |
76 |
|
77 |
|
78 | defaultExpandedValue?: Array<any>;
|
79 |
|
80 | |
81 |
|
82 |
|
83 | expandTriggerType?: "click" | "hover";
|
84 |
|
85 | |
86 |
|
87 |
|
88 | useVirtual?: boolean;
|
89 |
|
90 | |
91 |
|
92 |
|
93 | multiple?: boolean;
|
94 |
|
95 | |
96 |
|
97 |
|
98 | changeOnSelect?: boolean;
|
99 |
|
100 | |
101 |
|
102 |
|
103 | canOnlyCheckLeaf?: boolean;
|
104 |
|
105 | |
106 |
|
107 |
|
108 | checkStrictly?: boolean;
|
109 |
|
110 | |
111 |
|
112 |
|
113 | listStyle?: {};
|
114 |
|
115 | |
116 |
|
117 |
|
118 | listClassName?: string;
|
119 |
|
120 | |
121 |
|
122 |
|
123 | displayRender?: (label: Array<any>) => React.ReactNode;
|
124 |
|
125 | |
126 |
|
127 |
|
128 | itemRender?: (item: {}) => React.ReactNode;
|
129 |
|
130 | |
131 |
|
132 |
|
133 | showSearch?: boolean;
|
134 |
|
135 | |
136 |
|
137 |
|
138 | filter?: (searchValue: string, path: Array<any>) => boolean;
|
139 |
|
140 | |
141 |
|
142 |
|
143 | resultRender?: (searchValue: string, path: Array<any>) => React.ReactNode;
|
144 |
|
145 | |
146 |
|
147 |
|
148 | resultAutoWidth?: boolean;
|
149 |
|
150 | |
151 |
|
152 |
|
153 | notFoundContent?: React.ReactNode;
|
154 |
|
155 | |
156 |
|
157 |
|
158 | loadData?: (data: {}) => void;
|
159 |
|
160 | |
161 |
|
162 |
|
163 | header?: React.ReactNode;
|
164 |
|
165 | |
166 |
|
167 |
|
168 | footer?: React.ReactNode;
|
169 |
|
170 | |
171 |
|
172 |
|
173 | defaultVisible?: boolean;
|
174 |
|
175 | |
176 |
|
177 |
|
178 | visible?: boolean;
|
179 |
|
180 | |
181 |
|
182 |
|
183 | onVisibleChange?: (visible: boolean, type: string) => void;
|
184 |
|
185 | |
186 |
|
187 |
|
188 | popupStyle?: {};
|
189 |
|
190 | |
191 |
|
192 |
|
193 | popupClassName?: string;
|
194 |
|
195 | |
196 |
|
197 |
|
198 | popupContainer?: string | (() => void);
|
199 |
|
200 | /**
|
201 | * 透传到 Popup 的属性对象
|
202 | */
|
203 | popupProps?: {};
|
204 | }
|
205 |
|
206 | export default class CascaderSelect extends React.Component<
|
207 | CascaderSelectProps,
|
208 | any
|
209 | > {}
|
210 |
|
\ | No newline at end of file |