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 }

 

 

posted @ 2017-10-30 20:14  王志超II  阅读(4024)  评论(0编辑  收藏  举报