vue路由跳转传递参数

query

this.$router.push({
	path: "store_Class_Detail", 
	query: { 
		searchVal: this.searchVal ,
	},
});
//接收页面mounted中:
var proID = this.$route.query.searchVal: ;

params

this.$router.push({
      name:'store_Class_Detail',
      params: {
                id: item.id,
		type: item.type,
      }  
})
//接收页面mounted中:
var proID = this.$route.params.searchVal: ;
发布了76 篇原创文章 · 获赞 144 · 访问量 3038

猜你喜欢

转载自blog.csdn.net/qq_40745143/article/details/103874766