提交 | 用户 | 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 |
|
5 |
import 'core-js/fn/promise'; |
|
6 |
|
|
7 |
import Vue from 'vue' |
|
8 |
import App from './App' |
|
9 |
|
|
10 |
import router from './router' // 路由表 |
|
11 |
import config from './config' // 域名配置 |
|
12 |
import Axios from './libs/axios' |
|
13 |
import store from './store' |
|
14 |
import filter from './filter' |
|
15 |
import Req from './utils/jun_httpInstall' // http 请求 |
|
16 |
import fn from './utils/g_fn_install' |
|
17 |
|
|
18 |
Vue.config.productionTip = false |
|
19 |
|
|
20 |
Vue.config.devtools = config.devtools |
|
21 |
if (config.ismock) { |
|
22 |
console.log('%c当前为测试模式,若要切换到线上请先将/src/main.js的ismock设置为0。', 'font-size:2em;font-weight: bold;') |
|
23 |
require('./mock.js') |
|
24 |
} |
|
25 |
Vue.config.productionTip = false |
|
26 |
// Vue.use(element) |
|
27 |
Vue.use(Axios) |
|
28 |
Vue.use(filter) |
|
29 |
Vue.use(Req) |
|
30 |
Vue.use(fn) |
|
31 |
|
|
32 |
/* eslint-disable no-new */ |
|
33 |
new Vue({ |
|
34 |
el: '#app', |
|
35 |
router, |
|
36 |
store, |
|
37 |
components: { App }, |
|
38 |
template: '<App/>' |
|
39 |
}) |