xiaoxiaoxun

小程序选择器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
    })
  },

 

发表于 2020-06-13 13:46  z_xun  阅读(2323)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2023-03-18
  • 2021-07-29
  • 2021-12-07
  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
猜你喜欢
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2021-11-21
  • 2021-09-20
  • 2021-11-18
相关资源
相似解决方案