fix(transfer): background overflow when last item on current page is selected (#51884)
Some checks are pending
Publish Any Commit / build (push) Waiting to run
🔀 Sync mirror to Gitee / mirror (push) Waiting to run
✅ test / lint (push) Waiting to run
✅ test / test-react-legacy (16, 1/2) (push) Waiting to run
✅ test / test-react-legacy (16, 2/2) (push) Waiting to run
✅ test / test-react-legacy (17, 1/2) (push) Waiting to run
✅ test / test-react-legacy (17, 2/2) (push) Waiting to run
✅ test / test-node (push) Waiting to run
✅ test / test-react-latest (dom, 1/2) (push) Waiting to run
✅ test / test-react-latest (dom, 2/2) (push) Waiting to run
✅ test / test-react-latest-dist (dist, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist, 2/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 1/2) (push) Blocked by required conditions
✅ test / test-react-latest-dist (dist-min, 2/2) (push) Blocked by required conditions
✅ test / test-coverage (push) Blocked by required conditions
✅ test / build (push) Waiting to run
✅ test / test lib/es module (es, 1/2) (push) Waiting to run
✅ test / test lib/es module (es, 2/2) (push) Waiting to run
✅ test / test lib/es module (lib, 1/2) (push) Waiting to run
✅ test / test lib/es module (lib, 2/2) (push) Waiting to run
👁️ Visual Regression Persist Start / test image (push) Waiting to run

* 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: 提取变量
This commit is contained in:
ayang 2024-12-06 21:47:26 +08:00 committed by GitHub
parent 2a5408ded2
commit f7fbfc85e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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<TransferToken> = (token: TransferToken
colorText,
controlItemBgActiveHover,
} = token;
const contentBorderRadius = unit(token.calc(borderRadiusLG).sub(lineWidth).equal());
return {
display: 'flex',
@ -221,6 +222,7 @@ const genTransferListStyle: GenerateStyle<TransferToken> = (token: TransferToken
padding: 0,
overflow: 'auto',
listStyle: 'none',
borderRadius: `0 0 ${contentBorderRadius} ${contentBorderRadius}`,
'&-item': {
display: 'flex',