介绍
该组件用来展示列表item分组,宽度默认充满List组件,必须配合List组件来使用。
应用场景
子组件
包含ListItem子组件。
接口
ListItemGroup(options?: ListItemGroupOptions)
参数:
- options:
ListItemGroupOptions类型,列表item分组组件参数。
ListItemGroupOptions对象说明
- space:
number | string类型,列表项间距。只作用于ListItem与ListItem之间,不作用于header与ListItem、footer与ListItem之间。默认值:0。单位:vp
属性
divider
设置ListItem分割线样式,默认无分割线。
divider(value: {strokeWidth: Length; color?: ResourceColor; startMargin?: Length; endMargin?: Length;} | null,)
参数:
{
strokeWidth: Length,
color?:ResourceColor,
startMargin?: Length,
endMargin?: Length
} | null
解释:
ListItem分割线样式:
strokeWidth: 分割线的线宽。
color: 分割线的颜色。默认值:0x08000000
startMargin: 分割线与列表侧边起始端的距离。默认值:0,单位:vp
endMargin: 分割线与列表侧边结束端的距离。默认值:0,单位:vp
strokeWidth, startMargin和endMargin不支持设置百分比。
ListItem设置多态样式时,被按压的子组件上下的分割线不绘制。

