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