0.9.17
react-native 0.37.0
https://mobile.ant.design/components/picker-cn/
使用 Picker 组件,在安卓中必现。
报错在编译后的文件 NativePicker.android.js 第 84 行,this 是个 undefined
if (this.itemHeight !== height || this.itemWidth !== width) {
this.itemWidth = width;
this.refs.indicator.setNativeProps({
style: [styles.indicator, {
top: height * 3,
height: height,
width: width
}]
});
}
和 iOS 相同效果
安卓出错
使用的官方 demo
我的也是提示这个,上午还好好的。下午就莫名其妙的出了这个问题。
@cloudsafe 我现在是直接改代码修复的
@xwartz 你是怎么修改的?共享下可以不。很头疼,所有表单用Picker的都报错,工作进行不下去了都。
@cloudsafe 用 NativePicker.ios.js 的代码替换了 NativePicker.android.js,使用 RN 默认的了
@cloudsafe @xwartz Sorry about this. please run rm -rf node_modules && npm i. Thanks
Most helpful comment
@cloudsafe @xwartz Sorry about this. please run
rm -rf node_modules && npm i. Thanks