ion-label
标签(Label)是主要用于向项目(Item)组件添加文本内容的元素。在指定可见标签时,标签也可以在表单控件组件(如输入(Input)或单选按钮(Radio))内部使用,但这不是必需的。
项目内部标签的位置可以是内联、固定、堆叠或浮动。
基本用法
项目标签
主题
颜色
属性
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 阴影部分
该组件没有可用的 CSS 阴影部分。
CSS 自定义属性
| Name | 说明 |
|---|---|
--color | Color of the label. This property is only available when using ion-label inside of an ion-item. |
插槽
该组件没有可用的插槽。