小凡156

博客园 首页 新随笔 联系 订阅 管理
 1       <el-table-column align="center" prop="amount" label="实收金额(元)">
 2           <template slot-scope="scope">
 3             <span v-if="scope.row.amount != null && scope.row.poundage != null">{{scope.row.amount - scope.row.poundage}}</span>
 4           </template>          
 5       </el-table-column>
 6       <el-table-column align="center" prop="poundage" label="手续费"></el-table-column>
 7       <el-table-column align="center" prop="identity" label="证件号码">
 8           <template slot-scope="scope">
 9             <span v-if="scope.row.identity !== null && scope.row.identity.length > 7">{{scope.row.identity.substr(0, 3) + "****" + scope.row.identity.substr(scope.row.identity.length - 4)}}</span>
10             <span v-else>{{scope.row.identity}}</span>
11           </template>
12       </el-table-column>

v-if/v-else  

posted on 2019-10-15 10:00  小凡156  阅读(2866)  评论(0编辑  收藏  举报