From 21cf5336648725c2c602b012c6387dd715e37522 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Tue, 16 May 2023 22:49:17 +0800 Subject: [PATCH] fix: tooltip custom color error --- components/tooltip/Tooltip.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/components/tooltip/Tooltip.tsx b/components/tooltip/Tooltip.tsx index f19eca483..68e9032a4 100644 --- a/components/tooltip/Tooltip.tsx +++ b/components/tooltip/Tooltip.tsx @@ -241,7 +241,7 @@ export default defineComponent({ computed(() => !injectFromPopover.value), ); return () => { - const { openClassName, overlayClassName, overlayInnerStyle } = props; + const { openClassName, overlayClassName, overlayStyle, overlayInnerStyle } = props; let children = filterEmpty(slots.default?.()) ?? null; children = children.length === 1 ? children[0] : children; @@ -283,6 +283,7 @@ export default defineComponent({ visible: tempVisible, ref: tooltip, overlayClassName: customOverlayClassName, + overlayStyle: { ...arrowContentStyle, ...overlayStyle }, overlayInnerStyle: formattedOverlayInnerStyle, onVisibleChange: handleVisibleChange, onPopupAlign, @@ -296,9 +297,7 @@ export default defineComponent({ ( - - ), + arrowContent: () => , overlay: getOverlay, }} >