Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu组件submenu css max-height: 计算问题 #3222

Open
menghaor opened this issue Nov 21, 2024 · 4 comments
Open

Menu组件submenu css max-height: 计算问题 #3222

menghaor opened this issue Nov 21, 2024 · 4 comments
Labels
💭 discussion we are discussing

Comments

@menghaor
Copy link

tdesign-react 版本

^1.9.3

重现链接

No response

重现步骤

No response

期望结果

No response

实际结果

No response

框架版本

18.3.1

浏览器版本

No response

系统版本

No response

Node版本

No response

补充说明

image

Copy link
Contributor

👋 @menghaor,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@uyarn
Copy link
Collaborator

uyarn commented Nov 24, 2024

问题是什么?

@yiyungent
Copy link

yiyungent commented Dec 1, 2024

+1, 改变 SubMenuMenuItem 的高度,会导致 SubMenu 展开时的 max-height 计算错误,从而导致最底部部分被遮挡
@uyarn

目前我这么临时解决

const MenuItemPlus = (props: any) => {
  return (
    <MenuItem
      {...props}
      style={{
        height: "52px",
        lineHeight: "52px",
        color: "#222",
        fontWeight: 300,
        fontSize: "18px",
      }}
    />
  );
};

<SubMenu
  title="基础信息"
  value="2-1"
  icon={<ServerIcon />}
  className={css`
    &.t-is-opened {
      ul.t-menu__sub {
        max-height: max-content !important;
      }
    }
  `}
>
  <MenuItemPlus value="2-1-1">基础列表项</MenuItemPlus>
  <MenuItemPlus value="2-1-2">卡片列表项</MenuItemPlus>
  <MenuItemPlus value="2-1-3">筛选列表项</MenuItemPlus>
  <MenuItemPlus value="2-1-4">树状筛选列表项</MenuItemPlus>
</SubMenu>

@cllee1214
Copy link

遇到了同样的问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 discussion we are discussing
Projects
None yet
Development

No branches or pull requests

5 participants