From f7fbfc85e54b6d78bbc36efee0cf69a12296e5e0 Mon Sep 17 00:00:00 2001 From: ayang <75017711+ayangweb@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:47:26 +0800 Subject: [PATCH] fix(transfer): background overflow when last item on current page is selected (#51884) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(transfer): fix the issue of the background overflowing when the last item on the current page is selected * refactor: solve with borderRadius * refactor: 圆角减去 1px * refactor: 提取变量 --- components/transfer/style/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/transfer/style/index.ts b/components/transfer/style/index.ts index c4c464b6ed..e6a0c842bb 100644 --- a/components/transfer/style/index.ts +++ b/components/transfer/style/index.ts @@ -1,7 +1,7 @@ import { unit } from '@ant-design/cssinjs'; import type { CSSObject } from '@ant-design/cssinjs'; -import { resetComponent, resetIcon, textEllipsis, operationUnit } from '../../style'; +import { operationUnit, resetComponent, resetIcon, textEllipsis } from '../../style'; import type { FullToken, GenerateStyle, GetDefaultToken } from '../../theme/internal'; import { genStyleHooks, mergeToken } from '../../theme/internal'; @@ -139,6 +139,7 @@ const genTransferListStyle: GenerateStyle = (token: TransferToken colorText, controlItemBgActiveHover, } = token; + const contentBorderRadius = unit(token.calc(borderRadiusLG).sub(lineWidth).equal()); return { display: 'flex', @@ -221,6 +222,7 @@ const genTransferListStyle: GenerateStyle = (token: TransferToken padding: 0, overflow: 'auto', listStyle: 'none', + borderRadius: `0 0 ${contentBorderRadius} ${contentBorderRadius}`, '&-item': { display: 'flex',