vue过滤器手机号带*****掩码
let formatPhone = p=>{if(p){return p.substring(0,3) + '*****' + p.substring(p.length-2);}}<div>{{13738384380 |formatPhone}}</div>//137****80
·
let formatPhone = p=>{
if(p){
return p.substring(0,3) + '*****' + p.substring(p.length-2);
}
}
<div>{{13738384380 |formatPhone}}</div>
//137****80
更多推荐
已为社区贡献3条内容
所有评论(0)