// 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 ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' import App from './App' import store from './store' import router from './router' Vue.config.productionTip = false // 引入第三方包 import wsk from './utils/web-socket' // 引入 websocket import dayjs from 'dayjs' // import axios from 'axios' import qs from 'qs' import * as echarts from 'echarts' import { SVGRenderer, CanvasRenderer } from 'echarts/renderers' import _ from 'lodash' // 挂载第三方包 echarts.use([SVGRenderer, CanvasRenderer]) Vue.prototype.$wsk = wsk // 将 websocket 挂载到 Vue 全局上,方便每个页面使用 Vue.prototype.$dayjs = dayjs Vue.prototype._ = _ Vue.prototype.$qs = qs // Vue.prototype.$axios = axios Vue.prototype.$echarts = echarts Vue.use(ElementUI) // 引入自定义指令 import './utils/debounce' // 按钮防抖 /* eslint-disable no-new */ new Vue({ el: '#app', store, router, components: { App }, template: '', })