提交 | 用户 | age
|
36e1de
|
1 |
// The Vue build version to load with the `import` command |
L |
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 moment from 'moment' |
|
16 |
import Req from './utils/jun_httpInstall' // http 请求 |
|
17 |
import fn from './utils/g_fn_install' |
|
18 |
|
|
19 |
Vue.config.productionTip = false |
|
20 |
|
|
21 |
Vue.prototype.$moment = moment |
|
22 |
|
|
23 |
Vue.config.devtools = config.devtools |
|
24 |
if (config.ismock) { |
|
25 |
console.log('%c当前为测试模式,若要切换到线上请先将/src/main.js的ismock设置为0。', 'font-size:2em;font-weight: bold;') |
|
26 |
require('./mock.js') |
|
27 |
} |
|
28 |
Vue.config.productionTip = false |
|
29 |
// Vue.use(element) |
|
30 |
Vue.use(Axios) |
|
31 |
Vue.use(filter) |
|
32 |
Vue.use(Req) |
|
33 |
Vue.use(fn) |
|
34 |
|
|
35 |
/* eslint-disable no-new */ |
|
36 |
new Vue({ |
|
37 |
el: '#app', |
|
38 |
router, |
|
39 |
store, |
|
40 |
components: { App }, |
|
41 |
template: '<App/>' |
|
42 |
}) |