Skip to content

Commit

Permalink
🐛 fix #I5X77B 特定情况下前端头像异常加载
Browse files Browse the repository at this point in the history
  • Loading branch information
lbw committed Oct 24, 2022
1 parent 135277e commit 00cf07b
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions src/page/index/top/index.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<template>
<div class="avue-top">
<div class="top-bar__left">
<div class="avue-breadcrumb"
:class="[{ 'avue-breadcrumb--active': isCollapse }]"
v-if="setting.collapse&&!isHorizontal">
<i class="icon-navicon"
@click="setCollapse"></i>
<div class="avue-breadcrumb" :class="[{ 'avue-breadcrumb--active': isCollapse }]"
v-if="setting.collapse&&!isHorizontal">
<i class="icon-navicon" @click="setCollapse"></i>
</div>
</div>
<div class="top-bar__title">
Expand All @@ -14,21 +12,17 @@
</div>
</div>
<div class="top-bar__right">
<div v-if="setting.lock"
class="top-bar__item">
<div v-if="setting.lock" class="top-bar__item">
<top-lock></top-lock>
</div>
<div class="top-bar__item"
v-if="setting.fullscren">
<div class="top-bar__item" v-if="setting.fullscren">
<top-full></top-full>
</div>
<div class="top-bar__item"
v-if="setting.debug">
<div class="top-bar__item" v-if="setting.debug">
<top-logs></top-logs>
</div>
<div class="top-user">
<img class="top-bar__img"
:src="baseUrl + userInfo.avatar || '/img/head.png'">
<img class="top-bar__img" :src="userInfo.avatar ? baseUrl + userInfo.avatar : '/img/head.png'">
<el-dropdown>
<span class="el-dropdown-link">
{{ userInfo.username }}
Expand All @@ -41,8 +35,7 @@
<el-dropdown-item>
<router-link to="/info/index">{{ $t('navbar.userinfo') }}</router-link>
</el-dropdown-item>
<el-dropdown-item @click="logout"
divided>{{ $t('navbar.logOut') }}
<el-dropdown-item @click="logout" divided>{{ $t('navbar.logOut') }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
Expand All @@ -53,7 +46,7 @@
</div>
</template>
<script>
import {mapGetters} from "vuex";
import { mapGetters } from "vuex";
import topLock from "./top-lock.vue";
import topMenu from "./top-menu.vue";
import topLogs from "./top-logs.vue";
Expand Down Expand Up @@ -93,7 +86,7 @@ export default {
type: "warning"
}).then(() => {
this.$store.dispatch("LogOut").then(() => {
this.$router.push({path: "/login"});
this.$router.push({ path: "/login" });
});
});
}
Expand All @@ -102,4 +95,5 @@ export default {
</script>

<style lang="scss" scoped>
</style>

0 comments on commit 00cf07b

Please sign in to comment.