updata enter-leave show

This commit is contained in:
jljsj 2015-09-11 13:38:40 +08:00
parent 365fc535e0
commit d3f40e37c5

View File

@ -27,12 +27,12 @@ var Test = React.createClass({
console.log('leave');
}
},
bool:true,
show:true,
}
},
onClick() {
this.setState({
bool:!this.state.bool,
show:!this.state.show,
})
},
@ -43,7 +43,7 @@ var Test = React.createClass({
<button className="ant-btn ant-btn-primary" onClick={this.onClick}>切换</button>
</div>
<EnterAnimation enter={this.state.enter} leave={this.state.leave}>
{this.state.bool ? <div key='a'>
{this.state.show ? <div key='a'>
<div className="demo-header">
<div className="logo">
<img width="30" src="https://t.alipayobjects.com/images/rmsweb/T1B9hfXcdvXXXXXXXX.svg" />