docs: 补充 group 下 columnRatio 的配置说明 (#3036)

This commit is contained in:
吴多益 2021-11-24 21:30:48 +08:00 committed by GitHub
parent 5e79ce2f89
commit 4d871e24e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 59 additions and 3 deletions

View File

@ -166,6 +166,60 @@ order: 24
}
```
## 宽度占比
在表单项内部可以通过 `columnRatio` 来控制宽度,整体是 12 等分
```schema: scope="body"
{
"type": "form",
"body": [
{
"type": "group",
"body": [
{
"type": "input-text",
"name": "text1",
"label": "text1",
"columnRatio": 8
},
{
"type": "input-text",
"name": "text2",
"label": "text2",
"columnRatio": 4
}
]
},
{
"type": "divider"
},
{
"type": "group",
"body": [
{
"type": "input-text",
"name": "text1",
"label": "text1",
"columnRatio": 6
},
{
"type": "input-text",
"name": "text2",
"label": "text2",
"columnRatio": 4
},
{
"type": "input-text",
"name": "text3",
"label": "text3"
}
]
}
]
}
```
## 属性表
| 属性名 | 类型 | 默认值 | 说明 |

View File

@ -227,7 +227,7 @@ order: 24
}
```
另一个方法是使用 group它能实现每行显示不同列数可以实现更灵活的控制
另一个方法是使用 group它能实现每行显示不同列数以及不同列的宽度分配情况,可以实现更灵活的控制
```schema: scope="body"
[
@ -259,12 +259,14 @@ order: 24
{
"type": "input-text",
"name": "text3",
"label": "文本3"
"label": "文本3",
"columnRatio": 4
},
{
"type": "input-text",
"name": "text4",
"label": "文本4"
"label": "文本4",
"columnRatio": 6
},
{
"type": "input-text",