mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-23 06:58:33 +08:00
55 lines
925 B
Markdown
55 lines
925 B
Markdown
---
|
|
order: 6
|
|
title:
|
|
zh-CN: 大小
|
|
en-US: Size
|
|
---
|
|
|
|
## zh-CN
|
|
|
|
不同大小的级联选择器。
|
|
|
|
## en-US
|
|
|
|
Cascade selection box of different sizes.
|
|
|
|
````jsx
|
|
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);
|
|
````
|