您的位置:首页 > 产品设计 > UI/UE

element-ui字体颜色变换

2019-03-25 13:52 2121 查看

element-ui根据report_null值改变字体颜色

[code]<el-table-column prop="name" label="名称" >
<template slot-scope="scope">
<span v-if="scope.row.report_null === '1' " style="color:#37B328">
{{ scope.row.name }}</span>
<span v-else style="color: red">
{{ scope.row.name }}</span>
</template>
</el-table-column>

tag标签

[code]<el-table-column prop="method" label="周期">
<template slot-scope="scope">
<el-tag :type="scope.row.report_null === '1' ? 'primary' : 'success'" disable-transitions>
{{scope.row.method}}</el-tag>
</template>
</el-table-column>

 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: