vue 如何实现在函数中触发路由跳转

this.$router.push({path:'/index'})

欢迎加入前端交流群交流知识&&获取视频资料:749539640

1 methods:{
2 click(){
3 if(data==14 this.$router.push({path:"/home"})
5 
6 }
7 
8 
9 }

 

原文地址:https://www.cnblogs.com/wangzhichao/p/7756350.html