This commit is contained in:
ioldfish 2015-08-17 17:35:27 +08:00
commit cb2a711ee2
4 changed files with 22 additions and 4 deletions

View File

@ -30,12 +30,15 @@ var App = React.createClass({
<Menu.Item key="app">
<i className="anticon anticon-large"></i>导航二
</Menu.Item>
<SubMenu title={<span><i className="anticon anticon-setting"></i>导航三(子菜单)</span>}>
<SubMenu title={<span><i className="anticon anticon-setting"></i>导航 - 子菜单</span>}>
<Menu.Item key="setting:1">选项1</Menu.Item>
<Menu.Item key="setting:2">选项2</Menu.Item>
<Menu.Item key="setting:3">选项3</Menu.Item>
<Menu.Item key="setting:4">选项4</Menu.Item>
</SubMenu>
<Menu.Item key="alipay">
<a href="http://www.alipay.com/" target="_blank">导航四 - 链接</a>
</Menu.Item>
</Menu>
}
});

View File

@ -23,7 +23,7 @@ var App = React.createClass({
});
},
render() {
return<div>
return <div>
<RadioGroup onChange={this.onChange} value={this.state.value}>
<Radio value="a">A</Radio>
<Radio value="b">B</Radio>
@ -31,7 +31,7 @@ var App = React.createClass({
<Radio value="d">D</Radio>
</RadioGroup>
<div style={{marginTop: 20}}>你选中的: {this.state.value}</div>
</div>
</div>;
}
});
React.render(<App />, document.getElementById('components-radio-demo-radiogroup'));

View File

@ -32,3 +32,4 @@
|----------------|----------------------------------|-------------------|--------|--------|
| onChange | 选项变化时的回调函数 | Function(e:Event) | 无 | 无 |
| value | 用于设置当前选中的值 | String | 无 | 无 |
| defaultValue | 默认选中的值 | String | 无 | 无 |

View File

@ -156,9 +156,23 @@
& > .@{menuPrefixCls}-item,
& > .@{menuPrefixCls}-submenu > .@{menuPrefixCls}-submenu-title {
padding: 15px 20px;
padding: 0 20px;
line-height: 50px;
position: relative;
top: 1px;
> a {
display: block;
&:before, &:after {
position: absolute;
background-color: rgba(255,255,255,0.001);
width: 20px;
height: 50px;
content: '';
}
&:before {
left: 0;
}
}
}
& > .@{menuPrefixCls}-submenu, & > .@{menuPrefixCls}-item {