In the above conditional expression, the third part of expression is a conditional expression. According to the associativity of the conditional expression, the above conditional expression is equivalent to:
quote
x>0?1:(x<0?-1:0)
Judging three states in 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>