// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import './plugins/axios' import App from './App' import 'element-ui/lib/theme-chalk/index.css' import cookies from 'vue-cookies' import 'github-markdown-css/github-markdown.css' import hljs from 'highlight.js' import 'highlight.js/styles/github.css' import router from './router' import importElementComponents from './importElement' import importEchartsComponents from './importEchartsComponents' // 按需引入elementui importElementComponents() //按需引入echarts importEchartsComponents() Vue.config.productionTip = false Vue.use(cookies) // Vue.use(hljs) Vue.directive('highlight', function(el) { const blocks = el.querySelectorAll('pre code') blocks.forEach(block => { hljs.highlightBlock(block) }) }) // Vue.prototype.http = axios; Vue.prototype.$cookies = cookies Vue.prototype.$cookies.set("user_session", "null") new Vue({ el: '#app', router, components: { App }, template: '' })