跳到主要内容
版本:v7

ion-menu-button

shadow

菜单按钮(Menu Button)组件包含一个图标,并自动添加点击时打开菜单的功能。

更多信息请参阅菜单(menu)文档。

属性

autoHide

说明Automatically hides the menu button when the corresponding menu is not active
属性auto-hide
类型boolean
默认值true

color

说明The color to use from your application's color palette. Default options are: "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming.
属性color
类型"danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined
默认值undefined

disabled

说明If true, the user cannot interact with the menu button.
属性disabled
类型boolean
默认值false

menu

说明Optional 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
属性menu
类型string | undefined
默认值undefined

mode

说明The mode determines which platform styles to use.

这是一个虚拟属性,在初始化时设置一次,之后更改其值不会更新组件。
属性mode
类型"ios" | "md"
默认值undefined

type

说明The type of the button.
属性type
类型"button" | "reset" | "submit"
默认值'button'

事件

该组件没有可用的事件。

方法

该组件没有可用的公共方法。

CSS 阴影部分

Name说明
iconThe menu button icon (uses ion-icon).
nativeThe native HTML button element that wraps all child elements.

CSS 自定义属性

Name说明
--backgroundBackground of the menu button
--background-focusedBackground of the menu button when focused with the tab key
--background-focused-opacityOpacity of the menu button background when focused with the tab key
--background-hoverBackground of the menu button on hover
--background-hover-opacityOpacity of the background on hover
--border-radiusBorder radius of the menu button
--colorColor of the menu button
--color-focusedColor of the menu button when focused with the tab key
--color-hoverColor of the menu button on hover
--padding-bottomBottom padding of the button
--padding-endRight padding if direction is left-to-right, and left padding if direction is right-to-left of the button
--padding-startLeft padding if direction is left-to-right, and right padding if direction is right-to-left of the button
--padding-topTop padding of the button

插槽

该组件没有可用的插槽。