|
|
|
---
|
|
|
|
order: 6
|
|
|
|
title:
|
|
|
|
zh-CN: 大小
|
|
|
|
en-US: Size
|
|
|
|
---
|
|
|
|
|
|
|
|
## zh-CN
|
|
|
|
|
|
|
|
不同大小的级联选择器。
|
|
|
|
|
|
|
|
## en-US
|
|
|
|
|
|
|
|
Cascade selection box of different sizes.
|
|
|
|
|
|
|
|
````__react
|
|
|
|
import { Cascader } from 'antd';
|
|
|
|
|
|
|
|
const options = [{
|
|
|
|
value: 'zhejiang',
|
|
|
|
label: 'Zhejiang',
|
|
|
|
children: [{
|
|
|
|
value: 'hangzhou',
|
|
|
|
label: 'Hangzhou',
|
|
|
|
children: [{
|
|
|
|
value: 'xihu',
|
|
|
|
label: 'West Lake',
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
}, {
|
|
|
|
value: 'jiangsu',
|
|
|
|
label: 'Jiangsu',
|
|
|
|
children: [{
|
|
|
|
value: 'nanjing',
|
|
|
|
label: 'Nanjing',
|
|
|
|
children: [{
|
|
|
|
value: 'zhonghuamen',
|
|
|
|
label: 'Zhong Hua Men',
|
|
|
|
}],
|
|
|
|
}],
|
|
|
|
}];
|
|
|
|
|
|
|
|
function onChange(value) {
|
|
|
|
console.log(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<div>
|
|
|
|
<Cascader size="large" options={options} onChange={onChange} /><br /><br />
|
|
|
|
<Cascader options={options} onChange={onChange} /><br /><br />
|
|
|
|
<Cascader size="small" options={options} onChange={onChange} /><br /><br />
|
|
|
|
</div>
|
|
|
|
, mountNode);
|
|
|
|
````
|