mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
Merge branch 'master' into develop-1.0.0
This commit is contained in:
commit
c47fdeaf8f
@ -20,7 +20,7 @@
|
||||
|-------------|------------------|--------------------|--------------|
|
||||
| trigger | 触发下拉的行为 | ['click'] or ['hover'] | ['hover'] |
|
||||
| overlay | 菜单节点 | [Menu](/components/menu) | 无 |
|
||||
|
||||
| getPopupContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。[示例](http://codepen.io/anon/pen/ONjyba?editors=001) | Function(triggerNode) | () => document.body |
|
||||
|
||||
菜单可由 `antd.Menu` 取得,可设置 `onSelect` 回调,菜单还包括菜单项 `antd.Menu.Item`,分割线 `antd.Menu.Divider`。
|
||||
|
||||
|
@ -29,15 +29,15 @@ export default class Form extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { prefixCls, className } = this.props;
|
||||
const { prefixCls, className, style } = this.props;
|
||||
const formClassName = classNames({
|
||||
[className]: !!className,
|
||||
[`${prefixCls}-horizontal`]: this.props.horizontal,
|
||||
[`${prefixCls}-inline`]: this.props.inline,
|
||||
[className]: !!className,
|
||||
});
|
||||
|
||||
return (
|
||||
<form {...this.props} className={formClassName}>
|
||||
<form {...this.props} className={formClassName} style={style}>
|
||||
{this.props.children}
|
||||
</form>
|
||||
);
|
||||
|
@ -187,6 +187,7 @@ export default class FormItem extends React.Component {
|
||||
renderFormItem(children) {
|
||||
const props = this.props;
|
||||
const prefixCls = props.prefixCls;
|
||||
const style = props.style;
|
||||
const itemClassName = {
|
||||
[`${prefixCls}-item`]: true,
|
||||
[`${prefixCls}-item-with-help`]: !!this.getHelpMsg(),
|
||||
@ -194,7 +195,7 @@ export default class FormItem extends React.Component {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={classNames(itemClassName)}>
|
||||
<div className={classNames(itemClassName)} style={style}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
@ -11,8 +11,8 @@ export default class InputNumber extends React.Component {
|
||||
render() {
|
||||
const { className, size, ...other } = this.props;
|
||||
const inputNumberClass = classNames({
|
||||
'ant-input-number-lg': size === 'large',
|
||||
'ant-input-number-sm': size === 'small',
|
||||
[`${this.props.prefixCls}-lg`]: size === 'large',
|
||||
[`${this.props.prefixCls}-sm`]: size === 'small',
|
||||
[className]: !!className,
|
||||
});
|
||||
|
||||
|
@ -26,3 +26,4 @@
|
||||
| prefixCls | 浮层的类名 | string | ant-popover |
|
||||
| visible | 用于手动控制浮层显隐 | boolean | false |
|
||||
| onVisibleChange | 显示隐藏改变的回调 | function | 无 |
|
||||
| getTooltipContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。[示例](http://codepen.io/anon/pen/ONjyba?editors=001) | Function(triggerNode) | () => document.body |
|
||||
|
@ -7,7 +7,8 @@
|
||||
---
|
||||
|
||||
````jsx
|
||||
import { QueueAnim, Button, Checkbox, Radio } from 'antd';
|
||||
import { QueueAnim, Button, Radio, Input, Form, Row, Col } from 'antd';
|
||||
const FormItem = Form.Item;
|
||||
const RadioGroup = Radio.Group;
|
||||
|
||||
const Test = React.createClass({
|
||||
@ -22,54 +23,37 @@ const Test = React.createClass({
|
||||
});
|
||||
},
|
||||
render() {
|
||||
const formItemLayout = {
|
||||
labelCol: { span: 6 },
|
||||
wrapperCol: { span: 14 },
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<p className="buttons">
|
||||
<Button type="primary" onClick={this.onClick}>切换</Button>
|
||||
</p>
|
||||
<QueueAnim component="form" className="ant-form-horizontal" type="bottom" leaveReverse>
|
||||
<QueueAnim component={Form} className="ant-form ant-form-horizontal" type="bottom" leaveReverse>
|
||||
{this.state.show ? [
|
||||
<div className="ant-form-item ant-form-item-compact" key="name">
|
||||
<label htmlFor="userName" className="col-6" required>用户名:</label>
|
||||
<div className="col-6">
|
||||
<p className="ant-form-text">大眼萌 minion</p>
|
||||
</div>
|
||||
</div>,
|
||||
<div className="ant-form-item" key="password">
|
||||
<label htmlFor="password" className="col-6" required>密码:</label>
|
||||
<div className="col-14">
|
||||
<input className="ant-input" type="password" id="password" placeholder="请输入密码" />
|
||||
</div>
|
||||
</div>,
|
||||
<div className="ant-form-item ant-form-item-compact" key="sex">
|
||||
<label className="col-6" required>您的性别:</label>
|
||||
<div className="col-14">
|
||||
<RadioGroup value="male">
|
||||
<Radio value="male">男的</Radio>
|
||||
<Radio value="female">女的</Radio>
|
||||
</RadioGroup>
|
||||
</div>
|
||||
</div>,
|
||||
<div className="ant-form-item" key="remark">
|
||||
<label htmlFor="remark" className="col-6" required>备注:</label>
|
||||
<div className="col-14">
|
||||
<textarea className="ant-input" id="remark" placeholder="随便写"></textarea>
|
||||
<p className="ant-form-explain">随便写点什么</p>
|
||||
</div>
|
||||
</div>,
|
||||
<div className="ant-form-item ant-form-item-compact" key="checkbox">
|
||||
<div className="col-14 col-offset-6">
|
||||
<label>
|
||||
<Checkbox />
|
||||
同意
|
||||
</label>
|
||||
</div>
|
||||
</div>,
|
||||
<div className="row" key="btn">
|
||||
<div className="col-16 col-offset-6">
|
||||
<Button type="primary">确定</Button>
|
||||
</div>
|
||||
</div>
|
||||
<FormItem key="item1" {...formItemLayout} label="用户名:">
|
||||
<p className="ant-form-text">大眼萌 minion</p>
|
||||
</FormItem>,
|
||||
<FormItem key="item2" {...formItemLayout} label="密码:">
|
||||
<Input type="password" placeholder="请输入密码" />
|
||||
</FormItem>,
|
||||
<FormItem key="item3" {...formItemLayout} label="您的性别:">
|
||||
<RadioGroup>
|
||||
<Radio value="male">男的</Radio>
|
||||
<Radio value="female">女的</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>,
|
||||
<FormItem key="item4" {...formItemLayout} label="备注:">
|
||||
<Input type="textarea" placeholder="随便写" />
|
||||
</FormItem>,
|
||||
<Row key="submit">
|
||||
<Col span="16" offset="6">
|
||||
<Button type="primary" htmlType="submit">确定</Button>
|
||||
</Col>
|
||||
</Row>,
|
||||
] : null}
|
||||
</QueueAnim>
|
||||
</div>
|
||||
|
@ -10,7 +10,7 @@
|
||||
import { QueueAnim } from 'antd';
|
||||
|
||||
ReactDOM.render(
|
||||
<QueueAnim delay={500}>
|
||||
<QueueAnim delay={500} style={{ height: 150 }}>
|
||||
<div key="a">依次进场</div>
|
||||
<div key="b">依次进场</div>
|
||||
<div key="c">依次进场</div>
|
||||
|
@ -43,6 +43,7 @@
|
||||
| size | 选择框大小,可选 `large` `small` | String | default |
|
||||
| showSearch | 在下拉中显示搜索框 | boolean | false |
|
||||
| disabled | 是否禁用 | boolean | false |
|
||||
| getPopupContainer | 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。[示例](http://codepen.io/anon/pen/ONjyba?editors=001) | Function(triggerNode) | () => document.body |
|
||||
|
||||
### Option props
|
||||
|
||||
|
@ -84,9 +84,6 @@
|
||||
.user-select(none);
|
||||
.transition(all .3s @ease-in-out);
|
||||
transform: translate3d(0, 0, 0);
|
||||
// Fix for ie8 border-radius
|
||||
// http://css3pie.com/documentation/known-issues/#z-index
|
||||
position: relative\0;
|
||||
|
||||
> .@{iconfont-css-prefix} {
|
||||
line-height: 1;
|
||||
|
Loading…
Reference in New Issue
Block a user