router.push query 路由 跳轉 傳參使用


this.$router.push({path:'/shop',query:{
            goods_name:goods_name,
            goods_price:goods_price,
              uid:goods_price
            }})

 獲取路由值

return{
            uid:sessionStorage.getItem('uid'), //獲取session 值可忽略
            goods_name:this.$route.query.goods_name, //獲取路由值
            goods_price:this.$route.query.goods_price,
          }

 router link 跳轉 

<router-link to="apple"> to apple</router-link>

  

 

#  params 傳參數 不在路由顯示

this.$router.push({name:'添加工單',params:{
            id:item.id,
            name:item.name,
            desc:item.customfield
          
        }})

  

 goods_price:this.$route.params.id,

  

 


免責聲明!

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



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