chore(error-handle): 处理vue errorHandler绑定事件的参数类型不一致

This commit is contained in:
invalid w 2023-10-09 12:02:53 +08:00
parent e456f54ded
commit cea297ce88

View File

@ -62,16 +62,15 @@ function formatComponentName(vm: any) {
/**
* 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,
});