import Vue from 'vue'
import router from './router'
import store from './store'
import App from './app.vue'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import './style.scss'
import BeforeEnter from './utils/beforeEnter'
const before = new BeforeEnter()

Vue.use(ElementUI)

/* 导航守卫 */
router.beforeEach((to, from, next) => {
  before.update(to, from, next)
  next()
})

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