复选框 选中 取消

 <input v-if="item.ad_unique_id == null" type="checkbox" name="checkbox" value="checkbox" style="zoom:200%;" class="checkinput"
 @click="checkedclick($event,item)">
cabinet_ids: [],

 checkedclick(event, item) {
                if(event.target.checked==true){
                    this.cabinet_ids.push(
                        item.unique_id,
                    );
                }
                else{
                    this.cabinet_ids.pop()
                }
                console.log(this.cabinet_ids)
  },


猜你喜欢

转载自blog.csdn.net/zhumizhumi/article/details/79537064