import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from './components/element-ui'

import './styles/index.scss'

Vue.config.productionTip = false

Vue.use(ElementUI)

const title = document.title
router.afterEach((to) => {
  if (to.meta?.title) {
    document.title = `${to.meta.title} - ${title}`
  }
})

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