antd ~~~ a-table 整行添加class樣式


第一步:在a-table標簽上添加:

:rowClassName="tableRowClass"
 
第二步:在methods里添加方法:
tableRowClass (record, index) {
      if (record.showStatus == 1) {
        return "rowClass";
      }
      return "";
},

  

第三步:在style里添加class樣式

/deep/.ant-table-tbody .rowClass {
  color: greenyellow;
}

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



猜您在找 antd 增加自增序號+分頁 antd-vue中給table表格整行加點擊事件 antd Table每列樣式修改 antd vue table 單元格添加樣式背景色 customCell屬性 vue class添加樣式 elementUI之通過指定 Table 組件的 row-class-name 屬性來為 Table 中的某一行添加 class改變該行的顏色等樣式。 "> 表格樣式 Element Table 動態合並 添加整行數據 [ vue ] antd-vue中給table表格整行加點擊事件(轉)
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM
table添加正確的樣式