From 3317fcbb0cb1abab45f266e7b22d39b323a93c9c Mon Sep 17 00:00:00 2001 From: firefly <31273706+TengFeiHao@users.noreply.github.com> Date: Thu, 6 Jan 2022 11:18:00 +0800 Subject: [PATCH] fix(Popover): fix gap under the triangle (#10148) --- packages/vant/src/popover/index.less | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/vant/src/popover/index.less b/packages/vant/src/popover/index.less index 1648e0eed..9c37fc794 100644 --- a/packages/vant/src/popover/index.less +++ b/packages/vant/src/popover/index.less @@ -83,7 +83,8 @@ bottom: 0; border-top-color: currentColor; border-bottom-width: 0; - transform: translate(-50%, 100%); + transform: translate(-50%, 0%); + margin-bottom: calc(0px - var(--van-popover-arrow-size)); } } @@ -116,7 +117,8 @@ right: 0; border-right-width: 0; border-left-color: currentColor; - transform: translate(100%, -50%); + transform: translate(0%, -50%); + margin-right: calc(0px - var(--van-popover-arrow-size)); } } @@ -149,7 +151,8 @@ left: 0; border-right-color: currentColor; border-left-width: 0; - transform: translate(-100%, -50%); + transform: translate(0%, -50%); + margin-left: calc(0px - var(--van-popover-arrow-size)); } } @@ -182,7 +185,8 @@ top: 0; border-top-width: 0; border-bottom-color: currentColor; - transform: translate(-50%, -100%); + transform: translate(-50%, 0%); + margin-top: calc(0px - var(--van-popover-arrow-size)); } }