fix:优化 alertmessage tooltip 显示位置问题

This commit is contained in:
zhangyu
2021-12-31 10:15:36 +08:00
parent f297983554
commit 2ccd8ff66c
4 changed files with 15 additions and 37 deletions

View File

@@ -34,16 +34,11 @@
<template slot-scope="scope" :column="item">
<template v-if="item.prop === 'alertRule'">
<div v-if="scope.row.alertRule&&scope.row.alertRule.name" >
<el-popover
placement="right-start"
popper-class="alert-message-tooltip"
style="position: relative"
@show="alertMessageHover(scope.row.alertRule, true)"
@hide="alertMessageHover(scope.row.alertRule, false)"
trigger="hover">
<alertRuleInfo v-if="scope.row.alertRule.loading" :id="scope.row.alertRule.id" :severity-data="severityData" :that="scope.row.alertRule" @showText="$emit('showText',scope.row)"></alertRuleInfo>
<span slot="reference">{{scope.row.alertRule?scope.row.alertRule.name : '--'}}</span>
</el-popover>
<span
@mouseenter="alertMessageHover(scope.row.alertRule, true, $event)"
@mouseleave="alertMessageHover(scope.row.alertRule, false)"
>{{scope.row.alertRule?scope.row.alertRule.name : '--'}}</span>
<alertRuleInfo v-if="scope.row.alertRule.loading" :id="scope.row.alertRule.id" :severity-data="severityData" :that="scope.row.alertRule" @showText="$emit('showText',scope.row)"></alertRuleInfo>
</div>
<template v-else>-</template>
</template>