docs: 更新协议文档并清理过时计划文件

This commit is contained in:
zl-q
2026-03-30 09:07:07 +08:00
parent 5999d0edd1
commit 0f3175e303
13 changed files with 1359 additions and 842 deletions
+8 -2
View File
@@ -162,6 +162,12 @@ interface UiBadgeNode extends UiBaseNode {
}
```
`label` contract:
- Backend SHOULD return stable i18n tokens for status badges: `ui.status.info|success|warning|error|pending`
- Frontend is responsible for localizing these tokens by current locale
- Backward compatibility: frontend SHOULD still tolerate legacy uppercase labels (`INFO/SUCCESS/...`) during migration
- Unknown token fallback: frontend SHOULD keep original label (no semantic remap to other statuses)
#### 4. Button Node
```typescript
@@ -455,7 +461,7 @@ interface UiIconSpec {
},
{
"type": "badge",
"label": "ERROR",
"label": "ui.status.error",
"status": "error"
}
]
@@ -729,7 +735,7 @@ UiSchemaRenderer (for frontend rendering)
"gap": 8,
"children": [
{"type": "text", "content": "日程已创建", "role": "title"},
{"type": "badge", "label": "SUCCESS", "status": "success"}
{"type": "badge", "label": "ui.status.success", "status": "success"}
],
"justify": "space-between",
"align": "center"