【解决】用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; }