组件router-link可通过to属性指定所要跳转的路由地址。
<router-link to="/">home</router-link>
Router编程式导航
在js代码中也可以通过router.push方法实现路由跳转
//指定路由字符串
this.$router.push("/index")
//指定path
this.$router.push({path:"/index"})
//指定路由名称
this.$router.push({ name: 'Index'})