diff --git a/Web/src/i18n/lang/en.ts b/Web/src/i18n/lang/en.ts index f5a6efff..f47459a5 100644 --- a/Web/src/i18n/lang/en.ts +++ b/Web/src/i18n/lang/en.ts @@ -93,7 +93,7 @@ export default { dropdownSmall: 'small', dropdown1: 'home page', dropdown2: 'Personal Center', - dropdown3: '404', + dropdown3: 'Clear cache', dropdown4: '401', dropdown5: 'Log out', dropdown6: 'Code warehouse', diff --git a/Web/src/i18n/lang/zh-cn.ts b/Web/src/i18n/lang/zh-cn.ts index a45f94c7..13b6ea27 100644 --- a/Web/src/i18n/lang/zh-cn.ts +++ b/Web/src/i18n/lang/zh-cn.ts @@ -93,7 +93,7 @@ export default { dropdownSmall: '小型', dropdown1: '首页', dropdown2: '个人中心', - dropdown3: '404', + dropdown3: '清理缓存', dropdown4: '401', dropdown5: '退出登录', dropdown6: '代码仓库', diff --git a/Web/src/i18n/lang/zh-tw.ts b/Web/src/i18n/lang/zh-tw.ts index 6dc44af3..f7120d8d 100644 --- a/Web/src/i18n/lang/zh-tw.ts +++ b/Web/src/i18n/lang/zh-tw.ts @@ -93,7 +93,7 @@ export default { dropdownSmall: '小型', dropdown1: '首頁', dropdown2: '個人中心', - dropdown3: '404', + dropdown3: '清理緩存', dropdown4: '401', dropdown5: '登出', dropdown6: '程式碼倉庫', diff --git a/Web/src/layout/navBars/topBar/user.vue b/Web/src/layout/navBars/topBar/user.vue index 78529edf..c3db5f34 100644 --- a/Web/src/layout/navBars/topBar/user.vue +++ b/Web/src/layout/navBars/topBar/user.vue @@ -74,6 +74,7 @@ {{ $t('message.user.dropdown2') }} + {{ $t('message.user.dropdown3') }} {{ $t('message.user.dropdown5') }} @@ -94,10 +95,10 @@ import { useUserInfo } from '/@/stores/userInfo'; import { useThemeConfig } from '/@/stores/themeConfig'; import other from '/@/utils/other'; import mittBus from '/@/utils/mitt'; -import { Local } from '/@/utils/storage'; +import { Local, Session } from '/@/utils/storage'; import Push from 'push.js'; import { signalR } from '/@/views/system/onlineUser/signalR'; -import { Avatar, Guide } from '@element-plus/icons-vue'; +import { Avatar, Guide, Loading } from '@element-plus/icons-vue'; import { clearAccessTokens, getAPI } from '/@/utils/axios-utils'; import { SysAuthApi, SysNoticeApi } from '/@/api-services/api'; @@ -153,7 +154,11 @@ const onLayoutSetingClick = () => { }; // 下拉菜单点击时 const onHandleCommandClick = (path: string) => { - if (path === 'logOut') { + if (path === 'clearCache') { + Local.clear(); + Session.clear(); + window.location.reload(); + } else if (path === 'logOut') { ElMessageBox({ closeOnClickModal: false, closeOnPressEscape: false,