Blame view

src/main.js 1.45 KB
赵千 committed
1 2 3 4
import Vue from 'vue'
import App from './App'
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
import Element from 'element-ui'
任超 committed
5
import '@/styles/element-variables.scss'
任超 committed
6
import '@/styles/index.scss'
任超 committed
7
import Base from '@/components/Base/base' // 全局组件引入
任超 committed
8
import mixin from '@/utils/mixin/theme.js'
任超 committed
9
import { startLoadingAddCount, endLoadingSubCount } from './utils/requestLoading'
任超 committed
10 11
Vue.mixin(mixin);

任超 committed
12 13 14
import rules from './utils/rule.js'
// 全局方法挂载
Vue.prototype.$rules = rules
任超 committed
15 16 17
// 全局加载
Vue.prototype.$startLoading = startLoadingAddCount
Vue.prototype.$endLoading = endLoadingSubCount
任超 committed
18 19
import { theme } from "@/directive/theme.js"
Vue.directive("theme", theme)
任超 committed
20 21 22 23 24
Vue.directive('fo', {
    inserted (el, binding, vnode) {
        el.querySelector('input').focus()
    }
})
任超 committed
25
import './image/icons' // icon
赵千 committed
26 27 28 29
import store from './store'
import router from './router'
import _ from 'lodash'

任超 committed
30
import VueQuillEditor from 'vue-quill-editor'//调用编辑器
蔡俊立 committed
31 32 33 34 35 36
// 样式
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor)

赵千 committed
37
import * as filters from './filters' // global filters
任超 committed
38
import './permission' // permission control
任超 committed
39
Vue.use(Element, { size: 'small', zIndex: 1000 })
任超 committed
40
Vue.use(Base)
赵千 committed
41 42 43 44 45 46 47 48 49 50
Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key])
})
Vue.config.productionTip = false
new Vue({
    el: '#app',
    router,
    store,
    render: h => h(App)
})