Vuetify (Vue + Laravel) 路由器推送后未设置导航栏活动 link
Vuetify (Vue + Laravel) Navigation bar active link is not set after a router push
我有一个很简单的问题,但我无法解决。我使用了 navigation drawer 和 v-list-item-group,导航功能正常。就在我使用 router-link 或 this.$router.push() 时,活动 link没有改变并停留在以前的站点。
例如。当当前站点是主页并且 link 从那里通向文档时,不要重新呈现 documentations 选项卡的 active-link 并停留在 家。如果我直接在导航栏中单击它,活动 links 设置得很好。
我尝试了以下操作:
methods:
this.$router.push({
name: "documentations",
params: { id: user_id}
});
methods:
this.$router.replace({
name: "documentations",
params: { id: user_id}
});
模板中的路由器 link,带有选项 exact 和 exact-path:
<router-link :to="{ name: 'documentations', params: { userId: item.id}}">
有人遇到过类似的问题吗?我是否监督了一些重要的事情?
with a v-list-item-group
v-list-item-group
不应该与导航一起使用,它用于制作如下所示的可选列表:
如果你只使用 v-list
+ v-list-item
应该可以。
我有一个很简单的问题,但我无法解决。我使用了 navigation drawer 和 v-list-item-group,导航功能正常。就在我使用 router-link 或 this.$router.push() 时,活动 link没有改变并停留在以前的站点。
例如。当当前站点是主页并且 link 从那里通向文档时,不要重新呈现 documentations 选项卡的 active-link 并停留在 家。如果我直接在导航栏中单击它,活动 links 设置得很好。
我尝试了以下操作:
methods:
this.$router.push({
name: "documentations",
params: { id: user_id}
});
methods:
this.$router.replace({
name: "documentations",
params: { id: user_id}
});
模板中的路由器 link,带有选项 exact 和 exact-path:
<router-link :to="{ name: 'documentations', params: { userId: item.id}}">
有人遇到过类似的问题吗?我是否监督了一些重要的事情?
with a v-list-item-group
v-list-item-group
不应该与导航一起使用,它用于制作如下所示的可选列表:
如果你只使用 v-list
+ v-list-item
应该可以。