Skip to content

Divider 分割线

通常用于隔断元素

基础用法

设置文案

有时候在分割线的位置上,需要设置一些文案

通过text属性,或者default槽设置文案, 若两者同时设置, slot.default优先级高于props.text

通过placement设置文本位置, 除了center start end 之外还能设置百分比偏移量

类型

可以设置分割线为实线或者虚线

垂直分割线

通过direction设置分割线的方向

Divider API

Divider Props

属性名说明可选值默认值
direction分割线的方向'vertical' | 'horizontal'horizontal
status分割线的类型'dashed' | 'solid'solid
placement分割线的文案的位置'start' | 'center' | 'end' |' string'center
prefixIcon分割线的文案的前缀图标String---
suffixIcon分割线的文案的后缀图标String---
text分割线的文案String---
gap分割线用于隔离的高度(宽度)Number10

Divider Slots

名称说明
default默认槽

源代码

组件

贡献者

Released under the MIT License.