50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import Vue, { DirectiveOptions } from 'vue'
|
|
|
|
import 'normalize.css'
|
|
import ElementUI from 'element-ui'
|
|
import SvgIcon from 'vue-svgicon'
|
|
|
|
import '@/styles/element-variables.scss'
|
|
import '@/styles/index.scss'
|
|
|
|
import App from '@/App.vue'
|
|
import store from '@/store'
|
|
import router from '@/router'
|
|
import i18n from '@/lang'
|
|
import '@/icons/components'
|
|
import '@/permission'
|
|
import { AppModule } from '@/store/modules/app'
|
|
import * as directives from '@/directives'
|
|
import * as filters from '@/filters'
|
|
import local from '@/utils/storage'
|
|
|
|
import '@/utils/Extend'
|
|
|
|
Vue.use(ElementUI, {
|
|
size: AppModule.size,
|
|
i18n: (key: string, value: string) => i18n.t(key, value)
|
|
})
|
|
Vue.use(SvgIcon, {
|
|
tagName: 'svg-icon',
|
|
defaultWidth: '1em',
|
|
defaultHeight: '1em'
|
|
})
|
|
Vue.use(local)
|
|
|
|
Object.keys(directives).forEach(key => {
|
|
Vue.directive(key, (directives as { [key: string ]: DirectiveOptions })[key])
|
|
})
|
|
// Register global filter functions
|
|
Object.keys(filters).forEach(key => {
|
|
Vue.filter(key, (filters as { [key: string ]: Function })[key])
|
|
})
|
|
// Register global directives
|
|
Vue.config.productionTip = false
|
|
|
|
new Vue({
|
|
router,
|
|
store,
|
|
i18n,
|
|
render: (h) => h(App)
|
|
}).$mount('#app')
|