路由传值

版权声明:一个被隔壁肥宅嘲笑的... https://blog.csdn.net/weixin_38641550/article/details/81296325
<router-link :to="{ name:'chuanzhi', params: {num: 123} }">傳值頁面</router-link>


<h2>值{{this.$route.params.num}}</h2>




this.$router.push({path:'/mainDetail',query:{item:item}})


console.log(this.$route.query.item)

后面js方法的query貌似可以随便写 但是不知道会不会出问题

猜你喜欢

转载自blog.csdn.net/weixin_38641550/article/details/81296325
今日推荐