mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 18:40:22 +08:00
chore(error-handle): 处理vue errorHandler绑定事件的参数类型不一致
This commit is contained in:
parent
e456f54ded
commit
cea297ce88
@ -62,16 +62,15 @@ function formatComponentName(vm: any) {
|
|||||||
/**
|
/**
|
||||||
* Configure Vue error handling function
|
* Configure Vue error handling function
|
||||||
*/
|
*/
|
||||||
|
function vueErrorHandler(err: unknown, vm: any, info: string) {
|
||||||
function vueErrorHandler(err: Error, vm: any, info: string) {
|
|
||||||
const errorLogStore = useErrorLogStoreWithOut();
|
const errorLogStore = useErrorLogStoreWithOut();
|
||||||
const { name, path } = formatComponentName(vm);
|
const { name, path } = formatComponentName(vm);
|
||||||
errorLogStore.addErrorLogInfo({
|
errorLogStore.addErrorLogInfo({
|
||||||
type: ErrorTypeEnum.VUE,
|
type: ErrorTypeEnum.VUE,
|
||||||
name,
|
name,
|
||||||
file: path,
|
file: path,
|
||||||
message: err.message,
|
message: (err as Error).message,
|
||||||
stack: processStackMsg(err),
|
stack: processStackMsg(err as Error),
|
||||||
detail: info,
|
detail: info,
|
||||||
url: window.location.href,
|
url: window.location.href,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user