element-ui 的table中让某个单元格变色

 

methods中:
    // 未指派时,背景变黄
rowIndex是第几行,columnIndex是第几列
    yellowBg ({row, column, rowIndex, columnIndex}) {
      if (row.statusName === '未指派' && columnIndex === 2) {
        return {
          background: '#eceb3c'
        }
      }
    },

element-ui 的table中让某个单元格变色_第1张图片

你可能感兴趣的:(element-ui)