方法
在el-table-column中添加自定義模版樣式進行修改。
示例代碼
<el-table-column prop="isPass" label="是否通過"> <template scope="scope"> <span v-if="scope.row.isPass==='審核通過'" style="color: green">審核通過</span> <span v-else-if="scope.row.isPass==='待審核'">待審核</span> <span v-else style="color: red">未通過</span> </template> </el-table-column>