import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App.vue';
import router from './router';
import store from './store/index';
import "swiper/dist/css/swiper.css";
import './style/_base.scss';
import * as filters from '@/filter/index.js';
import directives from '@/directive/index.js';
import message from '@/utils/message.js';
// import interceptor from '@/interceptor/index.js';
// import '@/permission'; // permission control
import VScaleScreen from 'v-scale-screen';
import { getDicts } from "@/api/system/dict/data";
import { selectDictLabel } from "@/utils/common";
// 过滤器
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key]);
});

// 自定义指令
Object.keys(directives).forEach(key => {
  Vue.directive(key, directives[key]);
});

// 消息提醒
Object.keys(message).forEach(key => {
  Vue.prototype['$' + key] = message[key];
});
// interceptor.init();
Vue.use(ElementUI);
// Vue.use(Select);
// Vue.use(Option);
// Vue.use(Input);
// Vue.use(Pagination);
// Vue.use(Button);
// Vue.use(Dropdown);
Vue.use(VScaleScreen);

Vue.prototype.selectDictLabel = selectDictLabel

// 全局方法挂载
Vue.prototype.getDicts = getDicts
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');
