From 1da0bc255179f25b5227bec27833cf486cb6cb90 Mon Sep 17 00:00:00 2001
From: yinbangzhong <zhongbangyin@126.com>
Date: 星期二, 10 九月 2024 19:41:40 +0800
Subject: [PATCH] agent会话
---
src/components/navbar/index.vue | 33 ++++++++++++++++++++++++++-------
1 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/src/components/navbar/index.vue b/src/components/navbar/index.vue
index 1b07313..f817edc 100644
--- a/src/components/navbar/index.vue
+++ b/src/components/navbar/index.vue
@@ -2,7 +2,7 @@
<div class="navbar">
<div class="left-side">
<a-space>
- <img class="logo" alt="logo" src="@/assets/images/icon-logo.png" />
+ <img class="logo" alt="logo" src="@/assets/images/icon-logo1.png" />
<a-typography-title
:style="{ margin: 0, fontSize: '18px' }"
:heading="5"
@@ -143,14 +143,14 @@
</li>
<li>
<a-dropdown trigger="click">
- <a-avatar
+ <!-- <a-avatar
:size="32"
:style="{ marginRight: '8px', cursor: 'pointer' }"
>
<img alt="avatar" :src="avatar" />
- </a-avatar>
+ </a-avatar> -->
<template #content>
- <a-doption>
+ <!-- <a-doption>
<a-space @click="switchRoles">
<icon-tag />
<span>
@@ -173,7 +173,22 @@
{{ $t('messageBox.userSettings') }}
</span>
</a-space>
+ </a-doption> -->
+ <a-doption>
+ <a-space @click="handleLogout">
+ <icon-export />
+ <span>
+ {{ $t('messageBox.logout') }}
+ </span>
+ </a-space>
</a-doption>
+ </template>
+ </a-dropdown>
+ </li>
+ <li style="padding: 0">
+ <a-dropdown trigger="click">
+ <div> {{ name }}</div>
+ <template #content>
<a-doption>
<a-space @click="handleLogout">
<icon-export />
@@ -199,6 +214,8 @@
import useUser from '@/hooks/user';
import Menu from '@/components/menu/index.vue';
import MessageBox from '../message-box/index.vue';
+ import login from '@/assets/images/icon-logo1.png';
+ import { getUserInfo } from '@/utils/auth';
const appStore = useAppStore();
const userStore = useUserStore();
@@ -206,9 +223,11 @@
const { changeLocale, currentLocale } = useLocale();
const { isFullscreen, toggle: toggleFullScreen } = useFullscreen();
const locales = [...LOCALE_OPTIONS];
- const avatar = computed(() => {
- return userStore.avatar;
- });
+ const avatar = login;
+ const name = JSON.parse(getUserInfo()).name || '';
+ //const avatar = computed(() => {
+ // return userStore.avatar;
+ //});
const theme = computed(() => {
return appStore.theme;
});
--
Gitblit v1.8.0