转换数据显示不同CSS

1
2
3
4
5
6
7
8
9
10
11
<el-table-column
prop="state"
label="状态"
width="150"
>
<template scope="scope">
<div :class="{active:scope.row.state == '0'}">
<span>{{scope.row.state == '0'?'冻结':'正常'}}</span>
</div>
</template>
</el-table-column>