gjj
2023-02-07 08690e2fd123a710406a101a2a5bd98fa0992502
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
 
// 组件ElementUI
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
 
// vuex状态管理
import store from './store'
// 样式
import less from 'less'
import '@/styles/index.scss' // global css
import '@/styles/animate.css'
 
// 自定义全局点击空白处组件
import clickoutside from './directives' // global filters
import focus from './directives/focus'
import empty from './directives/empty'
import photo from './directives/photo'
import Lockr from 'lockr'
/** 常用flex组件 */
import {
  Flexbox,
  FlexboxItem
} from '@/components/flexbox'
/** 事件传递 */
import VueBus from 'vue-bus'
/** 懒加载图片 */
import VueLazyload from 'vue-lazyload'
import * as filters from './filters'
import moment from 'moment'
// 表情
import {
  emoji
} from './utils/emoji' // global filters
import fullCalendar from 'vue-fullcalendar'
// import cache from '@/utils/cache'
import 'lib-flexible'
 
// cache.loadingCache()
 
Vue.component('full-calendar', fullCalendar)
 
// 注册全局过滤器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})
 
// 处理时间的过滤器
Vue.use(require('vue-moment'))
moment.locale('zh_cn')
 
Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: require('@/assets/img/send_img.png'),
  loading: require('@/assets/img/loading.gif'),
  attempt: 1
})
 
Vue.prototype.emoji = emoji
 
Vue.use(VueBus)
Vue.component('flexbox', Flexbox)
Vue.component('flexbox-item', FlexboxItem)
Vue.use(empty)
Vue.use(photo) // 本地存储插件
console.log(process.env.NODE_ENV)
 
window.Lockr = Lockr // 使用本地存储插件
Vue.directive('clickoutside', clickoutside)
Vue.directive('focus', focus)
Vue.use(ElementUI, {zIndex: 3000})
 
Vue.use(less)
 
Vue.config.productionTip = false
 
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})