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

inline menu模式下submenu的tooltip多叠加了一层ul #3687

Closed
HalfLegend opened this issue Jun 30, 2019 · 1 comment
Closed

inline menu模式下submenu的tooltip多叠加了一层ul #3687

HalfLegend opened this issue Jun 30, 2019 · 1 comment
Assignees
Milestone

Comments

@HalfLegend
Copy link

Reproduction link

https://stackblitz.com/edit/angular-y8hplm

Steps to reproduce

其实就是ng-zorro-antd教程( https://ng.ant.design/components/menu/zh ) 中 menu教程中 缩起内嵌菜单 (inline-collapsed) 部分
当把菜单收缩起来后,其中sub-menu的菜单项,当鼠标指上后弹出的tooltip 其生成的html代码如下:

<div class="ant-menu-submenu ant-menu-submenu-popup ng-tns-c3-115 ng-trigger ng-trigger-slideMotion ant-menu-dark ant-menu-submenu-placement-rightTop ng-star-inserted">
    <ul class="ng-tns-c3-115 ant-menu ant-menu-vertical ant-menu-sub">
        <!---->
        <ul _ngcontent-docs-c30="" class="ng-star-inserted" style="">
            <li _ngcontent-docs-c30="" nz-menu-item="" class="ant-menu-item" style="">Option 9</li>
            <li _ngcontent-docs-c30="" nz-menu-item="" class="ant-menu-item" style="">Option 10</li>
            <li _ngcontent-docs-c30="" nz-menu-item="" class="ant-menu-item" style="">Option 11</li>
        </ul>
        <!---->
    </ul>
</div>

外面的ul包了一层 ul 结构不规范
并且在写css的时候,会有一些不必要的麻烦,对内层ul没有 ant-menu的class 会有一些其它的ul的stype发生额外不希望的效果

What is expected?

生成规范的html,ul里应该直接是li 而不应该额外包一层ul

What is actually happening?

ul 中 包含ul

Environment Info
ng-zorro-antd 8.0.0
Browser chrome
@zorro-bot
Copy link

zorro-bot bot commented Jun 30, 2019

Translation of this issue:

Sublineu's tooltip in inline menu mode is superimposed with a layer of ul

Reproduction link

https://stackblitz.com/edit/angular-y8hplm

Steps to reproduce

In fact, in the ng-zorro-antd tutorial ( https://ng.ant.design/components/menu/zh ) in the menu tutorial, the inline-collapsed section is indented.
When the menu is shrunk, the sub-menu menu item, when the mouse pointer is popped up, the tooltip generated by the mousetip is as follows:

<div class="ant-menu-submenu ant-menu-submenu-popup ng-tns-c3-115 ng-trigger ng-trigger-slideMotion ant-menu-dark ant-menu-submenu-placement-rightTop ng-star- Insert">
    <ul class="ng-tns-c3-115 ant-menu ant-menu-vertical ant-menu-sub">
        
        <ul _ngcontent-docs-c30="" class="ng-star-inserted" style="">
            <li _ngcontent-docs-c30="" nz-menu-item="" class="ant-menu-item" style="">Option 9</li>
            <li _ngcontent-docs-c30="" nz-menu-item="" class="ant-menu-item" style="">Option 10</li>
            <li _ngcontent-docs-c30="" nz-menu-item="" class="ant-menu-item" style="">Option 11</li>
        </ul>
        
    </ul>
</div>

The outer ul has a layer of ul. The structure is not standardized.
And when writing css, there will be some unnecessary troubles. For the inner ul without ant-menu class, there will be some other ul stypes with additional undesirable effects.

What is expected?

Generate the canonical html, ul should be directly li instead of an extra layer of ul

What is actually happening?

Ul contains ul

Environment Info
ng-zorro-antd 8.0.0
Browser chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants