import Vue from "vue";
import App from "./App.vue";
import ElementUI from "element-ui";

import store from "./store";
import router from "./router";
import axios from "axios";
import api from "./http/api";
import "./http/common/base";
import { debounce } from "./utils/common";
import * as echarts from "echarts";

import "@/styles/element-variables.scss";
// 引入vxe-table
import VXETable from 'vxe-table';
import 'vxe-table/lib/style.css';

import "@/styles/common.scss";

import "font-awesome/css/font-awesome.min.css";
import './styles/XueKeWangQuestionStyles.css'
import './assets/font2/iconfont.css'

Vue.use(VXETable);
// 解决el-radio报错
Vue.directive('removeAriaHidden', {
  bind(el, binding) {
    let ariaEls = el.querySelectorAll('.el-radio__original');
    ariaEls.forEach((item) => {
      item.removeAttribute('aria-hidden');
    });
  }
});
import Header from "@/views/layout/components/Header.vue";
import Footer from "@/views/layout/components/Footer.vue";
Vue.component("Header", Header);
Vue.component("Footer", Footer);

import InfiniteLoading from "vue-infinite-loading";
import lottie from "vue-lottie";
import global from "@/utils/global.js";
Vue.prototype.$global = global;

Vue.use(InfiniteLoading);
Vue.component("lottie", lottie);
const _ResizeObserver = window.ResizeObserver;
ElementUI.Dialog.props.closeOnClickModal.default = false;
window.ResizeObserver = class ResizeObserver extends _ResizeObserver {
  constructor(callback) {
    callback = debounce(callback, 16);
    super(callback);
  }
};

Vue.config.productionTip = false;
Vue.use(ElementUI, {
  table: {
    resizable: false,
  },
});
Vue.prototype.$axios = axios;
Vue.prototype.$api = api;
Vue.prototype.$echarts = echarts;

new Vue({
  el: "#app",
  router,
  store,
  render: (h) => h(App),
});
