fix: options 内容过多时超出显示问题 (#5112)

This commit is contained in:
吴多益 2022-08-11 17:25:42 +08:00 committed by GitHub
parent e6472876d2
commit cc15765d4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 2 deletions

View File

@ -208,14 +208,13 @@ order: 2
}
```
远程拉取接口时,返回的数据结构除了需要满足 [amis 接口要求的基本数据结构](../../../docs/types/api#%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E6%A0%BC%E5%BC%8F-%E9%87%8D%E8%A6%81-) 以外,必须用`"options"`作为选项组的`key`值,如下
远程拉取接口时,返回的数据结构除了需要满足 [amis 接口要求的基本数据结构](../../../docs/types/api#%E6%8E%A5%E5%8F%A3%E8%BF%94%E5%9B%9E%E6%A0%BC%E5%BC%8F-%E9%87%8D%E8%A6%81-) 以外,用`"options"`作为选项组的`key`值,如下
```json
{
"status": 0,
"msg": "",
"data": {
// 必须用 options 作为选项组的 key 值
"options": [
{
"label": "A",
@ -234,6 +233,29 @@ order: 2
}
```
或者直接返回内容
```json
{
"status": 0,
"msg": "",
"data": [
{
"label": "A",
"value": "a"
},
{
"label": "B",
"value": "b"
},
{
"label": "C",
"value": "c"
}
]
}
```
## 默认值/自动选中 value
我们知道表单项可以通过配置`value`属性来设置默认值

View File

@ -229,6 +229,7 @@
max-height: px2rem(300px);
padding-top: px2rem(4px);
padding-bottom: px2rem(4px);
overflow: auto;
user-select: none;
.#{$ns}Checkbox--sm > i {
margin-top: px2rem(-3px);