Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我调用了我的数据层,它带回了 json 对象。我需要获取这个对象并将其转换为我的 selectField 中的选项数组。这个 json 对象有一个地区名称和一个地区 ID——这就是对象中的全部内容。
在 selectfield 配置中,将 valueField 设置为 'DistrictID' 并将 displayField 设置为 'District' 然后只需 selectField.setOptions(json)