import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI);

// 导入全局样式表
import './assets/css/global.css'
import './permission' // permission control
Vue.config.productionTip = false

// 引入vue-amap
import VueAMap from 'vue-amap';
Vue.use(VueAMap);

// 下拉框滚动加载
import loadMore from './utils/select.js'
Vue.use(loadMore)

import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts;

// 初始化vue-amap
VueAMap.initAMapApiLoader({
  key: '313da1394834ef78b8ed910155f9a486',
  plugin: ['AMap.Geocoder', 'AMap.GraspRoad', 'AMap.ReverseGeocode', 'AMap.Geolocation',
  'AMap.TrackBack'], // 添加您需要的插件
});

window._AMapSecurityConfig = {
  securityJsCode: "73b1d7a6bb91f9f799a4da7aef2ee20e",
}

Vue.directive('removeHidden', {
  bind(el) {
    // 查找所有匹配的元素
    let ariaEl = el.querySelectorAll('.el-radio__original[aria-hidden]');
    ariaEl.forEach((item) => {
      // 移除 aria-hidden 属性
      item.removeAttribute('aria-hidden');
    });
  }
});
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
