📌  相关文章
📜  按钮点击重定向到另一个页面 vue - Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:15.946000             🧑  作者: Mango

代码示例1


//inside the script section, define the function:
 methods:{
   goToHome(){
   this.$router.push('/home'); 
      }
  }

//if the route accepts params, you can also use
this.$router.push({name:'home', params: {id: '[paramdata]'}});