qb-admin-fe/src/main.js

42 lines
906 B
JavaScript
Raw Normal View History

2017-08-21 07:55:46 +00:00
import Vue from 'vue'
import Cookies from 'js-cookie'
2018-08-15 09:29:15 +00:00
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
2017-11-01 02:03:28 +00:00
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '@/styles/index.scss' // global css
2017-08-21 07:55:46 +00:00
import App from './App'
import store from './store'
import router from './router'
import i18n from './lang' // Internationalization
2017-08-30 10:22:32 +00:00
import './icons' // icon
2018-08-15 09:29:15 +00:00
import './errorLog' // error log
import './permission' // permission control
import * as filters from './filters' // global filters
2017-04-18 07:09:13 +00:00
2017-11-03 10:37:49 +00:00
Vue.use(Element, {
size: Cookies.get('size') || 'medium', // set element-ui default size
2017-11-03 10:37:49 +00:00
i18n: (key, value) => i18n.t(key, value)
})
2017-04-18 07:09:13 +00:00
// register global utility filters.
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
2017-08-21 07:55:46 +00:00
})
2017-07-06 09:56:17 +00:00
2017-08-21 07:55:46 +00:00
Vue.config.productionTip = false
2017-04-18 07:09:13 +00:00
new Vue({
2017-06-26 03:21:53 +00:00
el: '#app',
2017-04-18 07:09:13 +00:00
router,
store,
2017-11-03 10:37:49 +00:00
i18n,
render: h => h(App)
2017-06-26 03:21:53 +00:00
})