mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 07:56:28 +08:00
updata enter-leave show
This commit is contained in:
parent
365fc535e0
commit
d3f40e37c5
@ -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" />
|
||||
|
Loading…
Reference in New Issue
Block a user