Как ввести значение типа массива для угловой схемы - PullRequest
1 голос
/ 08 апреля 2019

Я изучаю угловые схемы и у меня есть некоторые проблемы, связанные с типом ввода .

Как только я нажимаю ввод, значение просто исчезает.Могу ли я узнать, как ввести значение массива?

enter image description here

Я пишу schema.json следующим образом

{
    "$schema": "http://json-schema.org/schema",
    "id": "HelloWorldSchematics",
    "title": "Hello World Options Schema",
    "type": "object",
    "properties": {
      "listName": {
        "type": "string",
        "description": "The name of the list.",
        "$default": {
          "$source": "argv",
          "index": 0
        },
        "x-prompt": "What's the name of list"
      },
      "colNames": {
        "type": "array",
        "items": {
            "type": "string"
        },
        "description": "The name of the columns.",
        "x-prompt": "What's the name of columns"
      }
    },
    "required": [
        "listName",
        "colNames"
    ]
}
...