跳到主要内容
版本:v6

ion-item-option

shadow

项目选项组件是滑动项目的按钮。它必须放置在项目选项(item options)内部。ionSwipe 事件和 expandable 属性可以结合使用来为项目创建完整的滑动操作。

更多信息请参阅项目滑动(item sliding)文档。

属性

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 item option.
属性disabled
类型boolean
默认值false

download

说明This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want).
属性download
类型string | undefined
默认值undefined

expandable

说明If true, the option will expand to take up the available width and cover any other options.
属性expandable
类型boolean
默认值false

href

说明Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
属性href
类型string | undefined
默认值undefined

mode

说明The mode determines which platform styles to use.

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

rel

说明Specifies the relationship of the target object to the link object. The value is a space-separated list of link types.
属性rel
类型string | undefined
默认值undefined

target

说明Specifies where to display the linked URL. Only applies when an href is provided. Special keywords: "_blank", "_self", "_parent", "_top".
属性target
类型string | undefined
默认值undefined

type

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

事件

该组件没有可用的事件。

方法

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

CSS 阴影部分

Name说明
nativeThe native HTML button or anchor element that wraps all child elements.

CSS 自定义属性

Name说明
--backgroundBackground of the item option
--colorColor of the item option

插槽

Name说明
Content is placed between the named slots if provided without a slot.
bottomContent is placed below the option text.
endContent is placed to the right of the option text in LTR, and to the left in RTL.
icon-onlyShould be used on an icon in an option that has no text.
startContent is placed to the left of the option text in LTR, and to the right in RTL.
topContent is placed above the option text.