Skip to content

EDivider 分割线 ​

import EUI 1.0

示例与代码 ​

分割线 ​

QML 代码QML
效果
运行代码,体验组件交互

可修改文字、属性和事件,再点击运行。

代码在当前浏览器中运行 许可

属性 ​

属性说明取值与默认值
borderStylestring

分割线的线条样式。

"solid" / "dashed"
"dotted" / "double"
"none" / "hidden"
"groove" / "ridge"
"inset" / "outset"

默认值"solid"
colorcolor

自定义颜色;透明值通常表示使用当前主题或语义配色。

默认值动态绑定
contentComponentComponent

自定义主体内容的 Component 插槽;null 使用默认内容。 委托上下文见本页示例。

默认值null
contentPositionint

分割线内容的对齐位置。

EPlacement.Left
EPlacement.Center
EPlacement.Right

默认值EPlacement.Center
contentSpacingint

相邻内容、列、行或文字间距,单位为像素。

默认值20
directionint

组件的排列方向。

EOrientation.Horizontal
EOrientation.Vertical

默认值EOrientation.Horizontal
enabledbool

是否允许交互;false 时控件禁用。

默认值true
fontalias

字体配置对象。

常用字段:
family, pixelSize, pointSize
bold, italic, weight
underline, strikeout
letterSpacing, wordSpacing

默认值别名:label.font
heightreal

组件尺寸,单位为像素;可绑定父布局尺寸。

默认值implicitHeight
lineWidthreal

边框、分隔线或进度轨道的线宽,单位为像素。

默认值1
textalias

显示的文字内容。

默认值别名:label.text
textColorcolor

文字颜色。

默认值动态绑定
verticalHeightint

垂直分隔线高度,单位为像素。

默认值16
visiblebool

是否显示组件。

默认值true
widthreal

组件尺寸,单位为像素;可绑定父布局尺寸。

默认值horizontal ? implicitWidth : effectiveLineWidth
availableContentWidthreal只读

分隔线留给中间内容的可用宽度。

默认值由运行时计算
effectiveContentPositionint只读

经过合法值校验的分隔线内容位置。

EPlacement.Left
EPlacement.Center
EPlacement.Right

默认值由运行时计算
effectiveContentSpacingreal只读

分隔线实际内容间距。

默认值由运行时计算
effectiveLineWidthreal只读

分隔线经过非负校验的线宽。

默认值由运行时计算
hasContentbool只读

当前是否有可显示的自定义内容。

默认值由运行时计算
horizontalbool只读

实际布局是否采用水平或垂直方向。

默认值由运行时计算

基于 MIT 许可发布 · 第三方资源遵循其各自许可