diff --git a/src/main.js b/src/main.js index 6722cde958627c4c09afd5832b648c83aefe2ad1..ed60754d31c8a8f8f07a69014fc031fcd9f792a5 100644 --- a/src/main.js +++ b/src/main.js @@ -1,4 +1,5 @@ import Vue from 'vue' +import { logError } from '@/utils/logError' import 'normalize.css/normalize.css' // A modern alternative to CSS resets @@ -17,6 +18,7 @@ import '@/permission' // permission control Vue.use(ElementUI) Vue.config.productionTip = false +Vue.prototype.$logError = logError new Vue({ el: '#app', diff --git a/src/utils/logError.js b/src/utils/logError.js index b191e3900efa011eeee5755e0d9fe09df2917be5..9aff6b3c78c5ccd2c7eb93e002bd13570e4644b4 100644 --- a/src/utils/logError.js +++ b/src/utils/logError.js @@ -1,4 +1,3 @@ -import { format } from 'core-js/fn/date' import { parseTime } from './index' import { Message } from 'element-ui'