remove unused state visible

This commit is contained in:
afc163 2015-08-17 16:44:38 +08:00
parent 539ac64998
commit 9d5e0a2e58
2 changed files with 2 additions and 4 deletions

View File

@ -31,8 +31,7 @@ var Test = React.createClass({
<button className="ant-btn ant-btn-primary" onClick={this.showModal}>显示对话框</button>
<Modal title="第一个 Modal"
visible={this.state.visible}
onOk={this.handleOk}
onCancel={this.handleCancel}>
onOk={this.handleOk}>
<p>对话框的内容</p>
<p>对话框的内容</p>
<p>对话框的内容</p>

View File

@ -6,7 +6,6 @@ function noop() {
export default React.createClass({
getInitialState() {
return {
visible: false,
confirmLoading: false
};
},
@ -53,6 +52,6 @@ export default React.createClass({
{loadingIcon}
</button>
];
return <Dialog transitionName="zoom" onBeforeClose={props.onCancel} visible={this.state.visible} maskAnimation="fade" width="500" footer={footer} {...props} ref="d" />;
return <Dialog transitionName="zoom" onBeforeClose={props.onCancel} maskAnimation="fade" width="500" footer={footer} {...props} ref="d" />;
}
});