标签:客户 方式 cli ash his 传参 new name params
目录
js const route = {path: ‘/user/:userId‘} this.$router.push({path:`/user/${userId}`}) this.$route.params.userId
js const route = {name:‘home‘,...} this.$router.push({name:‘Login‘,params:{id:‘leelei‘}}) this.$route.params.id
js this.$router.push({path:‘/login‘,query:{id:‘leelei‘}) this.$route.query.id
js const route = [{prop:true, ...}] const route = [{prop: {someProp:‘someValue‘}] const routes =[{props: (route) => ({ query: route.query.q }),...}]
js // 定义路由时,定义元信息 const routes = [ {meta: {someData:‘someData‘},... }, // 获取数据 this.$route.meta.someData
标签:客户 方式 cli ash his 传参 new name params
原文地址:https://www.cnblogs.com/webxu20180730/p/11031288.html