
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<template>
<header>
<div class="selected-menu-info" v-if="selectedLabel && selectedIcon">
<span><img :src="selectedIcon" :alt="selectedLabel + ' 아이콘'" style="width:20px; height:20px;" /></span>
<span style="font-weight: bold;">{{ selectedLabel }}</span>
</div>
<div class="user-info gap10">
<div class="user-name"><img src="../../resources/img/content/ico_user.svg" alt=""
style="vertical-align: middle;"> 관리자</div>
<button class="user-logout" @click="fnlogOut()"><img src="../../resources/img/component/common/ico_logout_w_16.svg" alt=""
style="color: #ffffff;" > 로그아웃</button>
</div>
</header>
</template>
<script>
import { mapActions, mapGetters } from "vuex";
export default {
props: {
selectedLabel: String,
selectedIcon: [String, Object]
},
data() {
return {
};
},
methods: {
...mapActions(["logout"]),
async fnlogOut() {
await this.logout(); // Vuex의 logout 액션 실행
this.$router.push({ path: "/login.page" }); // 로그인 페이지로 이동
},
},
watch: {},
computed: {},
components: {},
created() { },
mounted() {
},
beforeUnmount() { },
};
</script>