update modal default props

This commit is contained in:
afc163 2015-08-25 16:56:08 +08:00
parent 47bb3d620d
commit e6d92e37b1
2 changed files with 6 additions and 4 deletions

View File

@ -12,7 +12,10 @@ export default React.createClass({
return {
prefixCls: 'ant-modal',
onOk: noop,
onCancel: noop
onCancel: noop,
width: 520,
transitionName: 'zoom',
maskAnimation: 'fade'
};
},
@ -82,8 +85,7 @@ export default React.createClass({
];
let footer = props.footer || defaultFooter;
let visible = this.state.visible;
return <Dialog transitionName="zoom" onClose={this.handleCancel}
maskAnimation="fade" width="520" footer={footer} {...props}
return <Dialog onClose={this.handleCancel} footer={footer} {...props}
visible={visible} mousePosition={mousePosition} />;
}
});

View File

@ -24,7 +24,7 @@
| mousePosition | 鼠标位置,设置弹窗初始位置 | {x:number,y:number} | 无 |
| onOk | 点击确定回调 | function | 无 |
| onCancel | 点击遮罩层或右上角叉或取消按钮的回调 | function | 无 |
| width | 宽度 | String or Number | 500 |
| width | 宽度 | String or Number | 520 |
| footer | 底部内容 | React.Element | 确定取消按钮 |