fix: #8064 修复 tree checkbox 垂直对齐问题

- 移除不必要的 checkbox vertical margin,因为 checkbox 样式已将自身设置为 align-self: center;
pull/8065/head
金振祖 2025-03-12 19:23:01 +08:00
parent aa211fd789
commit 4c14864eff
1 changed files with 0 additions and 2 deletions

View File

@ -65,7 +65,6 @@ type TreeToken = DerivativeToken & {
export const genBaseStyle = (prefixCls: string, token: TreeToken): CSSObject => { export const genBaseStyle = (prefixCls: string, token: TreeToken): CSSObject => {
const { treeCls, treeNodeCls, treeNodePadding, treeTitleHeight } = token; const { treeCls, treeNodeCls, treeNodePadding, treeTitleHeight } = token;
const treeCheckBoxMarginVertical = (treeTitleHeight - token.fontSizeLG) / 2;
const treeCheckBoxMarginHorizontal = token.paddingXS; const treeCheckBoxMarginHorizontal = token.paddingXS;
return { return {
@ -260,7 +259,6 @@ export const genBaseStyle = (prefixCls: string, token: TreeToken): CSSObject =>
[`${treeCls}-checkbox`]: { [`${treeCls}-checkbox`]: {
top: 'initial', top: 'initial',
marginInlineEnd: treeCheckBoxMarginHorizontal, marginInlineEnd: treeCheckBoxMarginHorizontal,
marginBlockStart: treeCheckBoxMarginVertical,
}, },
// >>> Title // >>> Title