crud的filter表单下拉框中如果使用了上层service中的数据,默认获取不到数据
Closed this issue · 1 comments
dabanheiji commented
描述问题:
crud的filter表单下拉框中如果使用了上层service中的数据,默认获取不到数据,进行一次查询操作后才能获取到
截图或视频:
如何复现(请务必完整填写下面内容):
-
你是如何使用 amis 的?
使用方式见下方schema -
amis 版本是什么?请先在最新 beta 版本测试问题是否存在
目前站点上问题依然存在 -
粘贴有问题的完整
amis schema
代码:
{
"type": "page",
"body": {
"type": "service",
"api": {
"url": "https://aliyunfc-amis-mock-gmecwxibod.cn-beijing.fcapp.run/api/amis-mock/mock2/options/autoComplete3?term=$term",
"adaptor": "return { data: { options: payload } }"
},
"body": [
{
"type": "tpl",
"tpl": "${options.data|json}"
},
{
"type": "crud",
"api": "/amis/api/mock2/sample",
"syncLocation": false,
"autoGenerateFilter": {
"defaultExpanded": true,
"showBtnToolbar": false
},
"filter": {
"body": [
{
"type": "select",
"name": "browser",
"label": "浏览器",
"labelField": "lab",
"valueField": "val",
"placeholder": "选择浏览器",
"source": "${options.data}"
}
]
},
"headerToolbar": [
{
"type": "columns-toggler",
"align": "right",
"draggable": true,
"icon": "fas fa-cog",
"overlay": true,
"footerBtnSize": "sm"
}
],
"columns": [
{
"name": "id",
"label": "ID"
},
{
"name": "engine",
"label": "Rendering engine"
},
{
"name": "browser",
"label": "Browser"
},
{
"name": "platform",
"label": "Platform(s)",
"headSearchable": true
},
{
"name": "version",
"label": "Engine version"
},
{
"name": "grade",
"label": "CSS grade",
"headSearchable": {
"type": "input-text",
"name": "grade",
"label": "CSS grade",
"mode": "horizontal"
}
}
]
}
]
}
}
- 操作步骤
请简单描述一下复现的操作步骤...