|
|
|
|
@ -34,7 +34,7 @@
|
|
|
|
|
个人信息
|
|
|
|
|
</el-dropdown-item>
|
|
|
|
|
</router-link>
|
|
|
|
|
<el-dropdown-item divided @click.native="logout">
|
|
|
|
|
<el-dropdown-item v-if="!$store.state.app.isInElectron" class="user-logout" divided @click.native="logout">
|
|
|
|
|
<span style="display: block">退出</span>
|
|
|
|
|
</el-dropdown-item>
|
|
|
|
|
</el-dropdown-menu>
|
|
|
|
|
@ -147,6 +147,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async logout() {
|
|
|
|
|
if (this.$store.state.app.isInElectron) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
await this.$store.dispatch('app/clearLayout')
|
|
|
|
|
await this.$store.dispatch("user/logout");
|
|
|
|
|
this.$router.push(`/login`);
|
|
|
|
|
|