amis icon indicating copy to clipboard operation
amis copied to clipboard

select 组件 根据option中的指定字段来确认是否选中

Open kingofzihua opened this issue 5 years ago • 4 comments

是否关联于某个问题吗:

select 组建默认选中的方式放在options 中,放在value中有些功能不好实现

预期的解决方案:

请简单描述你想达到的效果...

其他可接受方案:

请简单描述其他你可以接受的效果... { "label": "选项", "type": "select", "name": "select", "options": [ { "label": "A", "value": "a", "selectd":true, }, { "label": "B", "value": "b", "selectd":false, }, { "label": "C", "value": "c", "selectd":false, } ] }

kingofzihua avatar Aug 13 '21 02:08 kingofzihua

什么功能不好实现,具体场景呢

zhyc9de avatar Aug 13 '21 03:08 zhyc9de

JSSDK 中,我需要根据后台接口来渲染select 的option,选中哪个需要后端返回

kingofzihua avatar Aug 14 '21 01:08 kingofzihua

https://baidu.gitee.io/amis/zh-CN/components/form/options#%E5%8A%A8%E6%80%81%E9%85%8D%E7%BD%AE

RickCole21 avatar Aug 26 '21 08:08 RickCole21

如果 form 上有2个以上的 select 要由 api 取得资料,会因同名而报错,请问应如何避开此问题?

gexMichael avatar Sep 10 '21 12:09 gexMichael