提交 | 用户 | age
|
3ac5f2
|
1 |
// The Vue build version to load with the `import` command |
J |
2 |
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. |
|
3 |
|
|
4 |
// 直接从core-js引入全局的polyfill |
aeb317
|
5 |
import 'core-js/fn/promise' |
3ac5f2
|
6 |
|
J |
7 |
import Vue from 'vue' |
aeb317
|
8 |
import Element from 'element-ui' |
3ac5f2
|
9 |
import App from './App' |
J |
10 |
|
|
11 |
import router from './router' // 路由表 |
|
12 |
import config from './config' // 域名配置 |
|
13 |
import Axios from './libs/axios' |
|
14 |
import store from './store' |
|
15 |
import filter from './filter' |
|
16 |
import Req from './utils/jun_httpInstall' // http 请求 |
|
17 |
import fn from './utils/g_fn_install' |
|
18 |
|
aeb317
|
19 |
import 'element-ui/lib/theme-chalk/index.css' |
J |
20 |
import 'element-ui/lib/theme-chalk/display.css' |
|
21 |
import '@/icons' // icon |
|
22 |
|
601fbd
|
23 |
// 全局标题图标配置!!! |
L |
24 |
import settingConfig from './config/settingConfig' // 全局标题图标配置 |
|
25 |
Vue.prototype.settingConfig = settingConfig |
|
26 |
|
aeb317
|
27 |
Vue.prototype.isTestView = config.isTestView |
J |
28 |
|
3ac5f2
|
29 |
Vue.config.productionTip = false |
J |
30 |
|
|
31 |
Vue.config.devtools = config.devtools |
|
32 |
if (config.ismock) { |
|
33 |
console.log('%c当前为测试模式,若要切换到线上请先将/src/main.js的ismock设置为0。', 'font-size:2em;font-weight: bold;') |
|
34 |
require('./mock.js') |
|
35 |
} |
|
36 |
Vue.config.productionTip = false |
aeb317
|
37 |
// 解决elementui下拉搜索框在ios上唤不起软键盘 |
J |
38 |
import ElementUI from '@/utils/element-ui-preprocessing' |
|
39 |
|
|
40 |
Vue.use(Element) |
|
41 |
Vue.use(ElementUI) |
3ac5f2
|
42 |
Vue.use(Axios) |
J |
43 |
Vue.use(filter) |
|
44 |
Vue.use(Req) |
|
45 |
Vue.use(fn) |
|
46 |
|
c6d315
|
47 |
Vue.prototype.$messageSuc = function(msg) { |
L |
48 |
this.$message({ message: msg, dangerouslyUseHTMLString: true, type: 'success' }) |
|
49 |
} |
|
50 |
Vue.prototype.$messageWarn = function(msg) { |
|
51 |
this.$message({ message: msg, dangerouslyUseHTMLString: true, type: 'warning' }) |
|
52 |
} |
|
53 |
Vue.prototype.$messageError = function(msg) { |
|
54 |
this.$message({ message: msg, dangerouslyUseHTMLString: true, type: 'error' }) |
|
55 |
} |
|
56 |
Vue.prototype.$messageInfo = function(msg) { |
|
57 |
this.$message({ message: msg, dangerouslyUseHTMLString: true, type: 'info' }) |
|
58 |
} |
|
59 |
|
3ac5f2
|
60 |
/* eslint-disable no-new */ |
J |
61 |
new Vue({ |
|
62 |
el: '#app', |
|
63 |
router, |
|
64 |
store, |
|
65 |
components: { App }, |
|
66 |
template: '<App/>' |
|
67 |
}) |