Vue中使用element-ui中的el-table时修改列的字体颜色
|
方法:
在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>
|
|
|
|
发表于 2024-11-4 12:23:49
举报
回复
分享
|
|
|
|