沉淀 Lookup 分页勾选小表契约,避免再造一套控件
All checks were successful
技能自动化发布 / release (push) Successful in 7s

This commit is contained in:
2026-09-30 11:21:37 +08:00
parent afe0788488
commit cef7e366cf
12 changed files with 140 additions and 10 deletions

View File

@@ -8,6 +8,7 @@
- `render-html.action.example.json`:HTML 报告「重新生成」Action 形状参考(固定 id `render-html`;见 `references/ACTIONS.md`)。
- `lookup-action.example.json`:Action 内联 Lookup(**local_sql**)形状参考(单选 + `multiple: true`;同库跨表勿填编号;见 `references/ACTIONS.md`「跨表引用:Lookup」)。
- `lookup-skill-cli.action.example.json`:Action Lookup **`skill_cli`** 形状参考(打开表单时宿主调兄弟技能 CLI 抽 JSON 选项;跨技能账号列表勿再造本库缓存表;见同节)。
- `lookup-paged-table.action.example.json`:Lookup **分页勾选小表** `presentation: "paged_table"` 形状参考(仍是 `display_type: lookup`;见 `references/ACTIONS.md`「分页勾选小表」)。
- `year-month-action.example.json`:Action / CRUD 账期月份字段 `display_type: year_month` 形状参考(见 `references/ACTIONS.md`「表单字段类型对照」)。
- `visible-when-action.example.json`:Action 参数字段条件显隐 `visibleWhen` 形状参考(互斥模式联动;见 `references/ACTIONS.md`「字段条件显隐」;≠ `bind.visibleWhen`,≠ Policy L3)。
- `bind-visible-when-row.action.example.json`:行菜单显隐 `bind.visibleWhen` 形状参考(按当前行状态显示/隐藏行按钮;见 `references/ACTIONS.md`「行菜单显隐」)。

View File

@@ -0,0 +1,47 @@
{
"_comment": "形状参考:Action Lookup 分页勾选小表。仍是 display_type=lookup,加 presentation=paged_table。完整契约见 references/ACTIONS.md「分页勾选小表」。不要新造 display_type。skill_cli 的 stdout 须为一行 {items,total};0 条也成功退出。列表命令不要在 main.py 入口加载整包 jiangchang_skill_core 或 Playwright。",
"schemaVersion": 1,
"skill": "your-skill-slug",
"actions": [
{
"id": "import-picked",
"label": "导入文章",
"description": "从已生成文章里勾选要导入的,可翻页。",
"placements": ["toolbar"],
"executionProfile": "sync",
"interaction": "form",
"bind": {
"tables": ["articles"],
"selectionMode": "none"
},
"entrypoint": {
"type": "cli",
"command": "import-articles",
"args": ["--ids", "{{articleIds}}"]
},
"inputSchema": {
"type": "object",
"required": ["articleIds"],
"properties": {
"articleIds": {
"type": "string",
"title": "选择文章",
"description": "勾选要导入的文章。可翻页,可本页全选。",
"display_type": "lookup",
"lookup": {
"source": "skill_cli",
"skill": "geo-generate-article-all",
"command": "title",
"args": ["list-generated-json", "--platform", "toutiaohao"],
"value_column": "id",
"label_column": "title",
"multiple": true,
"presentation": "paged_table",
"page_size": 10
}
}
}
}
}
]
}