«

判断值的状态显示

时间:2024-1-24 15:40     作者:yang     分类: 项目


后端返回的着值需要判断显示

<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> 

版权所有:微4e
文章标题:判断值的状态显示
除非注明,文章均为 微4e 原创,请勿用于任何商业用途,禁止转载

推荐阅读:


扫描二维码,在手机上阅读