/*
 * @Descripttion: 当前组件信息
 * @version: 1.0.0
 * @Author: 无尘
 * @Date: 2020-07-16 16:37:05
 * @LastEditors: 无尘
 * @LastEditTime: 2020-07-20 14:28:50
 */
import 'babel-polyfill';
import 'element-ui/lib/theme-chalk/index.css';
import '@/styles/reset.less';
import '@/styles/font/iconfont.css';

import Vue from 'vue';
import VueRouter from 'vue-router';
import axios from 'axios';
import ElementUI from 'element-ui';
import App from './App.vue';
import router from './router';
import filters from '@/filters/index.js';
// import { isRequest, itemCode } from '@/config';

Vue.use(VueRouter);
Vue.use(ElementUI);
// 请求头这种添加请求标识
// Object.assign(axios.defaults.headers.common, isRequest);
axios.defaults.withCredentials = true;

Vue.prototype.axios = axios;

// 开启vue devtools.....
/* eslint-disable-next-line */
Vue.config.devtools = process.env.NODE_ENV !== 'production';
Vue.config.productionTip = false;

// 全局注册过滤器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key]);
});

new Vue({
  router,
  render: h => h(App)
}).$mount('#app');
