Line 线条
基本使用
template
<c-line />
颜色
template
<c-line color="primary" />
<c-line color="error" />
<c-line color="success" />
<c-line color="warning" />
<c-line color="info" />
<c-line color="#7546c9" />
长度粗细
length 为线条长度; width 为线条粗细。不能理解为元素的高宽。
template
<c-line length="200rpx" width="20rpx" />
API
Line Props
| 名称 | 类型 | 默认值 | 版本 | 说明 |
|---|---|---|---|---|
| c | string | default | 配置名。使用说明 | |
| props | LineProps | undefined | 全部 props 。 使用说明 | |
| c-class | HTMLAttributes['class'] | undefined | 自定义类名 | |
| c-style | HTMLAttributes['style'] | undefined | 自定义样式 | |
| length | number | string | undefined | 线条长度 | |
| width | number | string | undefined | 线条粗细 | |
| color | string | #ebedf0 | 线条颜色。 使用说明 | |
| border-style | CSSProperties['borderStyle'] | undefined | 线条样式。MDN Web Docs | |
| vertical | boolean | undefined | 是否垂直 | |
| round | boolean | undefined | 是否显示为圆角 |