docs: 更新协议文档并清理过时计划文件
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user