-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathmain.js
34 lines (34 loc) · 896 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import Vue from 'vue'
import 'normalize.css/normalize.css'// A modern alternative to CSS resets
import App from './App'
import router from './router'
import store from './vuex/store'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import { sync } from 'vuex-router-sync'
import './styles/index.scss' // global css
import UtilsPlugin from './assets/utils'
import HttpPlugin from './http/Index'
import VCharts from 'v-charts'
import Vant from 'vant'
import 'vant/lib/vant-css/index.css'
Vue.use(Vant)
Vue.config.productionTip = false
// plugins
Vue.use(UtilsPlugin)
Vue.use(VCharts)
Vue.use(HttpPlugin)
Vue.use(ElementUI)
router.beforeEach((to, from, next) => {
setTimeout(next, 20)
})
router.afterEach((to) => {
})
sync(store, router)
/* eslint-disable no-new */
// global
window.$globalHub = new Vue({
store,
router,
render: h => h(App)
}).$mount('#app')