vue项目之动态改变url参数

      let query = this.$router.history.current.query;
      let path = this.$router.history.current.path;
      //对象的拷贝
      let newQuery = JSON.parse(JSON.stringify(query));
      newQuery.pid = pid;
      this.$router.push({ path, query: newQuery });

 

你可能感兴趣的:(vue)