我似乎找到了解决方案:)
需要放"defaultValue": [ "undefined" ]
。完整代码如下。
{
"fieldGroup": [
{
"key": "driver_section",
"type": "repeatDrivers",
"defaultValue": [ "undefined" ],
"fieldArray": {
"fieldGroup": [
{
"key": "last_name",
"type": "input",
"className": "flex-2",
"defaultValue": "",
"templateOptions": {
"label": "Фамилия",
"required": true
}
},
{
"key": "first_name",
"type": "input",
"className": "flex-2",
"defaultValue": "",
"templateOptions": {
"label": "Имя",
"required": true
}
},
{
"key": "paternal_name",
"type": "input",
"className": "flex-2",
"defaultValue": "",
"templateOptions": {
"label": "Отчество",
"required": true
}
},
{
"key": "date_of_birth",
"type": "input",
"className": "flex-2",
"defaultValue": "",
"templateOptions": {
"type": "date",
"label": "Дата рождения",
"required": true
}
},
{
"key": "series_and_number_of_VU",
"type": "input",
"className": "flex-2",
"defaultValue": "",
"templateOptions": {
"type": "number",
"label": "Серия и номер ВУ",
"required": true
}
},
{
"key": "date_of_issue_of_the_current_VU",
"type": "input",
"className": "flex-2",
"defaultValue": "",
"templateOptions": {
"type": "date",
"label": "Дата выдачи действующего ВУ",
"required": true
}
},
{
"key": "year_of_issue_of_the_first_VU",
"type": "input",
"className": "flex-2",
"defaultValue": "",
"templateOptions": {
"type": "number",
"label": "Год выдачи первого ВУ",
"required": true
}
},
{
"key": "driver_license_changed",
"type": "checkbox",
"className": "flex-2",
"defaultValue": "",
"templateOptions": {
"label": "Водительское удостверение менялось в течение года",
"required": false
}
}
],
"fieldGroupClassName": "display-flex"
},
"templateOptions": {
"title": "Drivers",
}
}
],
"fieldGroupClassName": "display-flex"
}