| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- // The Vue build version to load with the `import` command
- // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
- import Vue from 'vue'
- import element from 'element-ui'
- import { sync } from 'vuex-router-sync'
- import App from './App'
- import i18n from 'libraries/i18n'
- import store from 'libraries/store'
- import router from 'libraries/router'
- import plugins from 'libraries/plugins'
- // ## Import styles
- // =========================
- import 'element-ui/lib/theme-default/index.css'
- import 'assets/styles/main.scss'
- // ## Use plugins
- // =========================
- Vue.use(element)
- Vue.use(plugins)
- sync(store, router, { moduleName: 'route' })
- // ## Config
- // =========================
- Vue.config.debug = process.env.NODE_ENV === 'development'
- Vue.config.silent = !Vue.config.debug
- Vue.config.devtools = true
- Vue.config.productionTip = false
- // ## Initial
- // =========================
- // Element默认不支持 6.x 的 vue-i18n,需要手动处理。
- Vue.use(element, {
- i18n: key => i18n.vm._t(key)
- })
- // ## Root app
- // =========================
- const app = new Vue({
- name: 'root',
- i18n: i18n,
- store: store,
- router: router,
- render: h => h(App)
- })
- // ## Mount to `#app` element
- // =========================
- app.$mount('#app')
|