diff --git a/nezha-fronted/src/assets/stylus/main.scss b/nezha-fronted/src/assets/stylus/main.scss index 2ffcc1714..b9c966ed7 100644 --- a/nezha-fronted/src/assets/stylus/main.scss +++ b/nezha-fronted/src/assets/stylus/main.scss @@ -1683,7 +1683,10 @@ li{ color: $global-text-color-active; background-color: $dropdown-hover-background-color !important; } - +.el-select-dropdown__item.is-disabled:hover{ + background-color: #FFF; + color: #C0C4CC; +} .el-button--text, .el-button--text:focus, .el-button--text:hover, diff --git a/nezha-fronted/src/components/common/project/topologyL5.vue b/nezha-fronted/src/components/common/project/topologyL5.vue index 9b560311d..c92a31863 100644 --- a/nezha-fronted/src/components/common/project/topologyL5.vue +++ b/nezha-fronted/src/components/common/project/topologyL5.vue @@ -245,7 +245,9 @@
+ @mouseout="tooltipOut" + ref="topoTooltip" + >
@@ -1263,7 +1265,27 @@ this.tooltipPosition.show=false; setTimeout(()=>{ this.tooltipPosition.show=true; - },50); + let ePosition=window.ePosition; + let boxWidth=document.getElementsByClassName('page')[0].offsetWidth; + let boxHeight=document.getElementsByClassName('page')[0].offsetHeight; + this.tooltipPosition.left=ePosition.layerX+20; + this.tooltipPosition.top=ePosition.layerY; + this.$nextTick(()=>{ + if(this.$refs['topoTooltip']){ + // console.log(boxWidth,ePosition.layerX,this.$refs['topoTooltip'].offsetWidth,boxHeight,ePosition.layerY,); + if((boxWidth/2)>ePosition.layerX){ + this.tooltipPosition.left=ePosition.layerX+20; + }else { + this.tooltipPosition.left=ePosition.layerX - 20 - this.$refs['topoTooltip'].offsetWidth; + } + if(boxHeight>(ePosition.layerY+this.$refs['topoTooltip'].offsetHeight)){ + this.tooltipPosition.top=ePosition.layerY; + }else { + this.tooltipPosition.top=ePosition.layerY - this.$refs['topoTooltip'].offsetHeight; + } + } + }) + },100); break; case 'moveOutNode': case 'moveOutLine': @@ -1273,13 +1295,13 @@ this.timer3=setTimeout(()=>{ this.tooltipPosition.show=false; this.timer3=null - },150) + },50) }else{ clearTimeout(this.timer3); this.timer3=setTimeout(()=>{ this.tooltipPosition.show=false; this.timer3=null - },150) + },50) } break; } @@ -1830,8 +1852,7 @@ if(this.tooltipPosition.show){ return } - this.tooltipPosition.top=e.offsetY; - this.tooltipPosition.left=e.offsetX+20; + window.ePosition=e }, tooltipOver(){ clearTimeout(this.timer3); @@ -1841,7 +1862,7 @@ this.timer3=setTimeout(()=>{ this.tooltipPosition.show=false; this.timer3=null - },150) + },50) }, nodeDefaultWidth(nodeName){ switch(nodeName){