main.js 867 B

1234567891011121314151617181920212223242526272829303132333435
  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. BOverlay: { blur: null, spinnerType: 'grow', opacity: 0 }
  12. })
  13. Vue.use(Meta)
  14. Vue.use(Vue2TouchEvents)
  15. Vue.use(VueMessages)
  16. // Register global components
  17. const requireComponent = require.context('@/components/globals', true, /\.(js|vue)$/i)
  18. // For each matching file name...
  19. requireComponent.keys().forEach((fileName) => {
  20. // Get the component
  21. const component = requireComponent(fileName).default
  22. // Globally register the component
  23. Vue.component(component.name, component)
  24. })
  25. new Vue({
  26. router,
  27. store,
  28. render: h => h(App)
  29. }).$mount('#app')