spz-nested-menu
Displays a drawer menu.
布局
Layouts
跳转到“Layouts”Usage
跳转到“Usage”The example below demonstrates the spz-nested-menu component in standalone use.
spz-nested-submenu-open: Marks that the element has a submenu.spz-nested-submenu: Marks that the submenu of the element. It must be used with thespz-nested-submenu-openattribute.spz-nested-submenu-close: Marks a button that returns to the previous menu.
<spz-sidebar layout="nodisplay" id="sidebar" side="left" style="width: 300px;" has-mask>
<spz-nested-menu layout="fill" side="right">
<ul>
<li>
<a href="#" spz-nested-submenu-open>Nav Item 1</a>
<ul spz-nested-submenu>
<li spz-nested-submenu-close>< Back</li>
<li>Nav Sub Item 1</li>
<li>Nav Sub Item 2</li>
<li>
<a href="#" spz-nested-submenu-open>Nav Sub Item 3</a>
<ul spz-nested-submenu>
<li spz-nested-submenu-close>< Back</li>
<li>Item 1</li>
<li>Item 2</li>
</ul>
</li>
</ul>
</li>
<li>Nav Item 2</li>
<li>Nav Item 3</li>
</ul>
</spz-nested-menu>
</spz-sidebar>
<button type="button" @tap="sidebar.open">Open sidebar</button>
Attributes
跳转到“Attributes”side
跳转到“side”Using a few animations to show the element. It has the following values:
top: Be shown in fly-from-top animation.left: Be shown in fly-from-left animation.right: Be shown in fly-from-right animation.bottom: Be shown in fly-from-bottom animation.
child-open
跳转到“child-open”The element will be added a child-open attribute when the element has a child element that is opened.
open
跳转到“open”The submenu will be added a open attribute when the submenu element is opened.
Actions
跳转到“Actions”reset
跳转到“reset”To reset the menu to the first level. It will remove the child-open attribute of the current element and the open attribute of the submenu.