Wux weapp 组件库的 bug—— wux-picker选择器组件无法正确初始化到选定的value

options的value为Number,组件无法正常使用

解决方案,修改picker-view/utils.js中的getIndexFromValue函数,如下:

JavaScript 复制代码
export function getIndexFromValue(value, col = [], fieldNames = DEFAULT_FIELD_NAMES) {
  //return getRealIndex(col.map((v) => v[fieldNames.value]).indexOf(value), 0, col.length - 1)
  if(value == null){
    return 0
  }
  return getRealIndex(col.map((v) => v[fieldNames.value].toString()).indexOf(value.toString()), 0, col.length - 1)
}
相关推荐
我是伪码农8 小时前
小程序100-125
开发语言·小程序·php
xshirleyl1 天前
微信小程序开发week8-慕尚花坊项目
微信小程序·小程序
code_li2 天前
小程序上线需要的资质证书汇总
小程序·上线·发布·资质
hnxaoli2 天前
统信小程序(十三)循环键鼠操作程序
python·小程序
i查拉图斯特拉如是2 天前
使用workbuddy 30分钟搭建微信小程序
微信小程序·小程序
2501_916008892 天前
Mac 上生成 AppStoreInfo.plist 文件,App Store 上架
android·macos·ios·小程序·uni-app·iphone·webview
咖啡の猫2 天前
小程序协同工作和发布
小程序
维双云3 天前
小程序怎么制作工具?与其盲目找开发,不如先分清自己要哪一种
小程序
qq_9109462923 天前
校园共享电动车租赁小程序
小程序
侃谈科技圈3 天前
5G网络仿真软件哪个更高效?Ranplan两款核心产品深度解析
小程序