@@ -3,57 +3,63 @@ import React from 'react';
33import '../assets/index.less' ;
44import Cascader from '../src' ;
55
6- const addressOptions = [
6+ const options = [
77 {
8- label : '福建' ,
9- value : 'fj' ,
8+ label : "Women Clothing" ,
9+ value : "Women Clothing" ,
1010 children : [
1111 {
12- label : '福州' ,
13- value : 'fuzhou' ,
12+ label : "Women Tops, Blouses & Tee" ,
13+ value : "Women Tops, Blouses & Tee" ,
1414 children : [
1515 {
16- label : '马尾' ,
17- value : 'mawei' ,
16+ label : "Women T-Shirts" ,
17+ value : "Women T-Shirts"
1818 } ,
19- ] ,
20- } ,
21- {
22- label : '泉州' ,
23- value : 'quanzhou' ,
19+ {
20+ label : "Women Tops" ,
21+ value : "Women Tops"
22+ } ,
23+ {
24+ label : "Women Tank Tops & Camis" ,
25+ value : "Women Tank Tops & Camis"
26+ } ,
27+ {
28+ label : "Women Blouses" ,
29+ value : "Women Blouses"
30+ }
31+ ]
2432 } ,
25- ] ,
26- } ,
27- {
28- label : '浙江' ,
29- value : 'zj' ,
30- children : [
3133 {
32- label : '杭州' ,
33- value : 'hangzhou' ,
34+ label : "Women Suits" ,
35+ value : "Women Suits" ,
3436 children : [
3537 {
36- label : '余杭' ,
37- value : 'yuhang' ,
38+ label : "Women Suit Pants" ,
39+ value : "Women Suit Pants"
3840 } ,
39- ] ,
40- } ,
41- ] ,
42- } ,
43- {
44- label : '北京' ,
45- value : 'bj' ,
46- children : [
47- {
48- label : '朝阳区' ,
49- value : 'chaoyang' ,
41+ {
42+ label : "Women Suit Sets" ,
43+ value : "Women Suit Sets"
44+ } ,
45+ {
46+ label : "Women Blazers" ,
47+ value : "Women Blazers"
48+ }
49+ ]
5050 } ,
5151 {
52- label : '海淀区' ,
53- value : 'haidian' ,
54- } ,
55- ] ,
56- } ,
52+ label : "Women Co-ords" ,
53+ value : "Women Co-ords" ,
54+ children : [
55+ {
56+ label : "Two-piece Outfits" ,
57+ value : "Two-piece Outfits"
58+ }
59+ ]
60+ }
61+ ]
62+ }
5763] ;
5864
5965class Demo extends React . Component {
@@ -71,14 +77,13 @@ class Demo extends React.Component {
7177 render ( ) {
7278 return (
7379 < Cascader
74- options = { addressOptions }
80+ showSearch
81+ options = { options }
7582 onChange = { this . onChange }
7683 changeOnSelect
7784 expandTrigger = "hover"
7885 loadData = { ( ) => console . log ( 'loadData' ) }
79- >
80- < input placeholder = "please select address" value = { this . state . inputValue } readOnly />
81- </ Cascader >
86+ />
8287 ) ;
8388 }
8489}
0 commit comments