main.js 1.18 KB
// 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 App from "./App.vue"
import router from "./router"
import store from "./store"
import i18n from "./i18n/i18n"
import globalPlugin from "./utils/global"
import permission from "./directive/permission/button"
import NProgress from "nprogress"
import "babel-polyfill"
import '@/components/globalComponents.js'
import '@/plugins/echarts.js'

import "nprogress/nprogress.css"
import "font-awesome/css/font-awesome.css"
import "element-ui/lib/theme-chalk/index.css"
import "@/router/permission"
import "@/assets/css/base.css"
import "@/assets/css/index.scss"

Vue.config.productionTip = false
Vue.use(ElementUI)
Vue.use(globalPlugin)
Vue.use(permission)

NProgress.inc(0.2)
NProgress.configure({ easing: "ease", speed: 500, showSpinner: false })

import "@/mock/index.js"

Array.prototype.remove = function (val) {
  var index = this.indexOf(val);
  if (index > -1) {
    this.splice(index, 1);
  }
};
/* eslint-disable no-new */
new Vue({
  el: "#app",
  router,
  store,
  i18n,
  render: h => h(App),
})