add global error handler
This commit is contained in:
parent
6643f6ebf4
commit
768587f81f
@ -23,7 +23,11 @@
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
|
||||
body {
|
||||
background-color: #0f1013;
|
||||
}
|
||||
|
||||
div,
|
||||
span,
|
||||
object,
|
||||
|
@ -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({
|
||||
|
Loading…
x
Reference in New Issue
Block a user