diff --git a/nezha-fronted/src/components/common/alert/alertLabel.vue b/nezha-fronted/src/components/common/alert/alertLabel.vue index 166c68258..1f43303a2 100644 --- a/nezha-fronted/src/components/common/alert/alertLabel.vue +++ b/nezha-fronted/src/components/common/alert/alertLabel.vue @@ -776,30 +776,14 @@ export default { topOffSetView = topOffSet } if (position.top > clientHeight / 2) { - if (this.type === 'user') { - labelPosition = { - // user info 距离 - left: `${position.left + position.width / 3 + leftOffSet}px`, - top: `${position.top - this.heightList - topOffSetView}px` - } - } else { - labelPosition = { - left: `${position.left + position.width + leftOffSet}px`, - top: `${position.top - this.heightList - topOffSetView}px` - } + labelPosition = { + left: `${position.left + position.width + leftOffSet}px`, + top: `${position.top - this.heightList - topOffSetView}px` } } else { - if (this.type === 'user') { - // user info 距离 - labelPosition = { - left: `${position.left + position.width / 3 + leftOffSet}px`, - top: `${position.top + topOffSet}px` - } - } else { - labelPosition = { - left: `${position.left + position.width + leftOffSet}px`, - top: `${position.top + topOffSet}px` - } + labelPosition = { + left: `${position.left + position.width + leftOffSet}px`, + top: `${position.top + topOffSet}px` } } if (position.left > clientWidth / 2) {