From 1b561bbf4cc9cc4c4039bb5892e0380b0e165e22 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Tue, 29 Sep 2020 11:14:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8F=90=E7=A4=BA=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/plugins/Tips/Tips.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/plugins/Tips/Tips.vue b/src/renderer/plugins/Tips/Tips.vue index d93b8eee..b46408df 100644 --- a/src/renderer/plugins/Tips/Tips.vue +++ b/src/renderer/plugins/Tips/Tips.vue @@ -40,10 +40,10 @@ export default { const offsetHeight = containerHeight - top - tipsHeight let x = 0 let y = 0 - if (tipsWidth < containerWidth / 2 && containerWidth > tipsWidth && offsetWidth < 5) { + if (tipsWidth < left && containerWidth > tipsWidth && offsetWidth < 5) { x = -tipsWidth - 12 } - if (tipsHeight < containerHeight / 2 && containerHeight > tipsHeight && offsetHeight < 5) { + if (tipsHeight < top && containerHeight > tipsHeight && offsetHeight < 5) { y = -tipsHeight - 8 } return `${x}px, ${y}px`