element ui 表格的checkbox根据当前行的状态,勾选禁止不勾选
vue<el-table ref=“multipleTable” :data=“appList” border tooltip-effect=“dark” style=“width: 100%;height: 380px;overflow:auto” @selection-change=“changeFun”><el-table-column type=“selection”..
·
vue
<el-table ref=“multipleTable” :data=“appList” border tooltip-effect=“dark” style=“width: 100%;height: 380px;overflow:auto” @selection-change=“changeFun”>
<el-table-column type=“selection” width=“55” class=“selection” prop=‘uuid’ :selectable=‘checkboxInit’ @selection-change=“changeFun”>
<el-table-column label="">
<template scope="scope"></template>
</el-table-column>
<el-table-column prop="username" label="username"></el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column>
</el-table>
js
checkboxInit(row,index){
if (xxx)
return 0;//不可勾选
else
return 1;//可勾选
},
更多推荐
已为社区贡献5条内容
所有评论(0)