add global error handler

This commit is contained in:
yuexin 2024-04-12 13:56:58 +08:00
parent 6643f6ebf4
commit 768587f81f
2 changed files with 14 additions and 1 deletions

View File

@ -23,7 +23,11 @@
}
html,
body,
body {
background-color: #0f1013;
}
div,
span,
object,

View File

@ -19,6 +19,15 @@ Vue.filter('formatDate', function (value) {
return moment(value).format('YYYY-MM-DD HH:mm:ss')
})
Vue.config.errorHandler = function(err, vm, info){
//todo: show error message
Message({
message: info,
type: 'error',
duration: 3 * 1000
})
}
Vue.config.productionTip = false
new Vue({