this.$router.push({})实现路由跳转

使用 this.$router.push(location) 来修改 url,完成跳转 push 后面能够是对象,也能够是字符串:html // 字符串 this.$router.push('/home/first') // 对象 this.$router.push({ path: '/home/first' }) // 命名的路由 this.$router.push({ name: 'home'
相关文章
相关标签/搜索