import Vue from 'vue'
import Element from 'element-ui'
import ECharts from 'vue-echarts'
import XMIcon from '@/components/XMIcon.vue'
import XMRightLay from '@/components/XMRightLay.vue'
import XMSearchForm from '@/components/XMSearchForm.vue'
import RichEditor from '@/components/RichEditor.vue'
import SelectBuilding from '@/components/SelectBuilding'

import App from './App.vue'
import router from './router'
import store from './store'
import 'normalize.css/normalize.css'
import './theme.scss'
import './assets/iconfont.css'
import VueAMap from 'vue-amap'


// import tinymce from 'tinymce/tinymce'
// import Editor from '@tinymce/tinymce-vue'
// import 'tinymce/themes/modern/theme'

Vue.use(Element)

Vue.config.productionTip = false
Vue.component('v-chart', ECharts)
Vue.component('xm-icon', XMIcon)
Vue.component('xm-rtl', XMRightLay)
Vue.component('xm-search', XMSearchForm)
Vue.component('rich-editor', RichEditor)
Vue.component('select-building', SelectBuilding)
Vue.use(VueAMap)

VueAMap.initAMapApiLoader({
  key: 'f0d1d4f82432504003ebf46e5e36ff03',
  plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
  // 默认高德 sdk 版本为 1.4.4
  v: '1.4.4'
})

new Vue({
  render: h => h(App),
  router,
  store,
}).$mount('#app')
