我正在使用以下代码更改我的 URL:
this.$router.push({
path: this.$route.path + this.initialCategoryPath,
});
console.log(this.$route.path);
我的网址更改为:www.domain.com/attribute/{{ this.initialCategoryPath content }}
然而,当我记录我的路线时,我仍然只得到 /attribute 部分。
记录当前路线的代码:
console.log(this.$route.path)
任何人都可以帮助我解决为什么 URL 在路由状态下没有更新,但它在 URL 中更新的问题?