amis 通过数据接口获取值的单选框,在设置默认值后无法再选择其他选项

o4hqfura  于 3个月前  发布在  其他
关注(0)|答案(1)|浏览(58)

如题
{ "type": "radios", "label": "未转客户原因", "name": "reasonOfBeCustomerFailure", "multiple": true, "id": "u:a05e7ffbb9a0", "checkAll": false, "joinValues": false, "delimiter": ",", "extractValue": true, "source": { "url": "/tag/template", "method": "get", "requestAdaptor": "", "adaptor": "", "messages": {}, "data": { "&category": "REASON_OF_BE_CUSTOMER_FAILURE" } }, "labelField": "name", "valueField": "name", "hiddenOn": "${beCustomer===true}", "clearValueOnHidden": true, "selectFirst": false, "value": "${reasonOfBeCustomerFailure.tag}", "inline": false, "columnsCount": 5 }

ippsafx7

ippsafx71#

排查了一下原因是因为循环引用的问题,因为CRUD里面我返回的字段比如是这样:gender: {
"ordinal": 0,
"name": "FEMALE",
"description": "女"
}

然后我表单里面的radios组件要设置默认值,设置为gender.name,但是这个组件的字段名就是gender,然后就会产生循环引用,这个问题可以解决吗?还是我只能改后端代码。

相关问题