0
点赞
收藏
分享

微信扫一扫

element表格的点击行后赋值class操作

东言肆语 2022-02-14 阅读 35
<el-table @cell-click="rowClick" :row-class-name="rowClass">
/**
 * 表格行的class赋值
 */
rowClass({row, rowIndex}) {
    row.index = rowIndex;
    if(this.cargoKindDialogClickRow === rowIndex) {
        return "tableActive";
    }
}

/**
 * 模态框中分类的点击事件
 */
rowClick(row) {
    this.cargoKindDialogClickRow = row.index;
}
举报

相关推荐

0 条评论