import Vue from 'vue'
import LivePlayDialog from '@/components/live-play-dialog.vue'
const PopupBox = Vue.extend(LivePlayDialog)
let instance
LivePlayDialog.install = function (data) {
console.log(data, 222222)
instance = new PopupBox({
propsData: {
featureGraphicAttributes: data
}
}).$mount()
instance.$nextTick(() => {
const { mapView } = window
mapView.popup.content = instance.$el
})
}
LivePlayDialog.unInstall = function() {
if (instance) {
instance.$destroy()
instance = null
}
}
export default LivePlayDialog
import LivePlay from '@/utils/map/live-play.js'
Vue.prototype.$livePlay = LivePlay
this.$livePlay.install(data)
this.$livePlay.unInstall(data)