main.js 717 B

123456789101112131415161718192021222324252627282930
  1. import Vue from 'vue'
  2. import App from './App.vue'
  3. import {initRouter} from './router'
  4. import './theme/index.less'
  5. import Antd from 'ant-design-vue'
  6. import Viser from 'viser-vue'
  7. import '@/mock'
  8. import store from './store'
  9. import 'animate.css/source/animate.css'
  10. import Plugins from '@/plugins'
  11. import {initI18n} from '@/utils/i18n'
  12. import bootstrap from '@/bootstrap'
  13. import 'moment/locale/zh-cn'
  14. const router = initRouter(store.state.setting.asyncRoutes)
  15. const i18n = initI18n('CN', 'US')
  16. Vue.use(Antd)
  17. Vue.config.productionTip = false
  18. Vue.use(Viser)
  19. Vue.use(Plugins)
  20. bootstrap({router, store, i18n, message: Vue.prototype.$message})
  21. new Vue({
  22. router,
  23. store,
  24. i18n,
  25. render: h => h(App),
  26. }).$mount('#app')