C#中对象循环forEach
this.tableData.forEach((e)=>{
console.log(e.CAPAStatus);
if (e.CAPAStatus == 1)
this.showButton=true;
else
this.showButton = false;
})
button直接属性直接用el-button
:disabled="scope.row.CAPAStatus != 1"
在C#中,使用forEach遍历tableData对象,根据每个元素的CAPAStatus属性值决定showButton的显示状态。当CAPAStatus等于1时,showButton设为true,否则设为false。在前端,按钮的disabled属性绑定为当前行CAPAStatus不等于1的判断表达式。
788

被折叠的 条评论
为什么被折叠?



