mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
补充 table2 事件文档 (#10878)
* doc: quick-save-submitted event * fix: rm redundant words
This commit is contained in:
parent
ee2ed97598
commit
1b5d6a8328
@ -4180,6 +4180,7 @@ order: 67
|
||||
| rowDbClick | `item: object` 行点击数据<br/>`index: number` 行索引 | 双击整行时触发 |
|
||||
| rowMouseEnter | `item: object` 行移入数据<br/>`index: number` 行索引 | 移入整行时触发 |
|
||||
| rowMouseLeave | `item: object` 行移出数据<br/>`index: number` 行索引 | 移出整行时触发 |
|
||||
| quickSaveSubmitted | `item: object` 快速编辑相关数据,包括源数据、修改后的数据、修改的行数索引、没有变动的数据 | 成功调用 `quickSaveApi` 之后触发 |
|
||||
|
||||
### selectedChange
|
||||
|
||||
@ -4815,6 +4816,63 @@ order: 67
|
||||
}
|
||||
```
|
||||
|
||||
### quickSaveSubmitted
|
||||
|
||||
快速编辑点击 `submit` , 成功调用 `quickSaveSubmitted`之后触发
|
||||
|
||||
```schema: scope="body"
|
||||
{
|
||||
"type": "page",
|
||||
"body": {
|
||||
"type": "page",
|
||||
"body": {
|
||||
"type": "service",
|
||||
"api": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/sample?perPage=5",
|
||||
"id": "service-container",
|
||||
"body": [
|
||||
{
|
||||
"type": "table2",
|
||||
"source": "$rows",
|
||||
"quickSaveApi": {
|
||||
"url": "https://3xsw4ap8wah59.cfc-execute.bj.baidubce.com/api/amis-mock/mock2/sample/bulkUpdate",
|
||||
"method": "put"
|
||||
},
|
||||
"onEvent": {
|
||||
"quickSaveSubmitted": {
|
||||
"actions": [
|
||||
{
|
||||
"actionType": "reload",
|
||||
"componentId": "service-container"
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
"columns": [
|
||||
{
|
||||
"title": "Engine",
|
||||
"name": "engine",
|
||||
"quickEdit": true
|
||||
},
|
||||
{
|
||||
"title": "Version",
|
||||
"name": "version"
|
||||
},
|
||||
{
|
||||
"title": "Browser",
|
||||
"name": "browser"
|
||||
},
|
||||
{
|
||||
"title": "Badge",
|
||||
"name": "badgeText"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 列的事件表
|
||||
|
||||
表格的默认列定义的事件如下,即 click、mouseenter、mouseleave。如果列定义是其他组件,则事件表就是这个组件对应的事件表,例如列定义是 Switch 组件,则可以监听 [Switch 的 change 事件](./form/switch#%E4%BA%8B%E4%BB%B6%E8%A1%A8)。
|
||||
|
Loading…
Reference in New Issue
Block a user