fix: 修复实体搜索切换页码不高亮,以及多个搜索关键字拼接为一个字段时不高亮等问题
This commit is contained in:
@@ -1379,13 +1379,13 @@ export const myHighLight = {
|
||||
const newText = text.replace(regex, (match) => {
|
||||
// 将value中的value提取出来对比,string即精准搜索,fullText模糊搜索
|
||||
for (const item of value) {
|
||||
if (item.type === columnType.string && item.value === match) {
|
||||
if ((item.type === columnType.string && item.value === el.innerHTML) || el.className.indexOf('high-location') > -1) {
|
||||
if (el.className.indexOf('high-light-block') > -1) {
|
||||
return `<span class="highlight__block">${match}</span>`
|
||||
} else {
|
||||
return `<span class="highlight__text">${match}</span>`
|
||||
}
|
||||
} else if (item.type === columnType.fullText) {
|
||||
} else if (item.type === columnType.fullText && item.value === match) {
|
||||
if (el.className.indexOf('high-light-block') > -1) {
|
||||
return `<span class="highlight__block">${match}</span>`
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user