使用三元表达式
html
<el-table-column prop="state" label="启用" width="180">
<template v-slot="{ row }">
<span>{{
row.state === 1 ? "已启用" : row.state === 0 ? "未启用" : "无"
}}</span>
</template>
</el-table-column>