.then(res => { res.detail.list.map((item,i)=>{ item.smsMsg=this.brightenKeyword(item.smsMsg,this.pagination.content) }) //调用brightenKeyword方法 this.tableData3 = res.detail.list; this.count = res.detail.count; //高亮搜索字体 brightenKeyword(val, keyword) { val = val + ''; if (val.indexOf(keyword) !== -1 && keyword !== '') { return val.replace(keyword, '<font color="#409EFF">' + keyword + '</font>') } else { return val } },