Skip to content

Commit

Permalink
chore(error-handle): 处理vue errorHandler绑定事件的参数类型不一致
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjue666 committed Oct 9, 2023
1 parent e456f54 commit cea297c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/logics/error-handle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down

0 comments on commit cea297c

Please sign in to comment.