From 6af5bd768878fcfbb9a155341ae656f53fd30403 Mon Sep 17 00:00:00 2001 From: Windson97 Date: Thu, 29 May 2025 09:31:20 +0800 Subject: [PATCH] fix(tooltip): when arrowPointAtCenter is true,the arrow not in center --- components/_util/placements.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/_util/placements.ts b/components/_util/placements.ts index c96ff90ee3..ff62b94094 100644 --- a/components/_util/placements.ts +++ b/components/_util/placements.ts @@ -94,11 +94,18 @@ export default function getPlacements(config: PlacementsConfig) { }, }; Object.keys(placementMap).forEach(key => { + const centerIndex = key.search(/[A-Z]/); + let pointsKey: Direction = key; + if (centerIndex > 0) { + pointsKey = key.substring(0, centerIndex); + } placementMap[key] = arrowPointAtCenter ? { ...placementMap[key], overflow: getOverflowOptions(autoAdjustOverflow), + points: placementMap[pointsKey].points, targetOffset, + offset: targetOffset, } : { ...placements[key],