命名路由:this
{ path: '/about', name: 'about', component: About }
做用:spa
一、路由跳轉code
this.$router.push({ name: 'about' })
二、路由重定向component
{ path: '/a', redirect: { // path: '/about' name: 'about' } }