2017-08-21 07:55:46 +00:00
|
|
|
import Vue from 'vue'
|
2017-12-15 06:07:55 +00:00
|
|
|
|
2018-08-29 07:24:47 +00:00
|
|
|
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-12-15 06:07:55 +00:00
|
|
|
|
2017-11-01 02:03:28 +00:00
|
|
|
import Element from 'element-ui'
|
|
|
|
import 'element-ui/lib/theme-chalk/index.css'
|
2017-12-15 06:07:55 +00:00
|
|
|
|
|
|
|
import '@/styles/index.scss' // global css
|
|
|
|
|
2017-08-21 07:55:46 +00:00
|
|
|
import App from './App'
|
|
|
|
import store from './store'
|
2019-01-29 08:54:38 +00:00
|
|
|
import router from './router'
|
2017-12-15 06:07:55 +00:00
|
|
|
|
|
|
|
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
|
2017-12-15 06:07:55 +00:00
|
|
|
import './permission' // permission control
|
|
|
|
|
2017-12-29 08:07:42 +00:00
|
|
|
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, {
|
2018-08-29 07:24:47 +00:00
|
|
|
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,
|
2018-06-25 03:17:47 +00:00
|
|
|
render: h => h(App)
|
2017-06-26 03:21:53 +00:00
|
|
|
})
|