import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/css/reset.scss'
import echarts from "echarts"
import 'echarts/map/js/china'
import 'echarts/map/js/province/zhejiang'
import './assets/js/huzhou'
import './assets/js/changxing'
import './assets/js/lvshan'
import 'echarts-gl'

// import VueAMap from 'vue-amap';
// Vue.use(VueAMap);
// VueAMap.initAMapApiLoader({
//   key: '89472e3ecbff0eb8b53bafd80959a480',
//   plugin: ['AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.PlaceSearch', 'AMap.Autocomplete', 'AMap.Geolocation', 'AMap.Geocoder'],
//   v: '1.4.4',
//   uiVersion: '1.0'
// })

Vue.prototype.$echarts = echarts

Vue.config.productionTip = false

new Vue({
  router,
  store,
  mounted() {
    var timer
    window.onresize = () => {
        if(timer) clearTimeout(timer)
        timer = setTimeout(() => {
            console.log('6666')
            this.$echarts.resize()
        }, 500)
    }
  },
  render: h => h(App)
}).$mount('#app')
