|
@@ -714,19 +714,15 @@ export default {
|
|
|
},
|
|
|
/**
|
|
|
* @description 处理popover显隐
|
|
|
- * 当点击位置不在canvas内部时 ( 如点击 页面空白,图例,楼层,设备设施左侧列表项时),将popover的display置为none,
|
|
|
- * 当点击位置在canvas内部时,将popover的display设置为'block'
|
|
|
+ * 当点击位置不在canvas内部时 ( 如点击 页面空白,图例,楼层,设备设施左侧列表项时),将visible置为false,隐藏popover
|
|
|
*/
|
|
|
handlePopover(e) {
|
|
|
- if (this.$refs.graphy.contains(e.target)) {
|
|
|
- if (this.$refs.popover && this.$refs.popover.popperElm) {
|
|
|
- this.$refs.popover.popperElm.style.display = 'block'
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (this.$refs.popover && this.$refs.popover.popperElm) {
|
|
|
- this.$refs.popover.popperElm.style.display = 'none'
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ if(!this.$refs.graphy.contains(e.target)){
|
|
|
+ console.log(1111)
|
|
|
+ this.visible = false
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
},
|
|
|
},
|
|
|
watch: {
|