fix:修改 鼠标悬浮非内置标签 alertLabel 不消失的问题

This commit is contained in:
zhangyu
2023-01-09 17:15:10 +08:00
parent 3c2ce736a4
commit 1cf6fdbeb3
3 changed files with 10 additions and 3 deletions

View File

@@ -451,7 +451,7 @@
></i ></i
>&nbsp; >&nbsp;
<span>{{ <span>{{
alertLabelData && alertLabelData.asset.name alertLabelData && alertLabelData.asset
? alertLabelData.asset.name ? alertLabelData.asset.name
: "--" : "--"
}}</span> }}</span>
@@ -763,6 +763,13 @@ export default {
computed: { computed: {
calcPosition () { calcPosition () {
return function (position) { return function (position) {
if (this.$refs.alertLabels) {
this.heightList = this.$refs.alertLabels.getBoundingClientRect().height
this.boxWidth = this.$refs.alertLabels.getBoundingClientRect().width
} else {
this.heightList = 0
this.boxWidth = 0
}
const clientHeight = const clientHeight =
document.body.clientHeight < document.documentElement.clientHeight document.body.clientHeight < document.documentElement.clientHeight
? document.body.clientHeight ? document.body.clientHeight

View File

@@ -16,10 +16,10 @@ export default {
methods: { methods: {
// label 鼠标划入 // label 鼠标划入
labelHover (item, type, loading, isUseType = true, e) { labelHover (item, type, loading, isUseType = true, e) {
clearTimeout(this.timer)
if (this.labelToolTipDis(type)) { if (this.labelToolTipDis(type)) {
return return
} }
clearTimeout(this.timer)
if (isUseType) { if (isUseType) {
if (e) { if (e) {
const dom = e.currentTarget const dom = e.currentTarget

View File

@@ -53,7 +53,7 @@
:type="'link'" :type="'link'"
></delete-button> ></delete-button>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item :disabled="batchDeleteObjs.length==0" :class="'nz-el-dropdown-menu-item'"> <el-dropdown-item :disabled="batchDeleteObjs.length==0">
<div id="alert-msg-batch-ack" v-has="'alertMessage_expired'" @click="batchAck"><i class="nz-icon nz-icon-queren"></i>{{$t('overall.batchAck')}}</div> <div id="alert-msg-batch-ack" v-has="'alertMessage_expired'" @click="batchAck"><i class="nz-icon nz-icon-queren"></i>{{$t('overall.batchAck')}}</div>
</el-dropdown-item> </el-dropdown-item>
</div> </div>