Skip to content

Commit

Permalink
feat: 补充下拉框选项禁用的说明文档 (#11107)
Browse files Browse the repository at this point in the history
  • Loading branch information
F-jianchao authored Oct 25, 2024
1 parent 434a328 commit cf7de4c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/zh-CN/components/form/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,38 @@ order: 2
}
```

### 单一选项禁用

如果需要禁用某个单独选项,让用户不可选。可以给`options`中某一项配置`disabled`属性为`true`

```schema: scope="body"
{
"type": "form",
"body": [
{
"label": "选项",
"type": "select",
"name": "select",
"options": [
{
"label":"A",
"value":"a",
"disabled": true
},
{
"label":"B",
"value":"b"
},
{
"label":"C",
"value":"c"
}
]
}
]
}
```

## 静态选项组 options

可以使用静态方式,配置一组选项组:
Expand Down

0 comments on commit cf7de4c

Please sign in to comment.