如图 是表格中显示的 出租状态
表格中的出租状态列
<el-table-column
prop="isRenting"
label="出租状态"
align="center">
<template slot-scope="scope">
<el-tag
:type="scope.row.isRenting == '1' ? '' : scope.row.isRenting == '0'?'danger':'success'"
disable-transitions>{{scope.row.isRenting == '1' ? "已出租" :scope.row.isRenting ==
'0'?"未出租":"已预约"}}
</el-tag>
</template>
</el-table-column>
出租状态为1 则显示已出租 tag标签类型为默认类型
出租状态为0 则显示未出租 tag标签类型为danger
出租状态不为0和1,则显示已预约,tag标签类型success