import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Element from 'element-ui'
import myCharts from 'echarts'
import dataV from '@jiaminghi/data-view'
import 'cesium/Build/Cesium/Widgets/widgets.css'
import * as Cesium from 'cesium'
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(Element)
Vue.use(dataV)
Vue.prototype.$echarts = myCharts
Vue.prototype.$Cesium = Cesium
Vue.config.productionTip = false
window.Cesium = Cesium
new Vue({
router,
store,
data: function () {
return {
viewer: ''
}
},
render: h => h(App)
}).$mount('#app')
export default {
name: "CesiumContainer",
data() {
return {
viewer: this.$root.viewer,
};
},
methods:{
initCesium() {
var Cesium = this.$Cesium;
var viewer = new Cesium.Viewer("cesiumContainer",);
this.viewer = viewer;
this.$root.viewer = viewer;
this.Cesium = Cesium;
},
},
mounted() {
this.initCesium();
},
};
export default {
data() {
return {
viewer:this.$root.viewer,
Cesium:this.$Cesium
};
},
methods: {
},
mounted() {
}
};