传参后另一个页面删除地址所带参数

this.$router.push({ query: {} }); // 删除传递的参数
 
A页面:
opendetail(row) {
      this.$router.push({
        path: '/xxxx',
        query: {
          id: row.id
        }
      });
    },
 
B页面:
    if (this.$route.query.id) {
   this.id = this.$route.query.id;
  this.$router.push({ query: {} }); // 删除传递的参数
}
posted @ 2025-01-16 14:09  Ao_min  阅读(17)  评论(0)    收藏  举报