一、
1,vue中使用input选中功能,单击选中无任何问题。
但设置“全选”,点击全选时候,input标签瞬间勾中,又瞬间取消打钩,
下方“全选”按钮为点击时 用v-show 隐藏,然后使用 v-show显示“取消全选”按钮,
全选隐藏瞬间 ,input 也会跟着隐藏
二、
详见此图
三、
代码
1、&一如分算需上来处一定迹面数一跳这件我子作lt;templa新直能分支调二浏页器朋代说,事刚需求te>
2、
data(){
return{
AllChoiceYes:true,
AllChoiceNo:false,
selectArr: [],
}
},
methods:{
//全部选中
take_All_SKID(){
$(".choice").prop("checked", true);
var AllReadlistDel = '';
//console.log(this.records.length)
//$(".yesorno_svg").prop("checked", true);
for (var i = 0; i < this.records.length; i++) {
//console.log(this.records[i].GoodsList[i].SKID)
this.records[i].GoodsList.map(item => {
//console.log(item.SKID)
AllReadlistDel += item.SKID + ',';
//console.log(this.AllReadlistDel);
});
};
this.AllReadlistDel = AllReadlistDel.substr(0,AllReadlistDel.length - 1);
this.AllChoiceYes = false;
this.AllChoiceNo = true;
console.log(this.AllReadlistDel)
},
//取消全选
no_take_All_SKID(){
$(".choice").prop("checked", false);
this.selectArr = [];
this.AllChoiceNo = false;
this.AllChoiceYes = true;
},
},