1- <script lang="ts" setup >
1+ <script setup lang="ts">
22import { isAllEmpty } from " @pureadmin/utils" ;
33import { useNav } from " @/layout/hooks/useNav" ;
44import { transformI18n } from " @/plugins/i18n" ;
55import LaySearch from " ../lay-search/index.vue" ;
66import LayNotice from " ../lay-notice/index.vue" ;
7- import { nextTick , onMounted , ref , toRaw , watch } from " vue" ;
7+ import { ref , toRaw , watch , onMounted , nextTick } from " vue" ;
88import { useRenderIcon } from " @/components/ReIcon/src/hooks" ;
9- import { findRouteByPath , getParentPaths } from " @/router/utils" ;
9+ import { getParentPaths , findRouteByPath } from " @/router/utils" ;
1010import { useTranslationLang } from " ../../hooks/useTranslationLang" ;
1111import { usePermissionStoreHook } from " @/store/modules/permission" ;
1212import LaySidebarExtraIcon from " ../lay-sidebar/components/SidebarExtraIcon.vue" ;
@@ -69,11 +69,11 @@ watch(
6969 >
7070 <el-menu
7171 ref =" menuRef"
72- :default-active =" defaultActive"
73- class =" horizontal-header-menu"
72+ router
7473 mode =" horizontal"
7574 popper-class =" pure-scrollbar"
76- router
75+ class =" horizontal-header-menu"
76+ :default-active =" defaultActive"
7777 >
7878 <el-menu-item
7979 v-for =" route in usePermissionStoreHook().wholeMenus"
@@ -103,14 +103,16 @@ watch(
103103 <LaySearch id =" header-search" />
104104 <!-- 国际化 -->
105105 <el-dropdown id =" header-translation" trigger =" click" >
106- <GlobalizationIcon
107- class =" navbar-bg-hover w-[40px] h-[48px] p-[11px] cursor-pointer outline-hidden"
108- />
106+ <div
107+ class =" globalization-icon navbar-bg-hover hover:[& >svg]:animate-scale-bounce"
108+ >
109+ <IconifyIconOffline :icon =" GlobalizationIcon" />
110+ </div >
109111 <template #dropdown >
110112 <el-dropdown-menu class =" translation" >
111113 <el-dropdown-item
112- :class =" ['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
113114 :style =" getDropdownItemStyle(locale, 'zh')"
115+ :class =" ['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
114116 @click =" translationCh"
115117 >
116118 <span v-show =" locale === 'zh'" class =" check-zh" >
@@ -119,8 +121,8 @@ watch(
119121 简体中文
120122 </el-dropdown-item >
121123 <el-dropdown-item
122- :class =" ['dark:text-white!', getDropdownItemClass(locale, 'en')]"
123124 :style =" getDropdownItemStyle(locale, 'en')"
125+ :class =" ['dark:text-white!', getDropdownItemClass(locale, 'en')]"
124126 @click =" translationEn"
125127 >
126128 <span v-show =" locale === 'en'" class =" check-en" >
@@ -142,14 +144,14 @@ watch(
142144 <p v-if =" username" class =" dark:text-white" >{{ username }}</p >
143145 </span >
144146 <template #dropdown >
147+ <el-dropdown-item @click =" toAccountSettings" >
148+ <IconifyIconOffline
149+ :icon =" AccountSettingsIcon"
150+ style =" margin : 5px "
151+ />
152+ {{ t("menus.accountSettings") }}
153+ </el-dropdown-item >
145154 <el-dropdown-menu class =" logout" >
146- <el-dropdown-item @click =" toAccountSettings" >
147- <IconifyIconOffline
148- :icon =" AccountSettingsIcon"
149- style =" margin : 5px "
150- />
151- {{ t("menus.accountSettings") }}
152- </el-dropdown-item >
153155 <el-dropdown-item @click =" logout" >
154156 <IconifyIconOffline
155157 :icon =" LogoutCircleRLine"
@@ -161,8 +163,8 @@ watch(
161163 </template >
162164 </el-dropdown >
163165 <span
166+ class =" set-icon navbar-bg-hover hover:[& >svg]:animate-scale-bounce"
164167 :title =" t('buttons.systemSet')"
165- class =" set-icon navbar-bg-hover"
166168 @click =" onPanel"
167169 >
168170 <IconifyIconOffline :icon =" Setting" />
0 commit comments