// 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 App from './App' import cookies from 'vue-cookies' import hljs from 'highlight.js' import {router, useRouter} from './router' import importElementComponents from './importElement' import importEchartsComponents from './importEchartsComponents' // 路由 useRouter(Vue) // 按需引入elementui importElementComponents(Vue) // 按需引入echarts importEchartsComponents(Vue) 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.$cookies = cookies Vue.prototype.$cookies.set('user_session', 'null') new Vue({ el: '#app', router, components: { App }, template: '' })