import Vue from 'vue' import App from '@/App.vue' import router from '@/router' // api: https://github.com/vuejs/vue-router import store from '@/store' // api: https://github.com/vuejs/vuex import VueCookie from 'vue-cookie' // api: https://github.com/alfhen/vue-cookie import '@/icons' // api: http://www.iconfont.cn/ import '@/assets/scss/index.scss' import { isAuth } from '@/utils' import element from '@/element-ui' import httpRequest from '@/utils/httpRequest' // api: https://github.com/axios/axios Vue.prototype.$http = httpRequest // ajax请求方法 Vue.use(element); Vue.use(VueCookie); Vue.config.productionTip = false // 挂载全局 Vue.prototype.isAuth = isAuth // 权限方法 Vue.prototype.$shortcut = { notFound() { return router.replace({ name: "404" }) } } as Record // 保存整站vuex本地储存初始状态 // process.env.VUE_APP_RESOURCES_URL['storeState'] = cloneDeep(store.state) /* eslint-disable no-new */ new Vue({ el: '#app', router, store, render: h => h(App) })