We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@nutui/nutui
4.3.7
h5
http://www.1314test.com/user/report/love
使用方式: <nut-picker v-model="taCity" :columns="columnsCity" title="城市选择" @cancel="showCityPicker = false" @confirm="handleConfirm" />
const handleConfirm = ({ selectedValue, selectedOptions }) => { console.log("selectedValue",selectedValue, "selectedOptions",selectedOptions); }; 数据结构:[{ "text":"江苏", "value":"32", children:[{ "text":"南京", "value":"3201", }, { "text":"无锡", "value":"3202", }] }]
第一次选择江苏省份非第一个城市时handleConfirm方法回调中的参数应该为选中那条城市的数据
第一次选择时返回的数据总是该省份下的第一个城市即南京,其他省份选择也一样,已经通过断点反复调试,发现回调中的数据始终为第一个城市,再次编辑时即正常,怀疑组件内的默认值逻辑是否存在问题。城市数据从接口获取而来,格式在步骤中有标注。
No response
重现链接需要注册才可以访问有问题的页面
The text was updated successfully, but these errors were encountered:
一样的问题,疯了
Sorry, something went wrong.
No branches or pull requests
NutUI 包名
@nutui/nutui
NutUI 版本号
4.3.7
平台
h5
重现链接
http://www.1314test.com/user/report/love
重现步骤
使用方式:
<nut-picker v-model="taCity" :columns="columnsCity" title="城市选择" @cancel="showCityPicker = false"
@confirm="handleConfirm" />
const handleConfirm = ({ selectedValue, selectedOptions }) => {
console.log("selectedValue",selectedValue, "selectedOptions",selectedOptions);
};
数据结构:[{
"text":"江苏",
"value":"32",
children:[{
"text":"南京",
"value":"3201",
},
{
"text":"无锡",
"value":"3202",
}]
}]
期望的结果是什么?
第一次选择江苏省份非第一个城市时handleConfirm方法回调中的参数应该为选中那条城市的数据
实际的结果是什么?
第一次选择时返回的数据总是该省份下的第一个城市即南京,其他省份选择也一样,已经通过断点反复调试,发现回调中的数据始终为第一个城市,再次编辑时即正常,怀疑组件内的默认值逻辑是否存在问题。城市数据从接口获取而来,格式在步骤中有标注。
环境信息
No response
其他补充信息
重现链接需要注册才可以访问有问题的页面
The text was updated successfully, but these errors were encountered: