分割线

介绍

内容分割组件

基本使用

<z-line />

纵向

通过指定属性directioncol,即可将线条设置为纵向

<z-line :custom-style="{height:'30rpx'}" direction="col"></z-line>

插入内容

通过指定属性content-position,即在线条中空置文字的位置。可选值center,left,right

<z-line content-position="center">zebraUI</z-line>

虚线

通过指定属性dashed,即可将线条设置为虚线

<z-line dashed />

自定义样式

通过指定属性custom-style,即可自定义线条样式

<z-line content-position="center" :custom-style="{color: '#1989fa',borderColor: '#1989fa',fontSize: '24rpx'}">文本</z-line>

API

Props

参数 说明 类型 可选值 默认值
dashed 是否显示为虚线 boolean false
hairline 是否使用细线条 boolean false
content-position 内容的位置 string center left right -
font-size 文字大小 string -
border-color 线条的颜色 string -
text-color 文字的颜色 string -
custom-style 自定义样式 object -
direction 线条方向 string row col row

Slots

名称 说明 Bindings
default 默认插槽