1.element ui 的引入 npm install --save element-ui
2.安装js-cookie npm install --save js-cookie
在mian.js里引入依赖 import Cookies from 'js-cookie';
3.插件axios npm install axios --save import axios from 'axios'
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import echarts from 'echarts'
import VueRouter from 'vue-router'
import axios from 'axios'
import VueResource from 'vue-resource'
Vue.use(VueResource)
Vue.use(ElementUI)
Vue.use(echarts)
Vue.use(VueRouter)
//定义全局变量
Vue.prototype.$axios=axios;
Vue.prototype.$base_url = '';
Vue.prototype.$echarts=echarts
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
})