/*
 * @Description: file content
 * @Author: Huidong Che
 * @Date: 2020-03-27 08:53:27
 * @LastEditors: chd
 * @LastEditTime: 2021-05-08 15:35:09
 */
import Vue from 'vue'
import App from './App.vue'

import './plugins/element.js'
import './plugins/vxetable'
import './plugins/jsonViewer'

import store from './store'
import router from './router'
import './assets/css/root.css'
import './assets/css/common.css'
import './assets/css/index.css'
import './styles/index.scss'

const isMobile = () => window.innerWidth <= 1100
Vue.util.defineReactive(Vue.prototype, '$isMobile', isMobile())
window.addEventListener('resize', () => {
  Vue.prototype.$isMobile = isMobile()
})


new Vue({
  store,
  router,
  render: (h) => h(App),
}).$mount('#app')

Vue.config.errorHandler = function (err, vm, info) {
  // handle error
  // `info` 是 Vue 特定的错误信息，比如错误所在的生命周期钩子
  // 只在 2.2.0+ 可用
  console.log('错误', err, vm, info)
  // monitorPost('/error/save', { err, vm, info })
}
