vue v-html input,vue 中 input选中和v-show的问题

一、

1,vue中使用input选中功能,单击选中无任何问题。

但设置“全选”,点击全选时候,input标签瞬间勾中,又瞬间取消打钩,

下方“全选”按钮为点击时 用v-show 隐藏,然后使用 v-show显示“取消全选”按钮,

全选隐藏瞬间 ,input 也会跟着隐藏

二、

详见此图

34c1c16f34810082d84270fea1d12dc0.gif

三、

代码

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;

},

},

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值