main.js 896 B

123456789101112131415161718192021222324252627282930313233343536
  1. import Vue from 'vue'
  2. import BootstrapVue from 'bootstrap-vue'
  3. import Meta from 'vue-meta'
  4. import Vue2TouchEvents from 'vue2-touch-events'
  5. import VueMessages from './messages'
  6. import App from './App'
  7. import router from './router'
  8. import store from './store'
  9. Vue.use(BootstrapVue, {
  10. BButton: { pill: true },
  11. BCardHeader: { headerBgVariant: 'white' },
  12. BCardFooter: { footerBgVariant: 'white' }
  13. })
  14. Vue.use(Meta)
  15. Vue.use(Vue2TouchEvents)
  16. Vue.use(VueMessages)
  17. // Register global components
  18. const requireComponent = require.context('@/components/globals', true, /\.(js|vue)$/i)
  19. // For each matching file name...
  20. requireComponent.keys().forEach((fileName) => {
  21. // Get the component
  22. const component = requireComponent(fileName).default
  23. // Globally register the component
  24. Vue.component(component.name, component)
  25. })
  26. new Vue({
  27. router,
  28. store,
  29. render: h => h(App)
  30. }).$mount('#app')