小程序选择器picker 绑定数组对象


<picker bindchange="bindPickerChange"
value="{{clientArray[index].uid}}"
 range="{{objectArray}}" range-key="category_name" data-category_id='{{objectArray[index].category_id}}'>
             <input class="input " value="{{objectArray[index].category_name}} "></input>
        </picker>
  bindPickerChange: function (e) {
    console.log(e)
    let category_id = e.currentTarget.dataset.category_id;
    console.log('picker发送选择改变,携带值为', e.detail.value)
    this.setData({
      category_id: category_id
    })
  },

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM