我有一个带有3个字段的配置json,第3个字段是根据前2个字段中的数据计算出来的字段。这里的关键是我在他们的主要名字中有点(.)。e、 g.“something.someone”当我尝试渲染表单时,会出现一个显示未定义的错误。我的配置文件:
{
"fieldGroupClassName": "row",
"fieldGroup": [
{
"className": "col-2",
"key": "remarks_backflow.bed",
"type": "input",
"templateOptions": {
"type": "number",
"label": "Bed",
"placeholder": "",
"required": true
}
},
{
"className": "col-2",
"key": "remarks_backflow.gas",
"type": "input",
"templateOptions": {
"type": "number",
"label": "Gas",
"placeholder": "",
"required": true
}
},
{
"className": "col-2",
"key": "remarks_backflow.diff",
"type": "input",
"templateOptions": {
"type": "number",
"label": "Difference",
"placeholder": "",
"required": true
},
"expressionProperties": {
"model['remarks_backflow.diff']":"model['remarks_backflow.bed'] - model['remarks_backflow.gas']"
}
},
]
}
错误是:formbuildercomponent.html:24错误类型错误:[formly error][表达式“model['pushin_temperature.kille_id']”无法设置未定义的属性“kille_id']”
提前谢谢!
暂无答案!
目前还没有任何答案,快来回答吧!