# Router动画进出场 - order: 2 router组合的进场与出场动画。 --- ````jsx var ReactRouter = require('react-router'); var history = require('react-router/lib/HashHistory').history; var Router = ReactRouter.Router; var Route = ReactRouter.Route; var Link = ReactRouter.Link; var EnterAnimation = antd.EnterAnimation; var App = React.createClass({ getInitialState: function () { return { enter: { type: 'bottom', interval: 0.1, delay: 0, callback: function (e) { console.log('我进场了', e.ReactElement.key) }, ease: null }, leave: null }; }, clickPage1() { this.setState({ enter: {interval: 0.03,type: 'right',ease: 'cubic-bezier(0.075, 0.82, 0.165, 1)',delay:0.3, callback: function (e) { console.log('你点了page1', 'key:'+e.ReactElement.key, e.direction); } }, leave: {type: 'left',upend: true,interval:0.05,duration:0.2,ease: 'cubic-bezier(0.55, 0.085, 0.68, 0.53)',delay:0} }) }, clickPage2() { this.setState({ enter: {interval: 0.03,type: 'bottom',ease: null,delay:.3,callback: function (e) {console.log('你点了page2', 'key:'+e.ReactElement.key, e.direction);}}, leave: {delay:0,type:'top'} }) }, render() { var key = this.props.location.pathname; return (
A link to page 2 should be active依次进场
A link to page 2 should be active依次进场
A link to page 2 should be active依次进场
A link to page 2 should be active依次进场
A link to page 2 should be active改变样式
a link to page 1 我是页面2.
a link to page 1 我是页面2.
a link to page 1 我是页面2.
a link to page 1 我是页面2.