Skip to main content

ion-menu-toggle

shadow

菜单切换组件可用于打开或关闭菜单。

¥The Menu Toggle component can be used to toggle a menu open or closed.

仅当启用所选菜单时,菜单切换才可见。如果菜单被禁用或以分割窗格形式显示,则菜单切换将被隐藏。要始终显示菜单切换,可以将 autoHide 属性设置为 false

¥Menu toggles are only visible when the selected menu is enabled. If the menu is disabled or it's being presented as a split pane, the menu toggle will be hidden. To always display the menu toggle, the autoHide property can be set to false.

有关详细信息,请参阅 menu 文档。

¥See the menu documentation for more information.

属性

¥Properties

autoHide

DescriptionAutomatically hides the content when the corresponding menu is not active.

By default, it's true. Change it to false in order to keep ion-menu-toggle always visible regardless the state of the menu.
Attributeauto-hide
Typeboolean
Defaulttrue
DescriptionOptional property that maps to a Menu's menuId prop. Can also be start or end for the menu side. This is used to find the correct menu to toggle.

If this property is not used, ion-menu-toggle will toggle the first menu that is active.
Attributemenu
Typestring | undefined
Defaultundefined

事件

¥Events

No events available for this component.

方法

¥Methods

No public methods available for this component.

CSS 阴影部分

¥CSS Shadow Parts

No CSS shadow parts available for this component.

CSS 自定义属性

¥CSS Custom Properties

No CSS custom properties available for this component.

插槽

¥Slots

NameDescription
``Content is placed inside the toggle to act as the click target.