Newer
Older
<div class="h-6" />
<el-menu
:default-active="activeIndex2"
class="el-menu-demo"
mode="horizontal"
background-color="#545c64"
text-color="#fff"
active-text-color="#ffd04b"
@select="handleSelect"
>
<el-menu-item index="1" v-on:click="redirect('/login-main-page')">Main</el-menu-item>
<el-menu-item index="2" v-on:click="redirect('/offer-page')">Offer Page</el-menu-item>
<el-menu-item index="3" v-on:click="redirect('/wishlist-page')">Wish List</el-menu-item>
<el-menu-item index="4" v-on:click="redirect('/flight')">Flight Ticket</el-menu-item>
<el-menu-item index="5" v-on:click="redirect('/profile')">Profile</el-menu-item>
<el-menu-item index="6" class="dock-right" @click="hanldeLogOut()">Log Out</el-menu-item>
<script lang="ts">
import { defineComponent } from "vue";
import { mapActions, mapGetters } from "vuex";
return {
hasToken: document.cookie.length > 0
};
this.$router.push(url);
},
...mapActions("auth", {
logOut: "logOutApi",
}),
hanldeLogOut() {
this.logOut()
document.cookie = 'userId=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
document.cookie = 'token=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
</script>
<style scoped>
.el-menu-demo > .el-menu-item.dock-right {