URL: /AAA/id

传参:this.$router.push("/AAA/" + id);

路由:path: '/AAA/:id',

获取:this.id = this.$route.params.id;
URL: /BBB?id=id

传参:this.$router.push({ path: "/BBB", query: { id: id } });

路由:path: '/BBB',

获取:this.id = this.$route.query.id;

用户bPbvnCc
5 声望0 粉丝