Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions packages/components/menu/SubMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import useControlled from '../hooks/useControlled';
import useDomRefCallback from '../hooks/useDomRefCallback';
import useRipple from '../hooks/useRipple';
import { Popup } from '../popup';
import { calculatePaddingLeft } from './_util/calculatePaddingLeft';
import { checkIsMenuGroup, checkIsSubMenu } from './_util/checkMenuType';
import checkSubMenuChildrenActive from './_util/checkSubMenuChildrenActive';
import { getSubMenuMaxHeight } from './_util/getSubMenuChildStyle';
Expand Down Expand Up @@ -73,9 +72,6 @@ const SubAccordion: FC<SubMenuWithCustomizeProps> = (props) => {
return isExpand;
}, [disabled, isPopUp, open, isExpand]);

// 计算左边距,兼容多层级子菜单
const menuPaddingLeft = calculatePaddingLeft(level - 1);

const fakeArrowStyle = isPopUp && level > 1 ? { transform: 'rotate(-90deg)' } : {};

const contentRef = useRef<HTMLUListElement>(null);
Expand Down Expand Up @@ -133,7 +129,6 @@ const SubAccordion: FC<SubMenuWithCustomizeProps> = (props) => {
style={
{
...childStyle,
'--padding-left': `${menuPaddingLeft}px`,
overflow: 'hidden',
} as React.CSSProperties
}
Expand Down
6 changes: 6 additions & 0 deletions packages/tdesign-react/.changelog/pr-4367.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
pr_number: 4367
contributor: HaixingOoO
---

- chore(Menu): 修改内联的 Menu 样式为样式类实现,移除过于宽泛的 --padding-left 变量,方便覆盖修改 @HaixingOoO ([#4367](https://github.com/Tencent/tdesign-react/pull/4367))
26 changes: 13 additions & 13 deletions test/snap/__snapshots__/csr.test.jsx.snap

Large diffs are not rendered by default.

Loading
Loading