From 1a8cd6fa78e43a28b5876c97dd7c9d02e7b7b09c Mon Sep 17 00:00:00 2001 From: shenjunjian <40288193@qq.com> Date: Thu, 7 Nov 2024 23:41:12 -0800 Subject: [PATCH] fix(popper): fix tiny-popper's style --- packages/theme/src/base/reset.less | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/theme/src/base/reset.less b/packages/theme/src/base/reset.less index dd5e9f6f7f..eb237cdff0 100644 --- a/packages/theme/src/base/reset.less +++ b/packages/theme/src/base/reset.less @@ -177,24 +177,29 @@ } } +// 没有箭头的场景, select/ userlink /roles/ dept 等默认距离4 px .tiny-popper { &[x-placement^='top'] { margin-bottom: 4px; } + &[x-placement^='bottom'] { margin-top: 4px; } + &[x-placement^='right'] { margin-left: 4px; } + &[x-placement^='left'] { margin-right: 4px; } } - -.tiny-popconfirm-popover, -.tiny-tooltip__popper { +// 有箭头的场景,统一规范所有样式 +.tiny-popconfirm-popover:has(.popper__arrow), +.tiny-popper:has(.popper__arrow), +.tiny-tooltip__popper:has(.popper__arrow) { .popper__arrow { position: absolute; display: block;