this.searchValue为输入框的值
createKeywordHtml_content(data) {
if (data === undefined) {
return data;
}
if (typeof data !== 'string') {
data = String(data)
}
let value = data.replace(this.searchValue, '<span style="color:#FF5555">$&</span>');
return value
},
<el-table-column prop="date" label="日期" width="180">
<template slot-scope="scope">
<span v-html="createKeywordHtml_content(scope.row.date)">日期</span><!-- v-html="createKeywordHtml_content(scope.row[column.field])" -->
</template>
</el-table-column>