mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-04-06 03:57:53 +08:00
* perf[navbar]: set langSelect to component && refine errorLog component
* feat[login]:add 18n to login form
* fix[pagination]: fixed when selected page-sizes
* perf[i18n]:dashboard document svg permission
* perf[charts]: perf effect
* perf[i18n]:excel && zip
* perf[i18n]: table && errorLog && theme
* perf[i18n]: components
* perf[i18n]: direct use $t
* perf[i18n]: complex-table
* update README.md
* update README.md 📘
* perf[i18n]: refine code comments
22 lines
544 B
JavaScript
22 lines
544 B
JavaScript
import Vue from 'vue'
|
|
import store from './store'
|
|
|
|
// you can set only in production env show the error-log
|
|
// if (process.env.NODE_ENV === 'production') {
|
|
|
|
Vue.config.errorHandler = function(err, vm, info, a) {
|
|
// Don't ask me why I use Vue.nextTick, it just a hack.
|
|
// detail see https://forum.vuejs.org/t/dispatch-in-vue-config-errorhandler-has-some-problem/23500
|
|
Vue.nextTick(() => {
|
|
store.dispatch('addErrorLog', {
|
|
err,
|
|
vm,
|
|
info,
|
|
url: window.location.href
|
|
})
|
|
console.error(err, info)
|
|
})
|
|
}
|
|
|
|
// }
|