# 配置进出场的样式 - order: 2 配置进出场动画样式。 --- ````jsx var EnterAnimation = antd.EnterAnimation; var Test = React.createClass({ getInitialState() { return { enter:{ type: 'right', interval: 0.3, callback:() => { console.log('enter'); } }, leave:{ type: 'left', interval: .1, callback:() => { console.log('leave'); } }, show:true, } }, onClick() { this.setState({ show:!this.state.show, }) }, render() { return (
{this.state.show ?
: null}
); } }); React.render( , document.getElementById('components-enter-animation-demo-enter-leave')); ````