nutui-react
nutui-react copied to clipboard
Picker自定义省市区数据结构的key(关键词)
What problem does this feature solve?(这个功能解决的问题)
现在默认为「value」,「text」有时候数据格式,并不会固定,然后还得自己循环改,比较麻烦,定义一下这个key,就没那么麻烦了
What does the proposed API look like?(期望的 API)
这样
<Picker
listDataKey = {
value: 'value',
name: 'text',
children: 'children'
}
></Picker>
或者
<Picker
listDataKey = {
value: 'value',
name: 'text',
children: {
{
value: 'value',
name: 'text',
children: {
{
value: 'value',
name: 'text'
}
}
}
}
}
></Picker>
后续在 2.0 版本中考虑实现