【发布时间】:2021-04-25 18:52:58
【问题描述】:
我正在使用 Nuxt 动态路由导航到页面,我想要的只是通过单击按钮来调度操作并一起导航。
<v-btn
rounded
depressed
dark
color="green"
@click="fetchSocietyData()"
:to="'societies/' + sname"
nuxt
>Show Details</v-btn
>
<v-btn
v-if="$auth.loggedIn"
rounded
depressed
dark
color="blue"
:to="'societies/_ed/' + sname"
nuxt
>Edit Details</v-btn
>
</v-flex>
..
.
.
.
.
.
async fetchSocietyData() {
await this.$store.dispatch("societystore/fetchSpecificSocietyDetails", {
id: this.id,
});
// console.log(this.id);
},
它在不调度的情况下导航到页面,如果我删除路由 (:to),它会成功调度。 任何帮助将不胜感激:)。
【问题讨论】: