ion-picker-column
选择器中的单个列。访问 ion-picker 文档以获取更多详细信息。
Properties
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 |
| 默认值 | 'primary' |
disabled
| 说明 | If true, the user cannot interact with the picker. |
| 属性 | disabled |
| 类型 | boolean |
| 默认值 | false |
mode
| 说明 | The mode determines which platform styles to use. 这是一个虚拟属性,在初始化时设置一次,之后更改其值不会更新组件。 |
| 属性 | mode |
| 类型 | "ios" | "md" |
| 默认值 | undefined |
value
| 说明 | The selected option in the picker. |
| 属性 | value |
| 类型 | number | string | undefined |
| 默认值 | undefined |
Events
| Name | 说明 | 冒泡 |
|---|---|---|
ionChange | Emitted when the value has changed. This event will not emit when programmatically setting the value property. | true |
Methods
setFocus
| 说明 | Sets focus on the scrollable container within the picker column. Use this method instead of the global pickerColumn.focus(). |
| 签名 | setFocus() => Promise<void> |
CSS Shadow Parts
该组件没有可用的 CSS 阴影部分。
CSS Custom Properties
该组件没有可用的 CSS 自定义属性。
Slots
| Name | 说明 |
|---|---|
prefix | Content to show on the left side of the picker options. |
suffix | Content to show on the right side of the picker options. |