代码如下:

<view class='flex-justify_center' wx:for="{{poetry}}" wx:for-index="idx" wx:for-item="poetryLine">

<button class='image_style_left' style=' background-color: #eeeeee;' mode='aspectFit' src='' bindtap='selectPoetryLingLeft' data-poetryleft=" {{poetryLine.left}}" disabled='{{disabled_left}}'

id='{{idx}}'>

{{poetryLine.left}}</button>

<!-- {{poetryLine.left}} -->

<button class='image_style_right' style=' background-color: #eeeeee;' mode='aspectFit' src='' bindtap='selectPoetryLingRight'  data-poetryright=" {{poetryLine.right}}" disabled='{{disabled_right}}'>

{{poetryLine.right}}</button>

<!-- {{poetryLine.right}} -->

</view>


问题:通过for循环创建了很多button,现在我想对点击的button做disabled=true的处理。怎么实现啊。就是说想对单个的button做disabled的处理。目前就是一改全部都改掉了

展开全部
收起
0回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部