ion-list-header
列表标题是用于描述列表内容的块级元素。与项目分隔符不同,列表标题应仅在项目列表的顶部使用一次。
🌐 List headers are block elements that are used to describe the contents of a list. Unlike item dividers, list headers should only be used once at the top of a list of items.
基本用法
🌐 Basic Usage
列表标题中的按钮
🌐 Buttons in List Headers
放置在列表标题中的按钮对于显示部分列表并通过按钮重定向到完整列表非常有用。
🌐 A button placed in a list header can be useful for showing part of a list and redirecting to the full list with the button.
列表标题行
🌐 List Header Lines
列表标题默认不显示下边框。lines 属性可以修改为 "full" 或 "inset",分别显示全宽边框或带左内边距的凹入边框。
🌐 List headers do not show a bottom border by default. The lines property can be modified to "full" or "inset" which will show a full width border or an inset border with left padding, respectively.
主题化
🌐 Theming
颜色
🌐 Colors
CSS 自定义属性
🌐 CSS Custom Properties
属性
🌐 Properties
color
| Description | 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. |
| Attribute | color |
| Type | "danger" | "dark" | "light" | "medium" | "primary" | "secondary" | "success" | "tertiary" | "warning" | string | undefined |
| Default | undefined |
lines
| Description | How the bottom border should be displayed on the list header. |
| Attribute | lines |
| Type | "full" | "inset" | "none" | undefined |
| Default | undefined |
mode
| Description | The mode determines which platform styles to use. This is a virtual property that is set once during initialization and will not update if you change its value after the initial render. |
| Attribute | mode |
| Type | "ios" | "md" |
| Default | undefined |
事件
🌐 Events
No events available for this component.
方法
🌐 Methods
No public methods available for this component.
CSS 阴影部分
🌐 CSS Shadow Parts
| Name | Description |
|---|---|
inner | The inner wrapper element that arranges the list header content. |
CSS 自定义属性
🌐 CSS Custom Properties
- iOS
- MD
| Name | Description |
|---|---|
--background | Background of the list header |
--border-color | Color of the list header border |
--border-style | Style of the list header border |
--border-width | Width of the list header border |
--color | Color of the list header text |
--inner-border-width | Width of the inner list header border |
| Name | Description |
|---|---|
--background | Background of the list header |
--border-color | Color of the list header border |
--border-style | Style of the list header border |
--border-width | Width of the list header border |
--color | Color of the list header text |
--inner-border-width | Width of the inner list header border |
插槽
🌐 Slots
No slots available for this component.