main.js
1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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'
import '@/styles/index.scss'
import Base from './components/Base/base' // 全局组件引入
import mixin from '@/utils/mixin/theme.js'
Vue.mixin(mixin);
import rules from './utils/rule.js'
// 全局方法挂载
Vue.prototype.$rules = rules
import Popup from './components/tanchuang/index'
Vue.prototype.$popup = Popup.install
import { theme } from "@/directive/theme.js"
Vue.directive("theme", theme)
Vue.directive('fo', {
inserted (el, binding, vnode) {
el.querySelector('input').focus()
}
})
import './image/icons' // icon
import store from './store'
import router from './router'
import _ from 'lodash'
import * as filters from './filters' // global filters
import './permission' // permission control
Vue.use(Element, { size: 'small', zIndex: 1000 })
Vue.use(Base)
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
})
Vue.config.productionTip = false
new Vue({
el: '#app',
router,
store,
render: h => h(App)
})