我开始是想获取picker的值,代码是这样的
data: {
array: ['请选择', '美国', '中国', '巴西', '日本'],
index: 0,
multiArray: [['早餐前', '中餐前', '晚餐前'], ['1', '2', '3', '4', '5'], ['盖']],
multiIndex: [0, 0, 0]
<picker mode="multiSelector" bindchange="bindMultiPickerChange" bindcolumnchange="bindMultiPickerColumnChange" value="{{multiIndex}}" range='{{multiArray}}'>
<view class="picker">
<image class="addUserImg" src='../../../../image/icon/jia1.jpg'>image>
view>
picker>
我先尝试了用
multiSelector: function (e) {},然后它报下面这个问题
WAService.js:9 Do not have bindMultiPickerChange handler in current page: pages/scheme/addscheme/addproduct/addproduct. Please make sure that bindMultiPickerChange handler has been defined in pages/scheme/addscheme/addproduct/addproduct, or pages/scheme/addscheme/addproduct/addproduct has been added into app.json,我又换了一下其他的,
bindMultiPickerChange: function (e) {},又报了个类似的问题,我不知道是我用法不对,还是我没有配置什么东西,哪位大神能解决一下
大哥,这个怎么解决的?我也有相同的问题,求解决方案
差不多,都是一个意思
你换成bindMultiPickerChange: function (e) {} 这个方法之后报什么错
WAService.js:9 Do not have bindMultiPickerChange handler in current page: pages/scheme/addscheme/addproduct/addproduct. Please make sure that bindMultiPickerChange handler has been defined in pages/scheme/addscheme/addproduct/addproduct, or pages/scheme/addscheme/addproduct/addproduct has been added into app.json,我又换了一下其他的,
bindMultiPickerChange: function (e) {}
我就是这样写的,完全没有问题,你的报错信息是什么?
官方有文档:https://mp.weixin.qq.com/debug/wxadoc/dev/component/picker.html
报错的原因是你没有定义bindMultiPickerChange或者bindMultiPickerColumnChange,和picker没关系