背景:
status有三个状态,每个条件所对应的状态是不同的
代码如下:
<el-col :span="5">
<div class="grid-content">
<el-tag v-if="crud.show.status" type="success">{{
crud.show.status === "using"
? "在用"
: crud.show.status === "backup"
? "备用"
: crud.show.status === "free"
? "空闲"
: " "
}}</el-tag>
</div>
</el-col>
image.png
网友评论