ion-label
Label 是一个主要用于向 Item 组件添加文本内容的元素。在指定可见标签时,Label 也可以用于表单控件组件(如 Input 或 Radio)内部,但这不是必需的。
标签在 item 内部的位置可以是内联、固定、堆叠或浮动。
基本用法
项目标签
主题
颜色
属性
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 |
mode
| 说明 | The mode determines which platform styles to use. 这是一个虚拟属性,在初始化时设置一次,之后更改其值不会更新组件。 |
| 属性 | mode |
| 类型 | "ios" | "md" |
| 默认值 | undefined |
position
| 说明 | The position determines where and how the label behaves inside an item. |
| 属性 | position |
| 类型 | "fixed" | "floating" | "stacked" | undefined |
| 默认值 | undefined |
事件
该组件没有可用的事件。
方法
该组件没有可用的公共方法。
CSS Shadow Parts
该组件没有可用的 CSS 阴影部分。
CSS 自定义属性
- iOS
- MD
| Name | 说明 |
|---|---|
--color | Color of the label. This property is only available when using ion-label inside of an ion-item. |
| Name | 说明 |
|---|---|
--color | Color of the label. This property is only available when using ion-label inside of an ion-item. |
插槽
该组件没有可用的插槽。