上述条件表达式中,表达式3部分又是一个条件表达式.根据条件表达式的结合性,上述条件表达式等价于:

引用

 

x>0?1:(x<0?-1:0)

vue elementui中判断三个状态

<template slot-scope="scope">
<el-tag :type="scope.row.auditStatus === '已通过' ? 'primary' :(scope.row.auditStatus === '待审核'?'success':'danger')" disable-transitions>{{scope.row.auditStatus}}</el-tag>
</template>

相关文章:

  • 2022-12-23
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
猜你喜欢
  • 2021-11-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
相关资源
相似解决方案