EnumItem 枚举值
1. 结构声明
- TS Declaration
- JSON Schema
class EnumItem extends BaseNode {
value: string;
label: string;
}
{
"type": "object",
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
}
},
"required": [
"value",
"label"
],
"additionalProperties": false
}
2. 节点示例
(1) 带描述的示例
AST 如下:
- JSON
- YAML
{
"concept": "EnumItem",
"value": "Listing",
"label": "上架"
}
concept: EnumItem
value: Listing
label: 上架