|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <div
|
|
|
+ <v-toolbar
|
|
|
class="banner"
|
|
|
density="compact"
|
|
|
style="padding-left: 0px;height: 50px;font-size: 14px;"
|
|
@@ -29,7 +29,29 @@
|
|
|
<a href="">我要找工作</a>
|
|
|
<a href="">我要招聘</a>
|
|
|
</span>
|
|
|
- <v-btn class="half-button" color="primary" size="small" @click="handleLogin">登录/注册</v-btn>
|
|
|
+ <v-btn class="half-button" border color="primary" size="small" @click="handleLogin">登录/注册</v-btn>
|
|
|
+ <v-menu>
|
|
|
+ <template v-slot:activator="{ props }">
|
|
|
+ <v-btn
|
|
|
+ class="ml-3"
|
|
|
+ icon="mdi-translate"
|
|
|
+ size="small"
|
|
|
+ v-bind="props"
|
|
|
+ >
|
|
|
+ </v-btn>
|
|
|
+ </template>
|
|
|
+ <v-list density="compact">
|
|
|
+ <v-list-item
|
|
|
+ v-for="item in localeStore.localeMap"
|
|
|
+ :key="item.name"
|
|
|
+ :value="item.lang"
|
|
|
+ :active="localeStore.currentLocale.lang === item.lang"
|
|
|
+ @click="localeStore.setCurrentLocale(item)"
|
|
|
+ >
|
|
|
+ <v-list-item-title>{{ item.name }}</v-list-item-title>
|
|
|
+ </v-list-item>
|
|
|
+ </v-list>
|
|
|
+ </v-menu>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-else class="d-flex user-nav">
|
|
@@ -52,7 +74,7 @@
|
|
|
</v-menu>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </v-toolbar>
|
|
|
<Dialog :visible="show" :footer="true" title="企业注册" widthType="1" @close="show = false">
|
|
|
<enterpriseRegister ref="enterpriseRegisterRef"></enterpriseRegister>
|
|
|
</Dialog>
|
|
@@ -62,16 +84,21 @@
|
|
|
<script setup>
|
|
|
import { ref } from 'vue'
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
-import { userLocaleStore } from '@/store/user'
|
|
|
+import { useUserStore } from '@/store/user'
|
|
|
+import { useLocaleStore } from '@/store/locale'
|
|
|
defineOptions({ name: 'personal-navbar' })
|
|
|
import Dialog from '@/components/CtDialog'
|
|
|
import enterpriseRegister from '@/views/enterprise/components/register.vue'
|
|
|
+
|
|
|
defineProps({
|
|
|
sticky: {
|
|
|
type: Boolean,
|
|
|
default: true
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+const localeStore = useLocaleStore()
|
|
|
+
|
|
|
const list = ref([
|
|
|
{ text: '首页', path: '/home' },
|
|
|
{ text: '职位', path: '' },
|
|
@@ -92,7 +119,7 @@ const changeRole = () => {
|
|
|
}
|
|
|
|
|
|
// 退出登录
|
|
|
-const userStore = userLocaleStore()
|
|
|
+const userStore = useUserStore()
|
|
|
const handleLogout = async () => {
|
|
|
// try {
|
|
|
await userStore.userLogout()
|