fix: Modify Tooltip placements config (#37960)

* fix: Modify Tooltip placements config

* fix: Modify Tooltip placements verticalArrowShift

* fix: sync tooltip & popover arrow offset

* fix: modify dropdown arrow width

---------

Co-authored-by: afc163 <afc163@gmail.com>
This commit is contained in:
hongzzz 2024-08-11 22:07:34 +08:00 committed by GitHub
parent 4bc4d7a46e
commit 59fef7d790
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View File

@ -38,7 +38,7 @@ export function getOverflowOptions(autoAdjustOverflow?: boolean | AdjustOverflow
export default function getPlacements(config: PlacementsConfig) {
const {
arrowWidth = 4,
arrowWidth = 5,
horizontalArrowShift = 16,
verticalArrowShift = 8,
autoAdjustOverflow,

View File

@ -214,6 +214,9 @@ const Tooltip = React.forwardRef<unknown, TooltipProps>((props, ref) => {
return (
builtinPlacements ||
getPlacements({
arrowWidth: 11,
horizontalArrowShift: 16,
verticalArrowShift: 12,
arrowPointAtCenter,
autoAdjustOverflow,
})

View File

@ -8,8 +8,8 @@
@tooltip-arrow-rotate-width: sqrt(@tooltip-arrow-width * @tooltip-arrow-width * 2) +
@tooltip-arrow-shadow-width * 2;
@tooltip-arrow-offset-vertical: 5px; // 8 - 3px
@tooltip-arrow-offset-horizontal: 13px; // 16 - 3px
@tooltip-arrow-offset-vertical: 12px;
@tooltip-arrow-offset-horizontal: 16px;
// Base class
.@{tooltip-prefix-cls} {