这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
547 B

import Vue from 'vue'
import { ErrorLogModule } from '@/store/modules/error-log'
import { isArray } from '@/utils/validate'
import settings from '@/settings'
const { errorLog: needErrorLog } = settings
const checkNeed = () => {
const env = process.env.NODE_ENV
if (isArray(needErrorLog) && env) {
return needErrorLog.includes(env)
}
return false
}
if (checkNeed()) {
Vue.config.errorHandler = function(err, vm, info) {
ErrorLogModule.AddErrorLog({
err,
vm,
info,
url: window.location.href
})
}
}