• Divider 分割线
    • 概述
    • 代码示例
    • API
      • Divider props

    Divider 分割线

    概述

    区隔内容的分割线。

    对不同章节的文本段落进行分割。

    对行内文字/链接进行分割,例如表格的操作列。

    代码示例

    Divider 分割线 - 图1

    水平分割线

    默认为水平分割线,可在中间加入文字。

    1. <template>
    2. <p>Steven Paul Jobs was an American entrepreneur and business magnate. He was the chairman, chief executive officer, and a co-founder of Apple Inc.</p>
    3. <Divider />
    4. <p>Steven Paul Jobs was an American entrepreneur and business magnate. He was the chairman, chief executive officer, and a co-founder of Apple Inc.</p>
    5. <Divider>With Text</Divider>
    6. <p>Steven Paul Jobs was an American entrepreneur and business magnate. He was the chairman, chief executive officer, and a co-founder of Apple Inc.</p>
    7. <Divider dashed />
    8. <p>Steven Paul Jobs was an American entrepreneur and business magnate. He was the chairman, chief executive officer, and a co-founder of Apple Inc.</p>
    9. </template>
    10. <script>
    11. export default {
    12. }
    13. </script>

    Divider 分割线 - 图2

    垂直分割线

    使用 type="vertical" 设置为行内的垂直分割线。

    1. <template>
    2. Text
    3. <Divider type="vertical" />
    4. <a href="#">Link</a>
    5. <Divider type="vertical" />
    6. <a href="#">Link</a>
    7. </template>
    8. <script>
    9. export default {
    10. }
    11. </script>

    Divider 分割线 - 图3

    标题位置

    修改分割线标题的位置。

    1. <template>
    2. <Divider orientation="left">Left Text</Divider>
    3. <p>Steven Paul Jobs was an American entrepreneur and business magnate. He was the chairman, chief executive officer, and a co-founder of Apple Inc.</p>
    4. <Divider orientation="right">Right Text</Divider>
    5. <p>Steven Paul Jobs was an American entrepreneur and business magnate. He was the chairman, chief executive officer, and a co-founder of Apple Inc.</p>
    6. </template>
    7. <script>
    8. export default {
    9. }
    10. </script>

    API

    Divider props

    属性说明类型默认值
    type水平还是垂直类型,可选值为 horizontal 或 verticalStringhorizontal
    orientation分割线标题的位置,可选值为 left、right 或 centerNumbercenter
    dashed是否虚线Booleanfalse
    size 3.3.0尺寸,可选值为 small 或 defaultStringdefault