From 9860e221460a0a4ac1903dad2c97160d0eed0e63 Mon Sep 17 00:00:00 2001 From: long <515897141@qq.com> Date: 星期五, 03 三月 2023 10:59:42 +0800 Subject: [PATCH] 初始化 --- src/main.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000..229ea40 --- /dev/null +++ b/src/main.js @@ -0,0 +1,42 @@ +// The Vue build version to load with the `import` command +// (runtime-only or standalone) has been set in webpack.base.conf with an alias. + +// 鐩存帴浠巆ore-js寮曞叆鍏ㄥ眬鐨刾olyfill +import 'core-js/fn/promise' + +import Vue from 'vue' +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 moment from 'moment' +import Req from './utils/jun_httpInstall' // http 璇锋眰 +import fn from './utils/g_fn_install' + +Vue.config.productionTip = false + +Vue.prototype.$moment = moment + +Vue.config.devtools = config.devtools +if (config.ismock) { + console.log('%c褰撳墠涓烘祴璇曟ā寮忥紝鑻ヨ鍒囨崲鍒扮嚎涓婅鍏堝皢/src/main.js鐨刬smock璁剧疆涓�0銆�', 'font-size:2em;font-weight: bold;') + require('./mock.js') +} +Vue.config.productionTip = false +// Vue.use(element) +Vue.use(Axios) +Vue.use(filter) +Vue.use(Req) +Vue.use(fn) + +/* eslint-disable no-new */ +new Vue({ + el: '#app', + router, + store, + components: { App }, + template: '<App/>' +}) -- Gitblit v1.8.0