Vue前端开发时element ui设置头部第一行的背景颜色

methods: {
    getRowClass ({ row, column, rowIndex, columnIndex }) {
      if (rowIndex === 0) {
        return 'background:#87CEEB'
      } else {
        return ''
      }
    },

效果如图:

猜你喜欢

转载自blog.csdn.net/Hyo555/article/details/82177661