routes.js
``` import Todo from '../views/todo.vue' import Login from '../views/login.vue'
export default [ { path: '/', redirect: '/todo' }, { path: '/all', components: { default: Todo, one: Login }
}, { path: '/todo', component: Todo
}, { path: '/login', component: Login, name: 'login' } ] ```
App.vue
```
<!-- router-link 跳转 -->
<!-- 路径跳转 -->
<router-link to="/todo">跳转Todo</router-link><br />
<router-link to="/login">跳转Login</router-link><br />
<router-link to="/all">跳转All</router-link>
```