mirror of https://github.com/1Panel-dev/1Panel
fix: 解决文件切换菜单导致退出的BUG
parent
651c269041
commit
a9aa1d386f
|
@ -69,7 +69,6 @@ declare module 'vue' {
|
||||||
ElTabs: typeof import('element-plus/es')['ElTabs']
|
ElTabs: typeof import('element-plus/es')['ElTabs']
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
ElTree: typeof import('element-plus/es')['ElTree']
|
|
||||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
FileList: typeof import('./src/components/file-list/index.vue')['default']
|
FileList: typeof import('./src/components/file-list/index.vue')['default']
|
||||||
FileRole: typeof import('./src/components/file-role/index.vue')['default']
|
FileRole: typeof import('./src/components/file-role/index.vue')['default']
|
||||||
|
|
|
@ -79,7 +79,12 @@ class RequestHttp {
|
||||||
async (error: AxiosError) => {
|
async (error: AxiosError) => {
|
||||||
const { response } = error;
|
const { response } = error;
|
||||||
if (error.message.indexOf('timeout') !== -1) MsgError('请求超时!请您稍后重试');
|
if (error.message.indexOf('timeout') !== -1) MsgError('请求超时!请您稍后重试');
|
||||||
if (response) checkStatus(response.status, response.data['message']);
|
if (response) {
|
||||||
|
checkStatus(
|
||||||
|
response.status,
|
||||||
|
response.data && response.data['message'] ? response.data['message'] : '',
|
||||||
|
);
|
||||||
|
}
|
||||||
if (!window.navigator.onLine) router.replace({ path: '/500' });
|
if (!window.navigator.onLine) router.replace({ path: '/500' });
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue