1、标签内:
<p>{{info.mobile | changePhone}}</p>
2、方法:注意和data同级:
filters: {
changePhone(value) {
var len = value.length;
var x = value.substring(3, len - 4);
var values = value.replace(x, "****");
return values; } },
3、第二种方式:通过substr()方式改变
<el-table-column label="客户号码" align="center" min-width="120">
<template slot-scope="scope">
<span>{{scope.row.remotePhone.substr(0, 3) + '****' + scope.row.remotePhone.substr(7)}}</span>
</template>
</el-table-column>