小编And*_*ang的帖子

如何为角度示意图输入数组类型值

我正在学习 Angular Schematics 并且在数组类型 input方面有一些问题。

当系统提示我输入一个值并按 Enter 时,该值消失。输入数组值的正确方法是什么?

在此处输入图片说明

我的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"
    ]
}
Run Code Online (Sandbox Code Playgroud)

json angular-schematics

5
推荐指数
1
解决办法
367
查看次数

[String!]和[String]之间有什么区别!

我是很新的雨燕,想知道之间的区别[String!][String]!.两者都不是可选的?但是[String]!表明nil什么时候未初始化而[String!]不是?

arrays optional ios swift

3
推荐指数
2
解决办法
202
查看次数

标签 统计

angular-schematics ×1

arrays ×1

ios ×1

json ×1

optional ×1

swift ×1