fe-drone-ci/src/main.js

47 lines
1.0 KiB
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'
2019-03-18 01:42:52 +00:00
import './styles/element-variables.scss'
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
import './permission' // permission control
2019-03-14 09:23:32 +00:00
import './utils/errorLog' // error log
import * as filters from './filters' // global filters
2017-04-18 07:09:13 +00:00
import { mockXHR } from '../mock' // simulation data
// mock api in github pages site build
if (process.env.NODE_ENV === 'production') { mockXHR() }
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
})