Angular 架构表单 - 覆盖字段的输入类型

Angular Schema form - Override the input type of a field

考虑架构

{
  "type": "object",
  "title": "Comment",
  "properties": {
    "name": {
      "title": "Name",
      "type": "string"
    },
    "gender":{
        "title":"Gender",
        "type":"string",
        "enum":["m","f"]
    },
    "comment": {
      "title": "Comment",
      "type": "string",
      "maxLength": 20,
      "validationMessage": "Don't be greedy!"
    }
  },
  "required": [
    "name",
    "email",
    "comment"
  ]
}

如何将 性别 的 html 表单类型从 select 覆盖为另一种类型(像输入类型 text) 不使用 x-schema-form 属性 并且不重写表单的整个字段(使用“*”并只是更改必填字段)。我尝试了以下表单定义,但字段重复。

[
  "*",
  {
      "key":"gender",
      "type":"text"
  },
  {
    "type": "submit",
    "style": "btn-info",
    "title": "OK"
  }
]

以上定义将显示两个 gender 字段,一个类型为 select,另一个类型为 文本。我的要求是只显示 gender 类型 text 其中 gender 类型 select显示。

v1.0.0-alpha.1 开始,添加了使用键“...”的功能,以允许在表单定义中添加剩余的未定义架构 属性 键。