EDivider 分割线
示例与代码
分割线
属性
属性说明取值与默认值
borderStylestring分割线的线条样式。
"solid" / "dashed""dotted" / "double""none" / "hidden""groove" / "ridge""inset" / "outset"
默认值
"solid"colorcolor自定义颜色;透明值通常表示使用当前主题或语义配色。
默认值
动态绑定contentComponentComponent自定义主体内容的 Component 插槽;null 使用默认内容。 委托上下文见本页示例。
默认值
nullcontentPositionint分割线内容的对齐位置。
EPlacement.LeftEPlacement.CenterEPlacement.Right
默认值
EPlacement.CentercontentSpacingint相邻内容、列、行或文字间距,单位为像素。
默认值
20directionint组件的排列方向。
EOrientation.HorizontalEOrientation.Vertical
默认值
EOrientation.Horizontalenabledbool是否允许交互;false 时控件禁用。
默认值
truefontalias字体配置对象。
常用字段:
family, pixelSize, pointSize
bold, italic, weight
underline, strikeout
letterSpacing, wordSpacing
默认值
别名:label.fontheightreal组件尺寸,单位为像素;可绑定父布局尺寸。
默认值
implicitHeightlineWidthreal边框、分隔线或进度轨道的线宽,单位为像素。
默认值
1textalias显示的文字内容。
默认值
别名:label.texttextColorcolor文字颜色。
默认值
动态绑定verticalHeightint垂直分隔线高度,单位为像素。
默认值
16visiblebool是否显示组件。
默认值
truewidthreal组件尺寸,单位为像素;可绑定父布局尺寸。
默认值
horizontal ? implicitWidth : effectiveLineWidthavailableContentWidthreal只读分隔线留给中间内容的可用宽度。
默认值
由运行时计算effectiveContentPositionint只读经过合法值校验的分隔线内容位置。
EPlacement.LeftEPlacement.CenterEPlacement.Right
默认值
由运行时计算effectiveContentSpacingreal只读分隔线实际内容间距。
默认值
由运行时计算effectiveLineWidthreal只读分隔线经过非负校验的线宽。
默认值
由运行时计算hasContentbool只读当前是否有可显示的自定义内容。
默认值
由运行时计算horizontalbool只读实际布局是否采用水平或垂直方向。
默认值
由运行时计算