简单记录一下 用正则匹配
效果图
vue3写法
{{text ? text.replace(/(\d{3})(\d{4})(\d{4})/,"$1****$3"):""}}
vue2写法
{{scope.row.sender?scope.row.sender.replace(/(\d{3})(\d{4})(\d{4})/,"$1****$3"):""}}
欢迎分享,转载请注明来源:内存溢出
简单记录一下 用正则匹配
效果图
vue3写法
{{text ? text.replace(/(\d{3})(\d{4})(\d{4})/,"$1****$3"):""}}
vue2写法
{{scope.row.sender?scope.row.sender.replace(/(\d{3})(\d{4})(\d{4})/,"$1****$3"):""}}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)