顶部菜单支持多级菜单

This commit is contained in:
hy
2024-09-23 10:54:37 +08:00
parent d4ff7ffaa9
commit cab0e1ce0b
3 changed files with 68 additions and 33 deletions

View File

@@ -24,28 +24,35 @@
</div>
<!-- Current App Sections -->
<div class="d-none d-md-block o_menu_sections_fix ">
<!-- <t t-if="currentAppSections.length"-->
<!-- t-call="web.NavBar.SectionsMenu">-->
<!-- <t t-set="sections" t-value="currentAppSections"/>-->
<!-- </t>-->
<t t-if="currentAppSections.length" >
<t t-foreach="currentAppSections" t-as="menu" t-key="menu.id">
<div class="custom_dropdown" >
<t t-if="menu.childrenTree.length">
<p class="title"><t t-esc="menu.name"></t> </p>
<div class="custom_dropdown_fixed">
<t t-foreach="menu.childrenTree" t-as="child" t-key="child.id">
<a t-attf-href="{{getMenuItemHref(child)}}"> <t t-esc="child.name"></t></a>
</t>
</div>
</t>
<t t-if="!menu.childrenTree.length">
<a class="title" t-attf-href="{{getMenuItemHref(menu)}}"> <t t-esc="menu.name"></t></a>
</t>
</div>
<t t-if="currentAppSections.length"
t-call="web.NavBar.SectionsMenu">
<t t-set="sections" t-value="currentAppSections"/>
</t>
<t t-if="currentAppSections.length">
<t t-foreach="currentAppSections" t-as="menu" t-key="menu.id">
<div class="custom_dropdown" >
<t t-if="menu.childrenTree.length" >
<p class="title"><t t-esc="menu.name"></t> </p>
<div class="custom_dropdown_fixed">
<t t-call="customDropdownChild">
<t t-set="children" t-value="menu.childrenTree"/>
</t>
</div>
</t>
<!-- <t t-if="menu.childrenTree.length">-->
<!-- <p class="title"><t t-esc="menu.name"></t> </p>-->
<!-- <div class="custom_dropdown_fixed">-->
<!-- <t t-foreach="menu.childrenTree" t-as="child" t-key="child.id">-->
<!-- <a t-attf-href="{{getMenuItemHref(child, 123)}}"> <t t-esc="child.name"></t></a>-->
<!-- </t>-->
<!-- </div>-->
<!-- </t>-->
<t t-if="!menu.childrenTree.length">
<a class="title" t-attf-href="{{getMenuItemHref(menu)}}"> <t t-esc="menu.name"></t></a>
</t>
</div>
</t>
</t>
</div>
<div class="d-xs-block d-sm-block d-md-none">