银行卡只显示前后四位,中间用*星号代替

<el-table-column label="银行账号" align="center" prop="cardNumber" >
	<template slot-scope="{row}">
	   <span>
		 { {  row.cardNumber ? row.cardNumber.replace(/^(\d{ 4})\d+(\d{ 4})$/,"$1****$2") :""}}
		</span>
	</template>
</el-table-column>
    原文作者:Change!!
    原文地址: https://blog.csdn.net/weixin_46172085/article/details/121163499
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞