From acbd5016a917a0a8874964e3cd20535849ba7730 Mon Sep 17 00:00:00 2001 From: likexuan Date: Thu, 23 Jun 2022 16:05:24 +0800 Subject: [PATCH] =?UTF-8?q?fix=20:=20user=20=E9=A1=B5=E9=9D=A2=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E6=A1=86=E4=BD=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/alert/alertLabel.vue | 28 ++++--------------- 1 file changed, 6 insertions(+), 22 deletions(-) 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) {