Browse Source

Merge branch '0.8.0' of https://github.com/ant-design/ant-design into 0.8.0

pull/141/head
ioldfish 9 years ago
parent
commit
cb2a711ee2
  1. 5
      components/menu/demo/horizontal.md
  2. 4
      components/radio/demo/radiogroup.md
  3. 1
      components/radio/index.md
  4. 16
      style/components/menu.less

5
components/menu/demo/horizontal.md

@ -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>
}
});

4
components/radio/demo/radiogroup.md

@ -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'));

1
components/radio/index.md

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

16
style/components/menu.less

@ -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 {

Loading…
Cancel
Save