码农K

关注

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

码农K

关注

阅读 55

2022-02-08

0. router.go/push介绍:

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

1. 使用

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

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

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

this.$router.push('/')

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

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

相关推荐

读思意行

Vue--Router--this.$router.replace()、push()、go()的区别

读思意行 163 0 0

晚熟的猫

关于js中window.location.href,location.href,parent.location.href,top.location.href的用法

晚熟的猫 115 0 0

独西楼Q

location.href

独西楼Q 57 0 0

伢赞

js之window.location.href 、location.href、parent.location.href、top.location.href用法

伢赞 76 0 0

史值拥

window.location.href

史值拥 84 0 0

霍华德

location.href = '/index'用VUE如何跳转

霍华德 11 0 0

你的益达233

location.href解析

你的益达233 75 0 0

梅梅的时光

Vue路由导航 router-link 和 router.push

梅梅的时光 87 0 0

zhyuzh3d

location.href的用法

zhyuzh3d 74 0 0

在觉

vue router: NavigationDuplicated: Avoided redundant navigation to current location: "/template"

在觉 67 0 0

精彩评论(0)

0 0 举报