2020-07-28 10:03:53 +08:00
|
|
|
---
|
|
|
|
title: Divider 分割线
|
2021-01-07 23:35:03 +08:00
|
|
|
description:
|
2020-07-28 10:03:53 +08:00
|
|
|
type: 0
|
|
|
|
group: ⚙ 组件
|
|
|
|
menuName: Divider 分割线
|
2021-01-07 23:35:03 +08:00
|
|
|
icon:
|
2020-07-28 10:03:53 +08:00
|
|
|
order: 42
|
|
|
|
---
|
2021-01-07 23:35:03 +08:00
|
|
|
|
2020-07-28 10:03:53 +08:00
|
|
|
## 基本用法
|
|
|
|
|
2021-01-07 23:35:03 +08:00
|
|
|
```schema: scope="body"
|
2020-07-28 10:03:53 +08:00
|
|
|
{
|
|
|
|
"type": "divider"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## 不同样式
|
|
|
|
|
2021-01-07 23:35:03 +08:00
|
|
|
```schema: scope="body"
|
2020-07-28 10:03:53 +08:00
|
|
|
[
|
|
|
|
{
|
2023-10-17 10:24:54 +08:00
|
|
|
"type": "divider",
|
|
|
|
"lineStyle": "solid"
|
2020-07-28 10:03:53 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "divider",
|
2023-10-17 10:24:54 +08:00
|
|
|
"lineStyle": "dashed"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
```
|
|
|
|
|
|
|
|
## 带标题的分割线
|
|
|
|
|
|
|
|
> `3.5.0`及以上版本
|
|
|
|
|
|
|
|
```schema: scope="body"
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"type": "divider",
|
|
|
|
"title": "Text",
|
|
|
|
"titlePosition": "left"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "divider",
|
|
|
|
"title": "Text",
|
|
|
|
"titlePosition": "center"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "divider",
|
|
|
|
"title": "Text",
|
|
|
|
"titlePosition": "right"
|
2020-07-28 10:03:53 +08:00
|
|
|
}
|
|
|
|
]
|
|
|
|
```
|
|
|
|
|
|
|
|
## 属性表
|
|
|
|
|
2023-10-17 10:24:54 +08:00
|
|
|
| 属性名 | 类型 | 默认值 | 说明 | 版本 |
|
|
|
|
| --------- | -------- | ------------ | --------------------------------------- |---------- |
|
2023-09-04 14:58:20 +08:00
|
|
|
| type | `string` | | `"divider"` 指定为 分割线 渲染器 |
|
|
|
|
| className | `string` | | 外层 Dom 的类名 |
|
2023-09-12 16:00:45 +08:00
|
|
|
| lineStyle | `string` | `solid` | 分割线的样式,支持`dashed`和`solid` |
|
2023-10-17 10:24:54 +08:00
|
|
|
| direction | `string` | `horizontal` | 分割线的方向,支持`horizontal`和`vertical` | `3.5.0` |
|
|
|
|
| color | `string` | | 分割线的颜色 | `3.5.0` |
|
|
|
|
| rotate | `number` | | 分割线的旋转角度 | `3.5.0` |
|
|
|
|
| title | [SchemaNode](../../docs/types/schemanode) | | 分割线的标题 | `3.5.0` |
|
|
|
|
| titleClassName | `string` | | 分割线的标题类名 | `3.5.0` |
|
|
|
|
| titlePosition | `string` | `center`| 分割线的标题位置,支持`left`、`center`和`right` | `3.5.0` |
|
|
|
|
|