layui/package/document-component/src/document/zh-CN/components/line.md
2022-06-25 20:10:12 +08:00

2.8 KiB
Raw Blame History

::: anchor :::

::: title 基础使用 :::

::: describe 默认为水平分割线 :::

::: demo

默认分割线
赤色分割线
橙色分割线
墨绿分割线
青色分割线
蓝色分割线
黑色分割线
自定义颜色

:::

::: title 带内容的分割线 :::

::: describe 带内容的分割线contentPosition 属性设置内容位置offset 属性设置内容偏移量, 单位 px 或百分比值。也可以通过 border-styleborder-width自定义样式 :::

::: demo

🌲 🌲 🌲 🌲
left 默认
right 百分比
自 定 义 宽 度 和 样 式

:::

::: title 竖直分割线 :::

::: describe 设置 direction = 'vertical' 即可使用竖直分割线 :::

::: demo

默认分割线 赤色分割线 橙色分割线 墨绿分割线 青色分割线 蓝色分割线 黑色分割线

:::

::: title Line 属性 :::

::: table

属性 说明 可选值
direction 分割线的方向 horizontal vertical
contentPosition 分割线内容位置 center left right
offset 分割线内容偏移量,单位 px eg: 30px 20%
theme 主题 red orange green cyan blue black gray 或 string
borderWidth 分割线宽度,单位 px eg: 2px
borderStyle 分割线样式 参见MDNborder-style

:::

::: title Line 插槽 :::

::: table

插槽 说明
default 默认插槽,仅支持 direction 为 horizontal

:::

::: contributor line :::

::: previousNext line :::