【解決】用v-model="searchData.searchDate"
,不能用:model="searchData.searchDate"
code
【解決】
<el-table>
標籤中有一個:row-class-name="getRowClassName"
屬性
getRowClassName是一個方法,返回一個class的名稱ip
getRowClassName({row,rowIndex}){ if(row.detail == 10 || row.detail == 12){ return "remind"; } }
.el-table .remind { color: red; }
【解決】<el-table>
標籤中有一個:cell-class-name="getVipStatusClass"
屬性,getVipStatusClass
是一個方法,返回一個class的名稱。rem
getVipStatusClass({row,column,rowIndex,columnIndex}){ if(row.status == 1){ if(columnIndex == 4){ return "effective"; } } if(row.status == 0){ if(columnIndex == 4){ return "ineffective"; } } }
.el-table .effective{ color: #70B603; } .el-table .ineffective{ color: #AAA; }