<el-button type="info" size="mini" @click="logout">退出</el-button>
methods: {
async logout() {
await this.$store.dispatch('user/logout')
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
},
}
<el-button type="info" size="mini" @click="logout">退出</el-button>
methods: {
async logout() {
await this.$store.dispatch('user/logout')
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
},
}