amis
amis copied to clipboard
select组件将value格式设为数组时,数组为单一值与非单一值时选中后显示的label规则不一致
描述问题:
select组件,单选,如何将选中结果设置为数组
截图或视频:
见第4步
如何复现(请务必完整填写下面内容):
-
你是如何使用 amis 的? 直接在官方编辑代码文档中调试
-
amis 版本是什么?请先在最新 beta 版本测试问题是否存在 最新版本
-
粘贴有问题的完整
amis schema
代码:
{
"type": "page",
"body": {
"type": "form",
"debug": true,
"body": [
{
"label": "选项",
"type": "select",
"name": "select",
"multiple": false,
"joinValues": false,
"extractValue": true,
"options": [
{
"label": "A",
"value": [
"a1",
"a2",
"a3"
]
},
{
"label": "B",
"value": [
"b"
]
},
{
"label": "C",
"value": [
"c"
]
}
]
},
{
"type": "tpl",
"tpl": "${select|json}"
}
]
}
}
- 操作步骤
- 选择B项时,select显示B,值为["b"],符合预期
- 选择A项时,select显示a1,值为["a1","a2","a3"],值符合预期,select项显示为a1不符合预期,应该显示A。此时添加"labelField":"label",竟然显示Property labelField is not allowed.