提交 6228b068 编写于 作者: yma16's avatar yma16

perf: production

上级 ccddeecb
// The Vue build version to load with the `import` command // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
// vue cdn // vue cdn
import Vue from 'vue' // import Vue from 'vue'
import axios from 'axios' // import axios from 'axios'
import hljs from 'highlight.js' // import hljs from 'highlight.js'
import * as echarts from 'echarts' // import * as echarts from 'echarts'
import importElementComponents from './importElement' // import importElementComponents from './importElement'
import importEchartsComponents from './importEchartsComponents' // import importEchartsComponents from './importEchartsComponents'
// 样式cnd // // 样式cnd
import 'github-markdown-css/github-markdown.css' // import 'github-markdown-css/github-markdown.css'
import 'nprogress/nprogress.css' // import 'nprogress/nprogress.css'
// 无需cdn // 无需cdn
import useRouter from './router' import useRouter from './router'
import VueRouter from 'vue-router' import VueRouter from 'vue-router'
...@@ -57,11 +57,11 @@ if (env === 'production') { ...@@ -57,11 +57,11 @@ if (env === 'production') {
// 路由 // 路由
const router = useRouter(Vue, VueRouter) const router = useRouter(Vue, VueRouter)
// 按需引入elementui // // 按需引入elementui
importElementComponents(Vue) // importElementComponents(Vue)
//
// 按需引入echarts // // 按需引入echarts
importEchartsComponents(Vue) // importEchartsComponents(Vue)
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(cookies) Vue.use(cookies)
...@@ -76,7 +76,7 @@ if (env === 'production') { ...@@ -76,7 +76,7 @@ if (env === 'production') {
// cookie // cookie
Vue.prototype.$cookies = cookies Vue.prototype.$cookies = cookies
// axios // axios
Vue.use(axios) // Vue.use(axios)
Vue.prototype.$axios = axios Vue.prototype.$axios = axios
window.$axios_w = axios window.$axios_w = axios
Vue.prototype.$cookies.set('user_session', 'null') Vue.prototype.$cookies.set('user_session', 'null')
......
import Vue from 'vue' // import Vue from 'vue'
import Vuex from 'vuex' // import Vuex from 'vuex'
// import createLogger from '../../../src/plugins/logger' // import createLogger from '../../../src/plugins/logger'
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</template> </template>
<script> <script>
import * as echarts from 'echarts' // import * as echarts from 'echarts'
export default { export default {
name: 'EchartWeather', name: 'EchartWeather',
data () { data () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册