Skip to content

Divider 分割线

用于分隔内容的分割线组件,支持水平/垂直方向、文字对齐和多种线条样式。

基础用法

默认渲染为水平分割线。

第一段内容

第二段内容

带文字的分割线

使用默认插槽添加文字,通过 contentPosition 控制对齐方式。

垂直分割线

通过 direction 属性设置为 vertical,在行内元素之间使用。

文本一链接文本二

虚线样式

通过 dashed 属性或 borderStyle 属性设置线条样式。

Divider API

Props

参数说明类型默认值
direction分割线方向'horizontal' | 'vertical''horizontal'
contentPosition文字对齐(水平方向有效)'left' | 'center' | 'right''center'
borderStyle线条样式'solid' | 'dashed' | 'dotted' | 'double''solid'
dashed是否为虚线(快捷设置)booleanfalse

Slots

插槽名说明
default分割线上的文字内容(仅水平方向)

基于 MIT 许可发布