@@ -98,7 +98,7 @@ export default function Demo() {
98
98
99
99
``` jsx mdx:preview&bg=#fff
100
100
import React from ' react' ;
101
- import { Form , Input , Notify , Checkbox , Switch , RadioGroup , Radio , Textarea , Row , Col , Button } from ' uiw' ;
101
+ import { Form , Input , Notify , Checkbox , Switch , RadioGroup , Radio , Textarea , Row , Col , Button , Select , SearchSelect } from ' uiw' ;
102
102
103
103
export default function Demo () {
104
104
return (
@@ -142,6 +142,40 @@ export default function Demo() {
142
142
label: ' 年龄' ,
143
143
children: < Input type= " number" / >
144
144
},
145
+ select: {
146
+ children: (
147
+ < Select>
148
+ < Select .Option value= " w" > Choose an item... < / Select .Option >
149
+ < Select .Option value= " 1" > One< / Select .Option >
150
+ < Select .Option value= " 2" > Two< / Select .Option >
151
+ < Select .Option value= " 3" > Three< / Select .Option >
152
+ < Select .Option value= " 4" > Four< / Select .Option >
153
+ < / Select>
154
+ )
155
+ },
156
+ searchSelect: {
157
+ initialValue: [{label: ' a7' , value: 7 },{label: ' a8' , value: 8 }],
158
+ children: (
159
+ < SearchSelect
160
+ allowClear
161
+ labelInValue= {true }
162
+ showSearch= {true }
163
+ mode= " multiple"
164
+ disabled= {false }
165
+ placeholder= " 请选择选项"
166
+ option= {[
167
+ { label: ' a1' , value: 1 },
168
+ { label: ' a2' , value: 2 },
169
+ { label: ' a3' , value: 3 },
170
+ { label: ' a4' , value: 4 },
171
+ { label: ' a5' , value: 5 },
172
+ { label: ' a6' , value: 6 },
173
+ { label: ' a7' , value: 7 },
174
+ { label: ' a8' , value: 8 },
175
+ ]}
176
+ / >
177
+ )
178
+ },
145
179
checkbox: {
146
180
initialValue: [' 四川菜' ],
147
181
label: ' 选择你想吃的菜' ,
@@ -206,6 +240,10 @@ export default function Demo() {
206
240
< Col> {fields .userName }< / Col>
207
241
< Col> {fields .age }< / Col>
208
242
< / Row>
243
+ < Row gutter= {10 }>
244
+ < Col> {fields .select }< / Col>
245
+ < Col> {fields .searchSelect }< / Col>
246
+ < / Row>
209
247
< Row gutter= {10 }>
210
248
< Col> {fields .checkbox }< / Col>
211
249
< Col> {fields .checkboxOne }< / Col>
0 commit comments