long
9 天以前 911e0ed72a790ba054385ffe594262e123948691
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
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
 
// 直接从core-js引入全局的polyfill
import 'core-js/fn/promise'
 
import Vue from 'vue'
import Element from 'element-ui'
import App from './App'
 
import router from './router' // 路由表
import config from './config' // 域名配置
import Axios from './libs/axios'
import store from './store'
import filter from './filter'
import Req from './utils/jun_httpInstall' // http 请求
import fn from './utils/g_fn_install'
 
import 'element-ui/lib/theme-chalk/index.css'
import 'element-ui/lib/theme-chalk/display.css'
import '@/icons' // icon
 
// 全局标题图标配置!!!
import settingConfig from './config/settingConfig' // 全局标题图标配置
Vue.prototype.settingConfig = settingConfig
 
Vue.prototype.isTestView = config.isTestView
 
Vue.config.productionTip = false
 
Vue.config.devtools = config.devtools
if (config.ismock) {
  console.log('%c当前为测试模式,若要切换到线上请先将/src/main.js的ismock设置为0。', 'font-size:2em;font-weight: bold;')
  require('./mock.js')
}
Vue.config.productionTip = false
// 解决elementui下拉搜索框在ios上唤不起软键盘
import ElementUI from '@/utils/element-ui-preprocessing'
 
Vue.use(Element)
Vue.use(ElementUI)
Vue.use(Axios)
Vue.use(filter)
Vue.use(Req)
Vue.use(fn)
 
Vue.prototype.$messageSuc = function(msg) {
  this.$message({ message: msg, dangerouslyUseHTMLString: true, type: 'success' })
}
Vue.prototype.$messageWarn = function(msg) {
  this.$message({ message: msg, dangerouslyUseHTMLString: true, type: 'warning' })
}
Vue.prototype.$messageError = function(msg) {
  this.$message({ message: msg, dangerouslyUseHTMLString: true, type: 'error' })
}
Vue.prototype.$messageInfo = function(msg) {
  this.$message({ message: msg, dangerouslyUseHTMLString: true, type: 'info' })
}
 
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})