Destination 跳转页面
1. 结构声明
- TS Declaration
- JSON Schema
class Destination extends LogicItem {
viewNamespace: string;
viewName: string;
arguments: Array<Argument>;
target: '_self' | '_blank' | '_parent' | '_top' = '_self';
anchor: Anchor;
}
{
"type": "object",
"properties": {
"composedBy": {
"type": "array",
"items": {
"type": "string"
}
},
"label": {
"type": "string"
},
"description": {
"type": "string"
},
"folded": {
"type": "boolean"
},
"offsetX": {
"type": "number"
},
"offsetY": {
"type": "number"
},
"viewNamespace": {
"type": "string"
},
"viewName": {
"type": "string"
},
"arguments": {
"type": "array",
"items": {
"$ref": "#/definitions/Argument"
}
},
"target": {
"type": "string",
"enum": [
"_self",
"_blank",
"_parent",
"_top"
]
},
"anchor": {
"$ref": "#/definitions/Anchor"
}
},
"required": [
"viewNamespace",
"viewName",
"arguments",
"target",
"anchor"
],
"additionalProperties": false
}
2. 节点示例
(1) 示例
AST 如下:
- JSON
- YAML
{
"concept": "Destination",
"viewNamespace": "app.frontendTypes.pc.frontends.pc.views.dashboard.views",
"viewName": "productList",
"arguments": [],
"target": "_self",
"anchor": {
"concept": "Anchor",
"expression": {
"concept": "StringLiteral",
"value": "标题1"
}
}
}
concept: Destination
viewNamespace: app.frontendTypes.pc.frontends.pc.views.dashboard.views
viewName: productList
arguments: []
target: _self
anchor:
concept: Anchor
expression:
concept: StringLiteral
value: 标题1
对应的代码如下:
- 文本化 NASL
goto app::frontendTypes::pc::frontends::pc::views::dashboard::views::productList()(
target = "_self",
anchor = '标题1',
)