点击全选按钮

This commit is contained in:
jqtmviyu@gmail.com 2021-03-05 02:04:43 +08:00
parent 11ff80ec4c
commit ac9b0c4d41

View File

@ -15,7 +15,7 @@
<!-- 底部结算栏 -->
<view class="bottom">
<radio :checked="selectAll" color="#E03440" class="select_btn" />
<radio @tap="selectAllChange" :checked="selectAll" color="#E03440" class="select_btn" />
<text class="select_text">全选</text>
<text class="total_text">合计</text>
<text class="price">{{totalPrice}}</text>
@ -64,6 +64,11 @@ export default {
return
}
this.cartList[index].goods_count += num
},
//
selectAllChange(){
let temp = !this.selectAll
this.cartList.forEach(item=>item.goods_select = temp)
}
},
//