vue table中的列计算


 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  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM