You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
1.5 KiB
65 lines
1.5 KiB
import Vue, { DirectiveOptions } from 'vue'
|
|
|
|
import 'normalize.css'
|
|
import ElementUI from 'element-ui'
|
|
import ViewUI from 'view-design'
|
|
import SvgIcon from 'vue-svgicon'
|
|
|
|
import uploader from 'vue-simple-uploader'
|
|
import contextMenu from 'vue-contextmenujs'
|
|
import VueEvents from '@/components/EventBus'
|
|
|
|
import '@/styles/element-variables.scss'
|
|
import 'view-design/dist/styles/iview.css'
|
|
import '@/styles/index.scss'
|
|
|
|
import App from '@/App.vue'
|
|
import store from '@/store'
|
|
import { AppModule } from '@/store/modules/app'
|
|
import router from '@/router'
|
|
import i18n from '@/lang'
|
|
import '@/icons/components'
|
|
import '@/permission'
|
|
import '@/utils/error-log'
|
|
import '@/pwa/register-service-worker'
|
|
import * as directives from '@/directives'
|
|
import * as filters from '@/filters'
|
|
|
|
Vue.use(ElementUI, {
|
|
size: AppModule.size, // Set element-ui default size
|
|
i18n: (key: string, value: string) => i18n.t(key, value)
|
|
})
|
|
|
|
Vue.use(ViewUI, {
|
|
size: 'default',
|
|
i18n: (key: string, value: string) => i18n.t(key, value)
|
|
})
|
|
|
|
Vue.use(SvgIcon, {
|
|
tagName: 'svg-icon',
|
|
defaultWidth: '1em',
|
|
defaultHeight: '1em'
|
|
})
|
|
|
|
Vue.use(uploader)
|
|
Vue.use(contextMenu)
|
|
Vue.use(VueEvents)
|
|
|
|
// Register global directives
|
|
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])
|
|
})
|
|
|
|
Vue.config.productionTip = false
|
|
|
|
new Vue({
|
|
router,
|
|
store,
|
|
i18n,
|
|
render: (h) => h(App)
|
|
}).$mount('#app')
|
|
|