Browse Source

fix: 处理vue errorHandler绑定事件的参数类型不一致

main
xingyu 2 years ago
parent
commit
91c34175da
  1. 6
      src/logics/error-handle/index.ts

6
src/logics/error-handle/index.ts

@ -63,15 +63,15 @@ function formatComponentName(vm: any) {
* Configure Vue error handling function * 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 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,
}) })