BindStyle 元素绑定样式
1. 结构声明
- TS Declaration
- JSON Schema
class BindStyle extends BaseNode {
name: string = '';
expression?: LogicItem;
playground: Array<LogicItem>;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"expression": {
"$ref": "#/definitions/LogicItem"
},
"playground": {
"type": "array",
"items": {
"$ref": "#/definitions/LogicItem"
}
}
},
"required": [
"name",
"playground"
],
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"concept": "BindStyle",
"name": "background-color",
"expression": {
"concept": "Identifier",
"namespace": "",
"name": "bgColor"
},
"playground": []
}
concept: BindStyle
name: background-color
expression:
concept: Identifier
namespace: ""
name: bgColor
playground: []
对应的代码如下:
- 文本化 NASL
- Natural TS
\`background-color\`: bgColor
_background-color: bgColor