vue 跳转的两种方法
1. 标签跳转
点我到第二个页面
2. 点击跳转
html :
<button @click=“hreftwo” class=“test-one”>点我到第二个页面
js :
methods:{
//跳转页面
hreftwo(){
this.$router.push({path:’/two’})
}
}
vue 跳转的两种方法
最新推荐文章于 2024-04-11 03:14:06 发布
vue 跳转的两种方法
1. 标签跳转
点我到第二个页面
2. 点击跳转
html :
<button @click=“hreftwo” class=“test-one”>点我到第二个页面
js :
methods:{
//跳转页面
hreftwo(){
this.$router.push({path:’/two’})
}
}