mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
docs: translated cascade custom trigger demo (#2991)
This commit is contained in:
parent
f10c7bbfda
commit
280698f793
@ -18,24 +18,24 @@ import { Cascader } from 'antd';
|
||||
|
||||
const options = [{
|
||||
value: 'zhejiang',
|
||||
label: '浙江',
|
||||
label: 'Zhejiang',
|
||||
children: [{
|
||||
value: 'hangzhou',
|
||||
label: '杭州',
|
||||
label: 'Hangzhou',
|
||||
}],
|
||||
}, {
|
||||
value: 'jiangsu',
|
||||
label: '江苏',
|
||||
label: 'Jiangsu',
|
||||
children: [{
|
||||
value: 'nanjing',
|
||||
label: '南京',
|
||||
label: 'Nanjing',
|
||||
}],
|
||||
}];
|
||||
|
||||
const CitySwitcher = React.createClass({
|
||||
getInitialState() {
|
||||
return {
|
||||
text: '未选择',
|
||||
text: 'Unselect',
|
||||
};
|
||||
},
|
||||
onChange(value, selectedOptions) {
|
||||
@ -49,7 +49,7 @@ const CitySwitcher = React.createClass({
|
||||
{this.state.text}
|
||||
|
||||
<Cascader options={options} onChange={this.onChange}>
|
||||
<a href="#">切换城市</a>
|
||||
<a href="#">Change city</a>
|
||||
</Cascader>
|
||||
</span>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user