补充 quickEdit 文档 (#1856)

This commit is contained in:
liaoxuezhi 2021-04-22 16:41:05 +08:00 committed by GitHub
parent 073f6c66d4
commit a9a57c6ae1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -880,6 +880,31 @@ amis 只负责生成下拉选择器组件,并将搜索参数传递给接口,
}
```
#### 配置快速编辑启动条件
通过 `quickEditEnabledOn` 配置表达式来实现,如下,只有 id 小于 5 的数据可以编辑 engine。
```schema: scope="body"
{
"type": "crud",
"syncLocation": false,
"api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/sample",
"quickSaveApi": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/sample/bulkUpdate",
"columns": [
{
"name": "id",
"label": "ID"
},
{
"name": "engine",
"label": "Rendering engine",
"quickEdit":true,
"quickEditEnabledOn": "this.id < 5"
}
]
}
```
## 顶部和底部工具栏
crud 组件支持通过配置`headerToolbar`和`footerToolbar`属性,实现在表格顶部和底部渲染组件,