main.js
1.93 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
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* @Descripttion:
* @version: 1.0.0
* @Author: limin
* @Date: 2021-08-13 14:12:11
* @LastEditors: limin
* @LastEditTime: 2021-09-24 10:41:31
* @FilePath: \scrm\scrm-sub-blog\src\main.js
*/
import Vue from 'vue'
import apis from './api'
import './public-path'
import './components'
import '@/assets/css/public.scss'
// import 'glsx-components/dist/glsx-components.css'
import './styles/index.scss'
import { start } from '@/setup'
import glsxTable from 'glsx-table'
import { message } from './plugins/element.js'
import filters from '@/utils/filters'
import * as echarts from 'echarts'
import { Constants } from './common/constants'
import { Util } from './common/util'
import { common } from './common/common'
import VueAnimateNumber from 'vue-animate-number'
Vue.use(VueAnimateNumber)
Vue.config.productionTip = false
Vue.use(glsxTable)
Vue.prototype.$message = message
Vue.prototype.$apis = apis
Vue.prototype.size = 'small'
// Vue.prototype.btn_size = 'mini'
Vue.prototype.$Constants = Constants
Vue.prototype.$Utils = Util
Vue.prototype.$Commons = common
Vue.prototype.$echarts = echarts
//过滤器统一处理预加载
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
})
Vue.config.errorHandler = function(err, vm, info) {
let {
message, // 异常信息
name, // 异常名称
stack // 异常堆栈信息
} = err
// vm 为抛出异常的 Vue 实例
// info 为 Vue 特定的错误信息,比如错误所在的生命周期钩子
console.error(`组件${vm.$vnode.tag},特定的错误信息:${info},异常信息:${message},异常名称:${name},异常堆栈信息:${stack}`)
}
export { bootstrap, mount, unmount }
from '@/setup'
export const http = params => Vue.prototype.$http(params)
export const http2 = params => Vue.prototype.$http2(params)
export const http3 = params => Vue.prototype.$http3(params)
export const http_common = params => Vue.prototype.$http_common(params)