1wxml
<!-- 茶系显示隐藏函数sectionSelect -->
<view class="img-fur" data-></image>
</view>

2js
sectionSelect:function(e){
// var that=this;
// console.log(e.currentTarget.dataset.id);
var idselect = e.currentTarget.dataset.id;
var teaamong = this.data.teaamong;
if (idselect==1){
// console.log(this.data.teaamong[id].teatitle)
for (var i = 0; i < teaamong.length;i++){
console.log(teaamong[i].listshow);
teaamong[i].listshow=true;
this.setData({
teaamong: teaamong,
});
}
} else {
for (var i = 0; i < teaamong.length;i++){
teaamong[i].listshow=false;
};
teaamong[idselect-2].listshow = true;
this.setData({
teaamong: teaamong,
});
}
},


相关文章:

  • 2022-12-23
  • 2021-06-20
  • 2021-09-20
  • 2021-08-24
  • 2022-12-23
  • 2022-02-25
  • 2021-07-30
猜你喜欢
  • 2021-08-04
  • 2022-01-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案