VUE中table,选择列过滤操作
作者:
乘风破浪的哥哥 | 来源:发表于
2021-08-03 10:30 被阅读0次
在vue中,使用el-table遇到需要对选择列进行部分可选操作,可以通过设置选择属性过滤,来实现部分可选
template
<el-table v-loading="loading" ref="multipleTable" :data="tableData">
<el-table-column type="selection" width="55" :selectable="disabledCheckBox" />
<!-- 注:selectable的类型必须是function -->
</el-table>
script
methods: {
disabledCheckBox(row, index) {
if (this.activeName==='0') {
return true
} else {
return false
}
}
}
本文标题:VUE中table,选择列过滤操作
本文链接:https://www.haomeiwen.com/subject/adnsvltx.html
网友评论