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: '7693f1af3c28862be81de4258da53ce1',
  plugin: ['AMap.Geocoder', 'AMap.GraspRoad', 'AMap.ReverseGeocode', 'AMap.Geolocation',
  'AMap.TrackBack'], // 添加您需要的插件
});

window._AMapSecurityConfig = {
  securityJsCode: "1dd8f39efac47571f99e11fe4154e927",
}

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')
