【发布时间】:2016-07-30 20:39:25
【问题描述】:
我正在创建 VSCode 扩展,需要使用包含字段的对象数组进行配置:a 和 b。使用扩展文档()中提供的信息,我不清楚是否可以定义数组元素的configuration 模式,是否将属性类型设置为"array"。我尝试将以下代码放在"configuration" 贡献中,但没有成功(我可以在代码中成功检索配置,但用户填写数据时没有IDE提示):
"title": "My config",
"properties": {
"array_property": {
"title": "Property",
"type": "array",
"properties": {
"a": {
"type": "string",
"description": "A a"
},
"b": {
"type": "string",
"description": "A b"
}
}
}
}
我尝试将"type": "array" 替换为"type": ["array", "object"],但没有任何改变。
【问题讨论】:
标签: visual-studio-code vscode-extensions