amis
amis copied to clipboard
json组件显示取动态值
实现场景:
接口返回的数据,使用json组件显示某个字段
存在的问题:
json组件value只能显示写死的固定值,name取值又取不到,要怎么写
当前方案:
{
"type": "page",
"initApi": "xxx",
"body": [
{
"type": "each",
"name": "items", // 能取到值
"items": {
...
}
},
{
"type": 'json',
"name": 'items', // 取不到值
"levelExpand": 9999
}
]
}
组件放form里name才能生效