表达式 (expr1) ? (expr2) : (expr3)
在 expr1 求值为 TRUE 时的值为 expr2,在 expr1 求值为 FALSE 时的值为 expr3。
1、
<div>是否:{{record.hdSflhcp == 1?"是":"否"}}</div>
2、
<span :class="Zt(scope.row.xmZt)">{{scope.row.xmZt==1?"显示":"隐藏"}}</span>
3、
<template slot-scope="scope">
<span :class="Zt(scope.row.dfZt)">{{scope.row.dfZt ?"未开始":"已提交":"已完成"}}
</span>
</template>
4、
<div :height="value?'40vh':'80vh'">
<div>
<el-switch v-model="value" active-text="公式" inactive-text="人工" @change="switchChange">
</el-switch>
</div>
</div>