判断值的状态显示
后端返回的着值需要判断显示
<template slot-scope="scope">
{{
scope.row.documentStatus === ""
? "正常"
: scope.row.documentStatus === "1"
? "停用"
: "删除"
}}
<span v-if="!scope.row.documentStatus">正常</span>
<span v-else="scope.row.documentStatus === '1'">停用</span>
<span v-else="scope.row.documentStatus === '2'">删除</span>
</template>
推荐阅读:
扫描二维码,在手机上阅读