ion-item-divider
Item dividers 是可用于分隔列表中 items 的块元素。它们类似于列表标题,但应放在项目组之间,而不是仅放在列表顶部。
基本用法
主题
颜色
CSS 自定义属性
属性
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 |
sticky
| 说明 | When it's set to true, the item-divider will stay visible when it reaches the top of the viewport until the next ion-item-divider replaces it.This feature relies in position:sticky: https://caniuse.com/#feat=css-sticky |
| 属性 | sticky |
| 类型 | boolean |
| 默认值 | false |
事件
该组件没有可用的事件。
方法
该组件没有可用的公共方法。
CSS Shadow Parts
| Name | 说明 |
|---|---|
container | The wrapper element that contains the default slot. |
inner | The inner wrapper element that arranges the divider content. |
CSS 自定义属性
- iOS
- MD
| Name | 说明 |
|---|---|
--background | Background of the item divider |
--color | Color of the item divider |
--inner-padding-bottom | Bottom inner padding of the item divider |
--inner-padding-end | End inner padding of the item divider |
--inner-padding-start | Start inner padding of the item divider |
--inner-padding-top | Top inner padding of the item divider |
--padding-bottom | Bottom padding of the item divider |
--padding-end | Right padding if direction is left-to-right, and left padding if direction is right-to-left of the item divider |
--padding-start | Left padding if direction is left-to-right, and right padding if direction is right-to-left of the item divider |
--padding-top | Top padding of the item divider |
| Name | 说明 |
|---|---|
--background | Background of the item divider |
--color | Color of the item divider |
--inner-padding-bottom | Bottom inner padding of the item divider |
--inner-padding-end | End inner padding of the item divider |
--inner-padding-start | Start inner padding of the item divider |
--inner-padding-top | Top inner padding of the item divider |
--padding-bottom | Bottom padding of the item divider |
--padding-end | Right padding if direction is left-to-right, and left padding if direction is right-to-left of the item divider |
--padding-start | Left padding if direction is left-to-right, and right padding if direction is right-to-left of the item divider |
--padding-top | Top padding of the item divider |
插槽
| Name | 说明 |
|---|---|
| Content is placed between the named slots if provided without a slot. | |
end | Content is placed to the right of the divider text in LTR, and to the left in RTL. |
start | Content is placed to the left of the divider text in LTR, and to the right in RTL. |