# Router 默认进出场
- order: 7
router 组合的进场与出场动画。
---
````jsx
const ReactRouter = require('react-router');
let { Router, Route, Link, hashHistory } = ReactRouter;
import { QueueAnim, Menu } from 'antd';
const App = React.createClass({
render() {
const key = this.props.location.pathname;
const keys = key.replace('/', '') ? [key.replace('/', '')] : ['home'];
return (
{React.cloneElement(this.props.children || , { key: key })}
);
}
});
const Home = React.createClass({
render() {
return (
);
}
});
const Page1 = React.createClass({
render() {
return (
);
}
});
const Page2 = React.createClass({
render() {
return (
);
}
});
ReactDOM.render((
), mountNode);
````
````css
#components-queue-anim-demo-router .demo-router-wrap {
position: relative;
width: 100%;
margin: auto;
height:200px;
overflow: hidden;
}
#components-queue-anim-demo-router .queue-anim-leaving {
position: absolute;
width:100%;
}
````