From a745761147b17a42b4698250a170ef4c0fa0b09b Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期三, 03 七月 2024 21:18:39 +0800 Subject: [PATCH] 产品绑定工艺优化 --- src/logics/error-handle/index.ts | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/logics/error-handle/index.ts b/src/logics/error-handle/index.ts index e04c009..8705528 100644 --- a/src/logics/error-handle/index.ts +++ b/src/logics/error-handle/index.ts @@ -2,13 +2,13 @@ * Used to configure the global error handling function, which can monitor vue errors, script errors, static resource errors and Promise errors */ -import type { ErrorLogInfo } from '/#/store'; +import type { ErrorLogInfo } from '#/store'; -import { useErrorLogStoreWithOut } from '/@/store/modules/errorLog'; +import { useErrorLogStoreWithOut } from '@/store/modules/errorLog'; -import { ErrorTypeEnum } from '/@/enums/exceptionEnum'; +import { ErrorTypeEnum } from '@/enums/exceptionEnum'; import { App } from 'vue'; -import projectSetting from '/@/settings/projectSetting'; +import projectSetting from '@/settings/projectSetting'; /** * Handling error stack information @@ -62,16 +62,15 @@ /** * Configure Vue error handling function */ - -function vueErrorHandler(err: Error, vm: any, info: string) { +function vueErrorHandler(err: unknown, vm: any, info: string) { const errorLogStore = useErrorLogStoreWithOut(); const { name, path } = formatComponentName(vm); errorLogStore.addErrorLogInfo({ type: ErrorTypeEnum.VUE, name, file: path, - message: err.message, - stack: processStackMsg(err), + message: (err as Error).message, + stack: processStackMsg(err as Error), detail: info, url: window.location.href, }); -- Gitblit v1.9.3