this.$router.push() 的用法


1、作用:this.$router.push() 可以通過修改url實現路由跳轉。

2、push 后面可以是對象,也可以是字符串:

// 字符串 this.$router.push('/home/first') // 對象 this.$router.push({ path: '/home/first' }) // 命名的路由 this.$router.push({ name: 'home', params: { userId: wise }}) 

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM