mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 06:03:38 +08:00
Merge branch 'master' of github.com:ant-design/ant-design
This commit is contained in:
commit
2bd05aeb2b
@ -18,24 +18,24 @@ import { Cascader } from 'antd';
|
|||||||
|
|
||||||
const options = [{
|
const options = [{
|
||||||
value: 'zhejiang',
|
value: 'zhejiang',
|
||||||
label: '浙江',
|
label: 'Zhejiang',
|
||||||
children: [{
|
children: [{
|
||||||
value: 'hangzhou',
|
value: 'hangzhou',
|
||||||
label: '杭州',
|
label: 'Hangzhou',
|
||||||
}],
|
}],
|
||||||
}, {
|
}, {
|
||||||
value: 'jiangsu',
|
value: 'jiangsu',
|
||||||
label: '江苏',
|
label: 'Jiangsu',
|
||||||
children: [{
|
children: [{
|
||||||
value: 'nanjing',
|
value: 'nanjing',
|
||||||
label: '南京',
|
label: 'Nanjing',
|
||||||
}],
|
}],
|
||||||
}];
|
}];
|
||||||
|
|
||||||
const CitySwitcher = React.createClass({
|
const CitySwitcher = React.createClass({
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
return {
|
return {
|
||||||
text: '未选择',
|
text: 'Unselect',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onChange(value, selectedOptions) {
|
onChange(value, selectedOptions) {
|
||||||
@ -49,7 +49,7 @@ const CitySwitcher = React.createClass({
|
|||||||
{this.state.text}
|
{this.state.text}
|
||||||
|
|
||||||
<Cascader options={options} onChange={this.onChange}>
|
<Cascader options={options} onChange={this.onChange}>
|
||||||
<a href="#">切换城市</a>
|
<a href="#">Change city</a>
|
||||||
</Cascader>
|
</Cascader>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
@ -21,7 +21,7 @@ ReactDOM.render(
|
|||||||
<Tabs defaultActiveKey="1">
|
<Tabs defaultActiveKey="1">
|
||||||
<TabPane tab="Tab 1" key="1">Tab 1</TabPane>
|
<TabPane tab="Tab 1" key="1">Tab 1</TabPane>
|
||||||
<TabPane tab="Tab 2" disabled key="2">Tab 2</TabPane>
|
<TabPane tab="Tab 2" disabled key="2">Tab 2</TabPane>
|
||||||
<TabPane tab="Tav 3" key="3">Tab 3</TabPane>
|
<TabPane tab="Tab 3" key="3">Tab 3</TabPane>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
, mountNode);
|
, mountNode);
|
||||||
````
|
````
|
||||||
|
Loading…
Reference in New Issue
Block a user