Blame view

src/main.js 1.15 KB
赵千 committed
1 2 3 4 5 6 7

import 'babel-polyfill'
import Vue from 'vue'
import App from './App'
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
import Element from 'element-ui'
import './styles/element-variables.scss'
任超 committed
8
import '@/styles/index.scss'
任超 committed
9 10 11 12
import Base from './components/Base/base' // 全局组件引入
import mixin from '@/utils/mixin/theme.js'
Vue.mixin(mixin);

任超 committed
13 14 15 16
import rules from './utils/rule.js'
// 全局方法挂载
Vue.prototype.$rules = rules

liangyifan committed
17 18
import Popup from './components/tanchuang/index'
Vue.prototype.$popup = Popup.install
任超 committed
19

任超 committed
20 21
import { theme } from "@/directive/theme.js"
Vue.directive("theme", theme)
赵千 committed
22

任超 committed
23 24 25 26 27 28
Vue.directive('fo', {
    inserted (el, binding, vnode) {
        el.querySelector('input').focus()
    }
})

任超 committed
29
import './image/icons' // icon
赵千 committed
30 31 32 33 34
import store from './store'
import router from './router'
import _ from 'lodash'

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