想没勾选就disabled = false,勾选就true,我这个只生效一遍,第二次进来怎么点都是false...
<tr v-for="(item,index) in list" :key="item.id">
<td class="checkbox">
<el-checkbox v-model="item.sel"></el-checkbox>
</td>
</tr>
<div :disabled= "disabled">提交订单</div>
this.list = [
{
sel:false
},
{
sel:false
}
]
//勾选触发监听
this.list.forEach(i => {
if (i.sel) {
this.disabled = false
}
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…