😎增加清除缓存功能
This commit is contained in:
parent
e4c217a043
commit
7b7885f52a
@ -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',
|
||||
|
||||
@ -93,7 +93,7 @@ export default {
|
||||
dropdownSmall: '小型',
|
||||
dropdown1: '首页',
|
||||
dropdown2: '个人中心',
|
||||
dropdown3: '404',
|
||||
dropdown3: '清理缓存',
|
||||
dropdown4: '401',
|
||||
dropdown5: '退出登录',
|
||||
dropdown6: '代码仓库',
|
||||
|
||||
@ -93,7 +93,7 @@ export default {
|
||||
dropdownSmall: '小型',
|
||||
dropdown1: '首頁',
|
||||
dropdown2: '個人中心',
|
||||
dropdown3: '404',
|
||||
dropdown3: '清理緩存',
|
||||
dropdown4: '401',
|
||||
dropdown5: '登出',
|
||||
dropdown6: '程式碼倉庫',
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
<el-dropdown-menu>
|
||||
<!-- <el-dropdown-item command="/dashboard/home">{{ $t('message.user.dropdown1') }}</el-dropdown-item> -->
|
||||
<el-dropdown-item :icon="Avatar" command="/system/userCenter">{{ $t('message.user.dropdown2') }}</el-dropdown-item>
|
||||
<el-dropdown-item :icon="Loading" command="clearCache">{{ $t('message.user.dropdown3') }}</el-dropdown-item>
|
||||
<el-dropdown-item :icon="Guide" divided command="logOut">{{ $t('message.user.dropdown5') }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</template>
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user