Release v1.0.120: document bind.visibleWhen for row menu visibility
All checks were successful
技能自动化发布 / release (push) Successful in 7s
All checks were successful
技能自动化发布 / release (push) Successful in 7s
This commit is contained in:
39
assets/examples/bind-visible-when-row.action.example.json
Normal file
39
assets/examples/bind-visible-when-row.action.example.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"id": "approve-item",
|
||||
"label": "采用",
|
||||
"description": "把当前记录改为已采用。仅待确认或已跳过的行显示此按钮。",
|
||||
"placements": ["row", "agent"],
|
||||
"executionProfile": "sync",
|
||||
"interaction": "direct",
|
||||
"bind": {
|
||||
"tables": ["business_items"],
|
||||
"visibleWhen": {
|
||||
"field": "status",
|
||||
"in": ["pending_review", "skipped"]
|
||||
},
|
||||
"labelColumn": "display_name",
|
||||
"inputMapping": {
|
||||
"itemId": "$row.$pk"
|
||||
}
|
||||
},
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"required": ["itemId"],
|
||||
"properties": {
|
||||
"itemId": {
|
||||
"type": "number",
|
||||
"title": "编号",
|
||||
"description": "行内触发时自动填入,一般无需修改",
|
||||
"readOnly": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"entrypoint": {
|
||||
"type": "cli",
|
||||
"command": "approve",
|
||||
"args": ["--id", "{{itemId}}"]
|
||||
},
|
||||
"hostEffects": {
|
||||
"onSuccess": ["reloadTable"]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user