0
点赞
收藏
分享

微信扫一扫

vue----router.go/push&location.href

码农K 2022-02-08 阅读 55

0. router.go/push介绍:

一句话,用来进行路径跳转的

1. 使用

router.go // 回到上一页首页

this.$router.go(-1) // 回到上一页首页

router.push // 普通的界面跳转(一般用于项目内的路径跳转)

this.$router.push('/')

location.href // 普通的路径跳转(一般用于项目外的路径跳转)

location.href = 'https://element.eleme.cn/'
举报

相关推荐

0 条评论