We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://react-5tpyk5.stackblitz.io
hover 到 “有Before” 菜单时,没有 tooltip 提示; hover 到 “没有Before” 菜单时,有 tooltip 提示;
不需要单独配置 css 样式,让 tooltip 生效
需要单独配置 css 样式,让 tooltip 生效
antd 内部,会给 menu-item a 加上::before 的样式的蒙层,导致 hover 时,无法选中 tooltip 中的 trigger, 就不会触发 tooltip 提示。 当去掉这个 ::before 样式,则 tooltip 生效
menu-item a
::before
hover
====== 题外话 不知道加这个样式的出发点是什么,但是在结合 ProLayout 一起使用的时候,如果通过在项目中加 css 来解决这个问题, 在 ProLayout 中又会出现:点击一个链接,打开 2个窗口的问题,这个是 demo 这个原因是 ProLayout 内部会给 http 的链接绑定跳转事件(ProLayout 代码),当在这个外层包一个 a 标签时,由于 antd menu 的样式,不会有打开 2 个窗口的问题。但是为了解决 tooltip 的问题,一旦把a::before 的样式去掉,则会打开 2 个窗口。
a
a::before
The text was updated successfully, but these errors were encountered:
Start a new pull request in StackBlitz Codeflow.
Sorry, something went wrong.
需要添加 renderItem 属性
renderItem
No branches or pull requests
Reproduction link
https://react-5tpyk5.stackblitz.io
Steps to reproduce
hover 到 “有Before” 菜单时,没有 tooltip 提示;
hover 到 “没有Before” 菜单时,有 tooltip 提示;
What is expected?
不需要单独配置 css 样式,让 tooltip 生效
What is actually happening?
需要单独配置 css 样式,让 tooltip 生效
antd 内部,会给
menu-item a
加上::before
的样式的蒙层,导致hover
时,无法选中 tooltip 中的 trigger, 就不会触发 tooltip 提示。当去掉这个
::before
样式,则 tooltip 生效====== 题外话
不知道加这个样式的出发点是什么,但是在结合 ProLayout 一起使用的时候,如果通过在项目中加 css 来解决这个问题,
在 ProLayout 中又会出现:点击一个链接,打开 2个窗口的问题,这个是 demo
这个原因是 ProLayout 内部会给 http 的链接绑定跳转事件(ProLayout 代码),当在这个外层包一个
a
标签时,由于 antd menu 的样式,不会有打开 2 个窗口的问题。但是为了解决 tooltip 的问题,一旦把a::before
的样式去掉,则会打开 2 个窗口。The text was updated successfully, but these errors were encountered: