heimawl
2023-06-16 f98059f7c23be9269795002ffb36e65347ce5d03
src/main.js
@@ -1,6 +1,7 @@
import Vue from 'vue'
import Cookies from 'js-cookie'
import * as echarts from "echarts";
import Element from 'element-ui'
import './assets/styles/element-variables.scss'
@@ -37,8 +38,18 @@
import VueMeta from 'vue-meta'
// 字典数据组件
import DictData from '@/components/DictData'
// 组件封装集成
import components from './components'
// 注册过滤器
// 自定义指令
import * as directives from './directives'
import * as filters from './filters'
for(let key in filters){
Vue.filter(key, filters[key])
}
// 全局方法挂载
Vue.prototype.getDicts = getDicts
Vue.prototype.getConfigKey = getConfigKey
Vue.prototype.parseTime = parseTime
@@ -48,7 +59,6 @@
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree
// 全局组件挂载
Vue.component('DictTag', DictTag)
Vue.component('Pagination', Pagination)
@@ -58,10 +68,15 @@
Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview)
// 封装自定义指令
for(let key in directives)
Vue.directive(key, directives[key])
Vue.use(directive)
Vue.use(plugins)
Vue.use(VueMeta)
DictData.install()
Vue.use(components)
/**
 * If you don't want to use mock-server