|
@@ -697,19 +697,19 @@ export default {
|
|
|
// 匹配高亮
|
|
|
this.ArticelData.forEach((item) => {
|
|
|
item.forEach((items) => {
|
|
|
- items.forEach((itemss) => {
|
|
|
- itemss.text.forEach((itemsss) => {
|
|
|
- arr.forEach((searchItem, i) => {
|
|
|
- searchItem.forEach((searchItems) => {
|
|
|
- searchItems.forEach((searchItemss) => {
|
|
|
- if (itemsss.index == searchItemss) {
|
|
|
- itemsss.color = color;
|
|
|
- }
|
|
|
- });
|
|
|
+ // items.forEach((itemss) => {
|
|
|
+ items.text.forEach((itemsss) => {
|
|
|
+ arr.forEach((searchItem, i) => {
|
|
|
+ searchItem.forEach((searchItems) => {
|
|
|
+ searchItems.forEach((searchItemss) => {
|
|
|
+ if (itemsss.index == searchItemss) {
|
|
|
+ itemsss.color = color;
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
+ // });
|
|
|
});
|
|
|
});
|
|
|
this.$forceUpdate();
|
|
@@ -723,23 +723,27 @@ export default {
|
|
|
});
|
|
|
});
|
|
|
this.SearchwordNumber = 0;
|
|
|
- this.SearchwordNumber = arr[arr.length - 1].length;
|
|
|
+ // 高亮全部
|
|
|
+ arr.forEach((item) => {
|
|
|
+ this.SearchwordNumber += item.length;
|
|
|
+ });
|
|
|
+ // this.SearchwordNumber = arr[arr.length - 1].length; //高亮最后一次
|
|
|
// 匹配高亮
|
|
|
this.ArticelData.forEach((item) => {
|
|
|
item.forEach((items) => {
|
|
|
- items.forEach((itemss) => {
|
|
|
- itemss.text.forEach((itemsss) => {
|
|
|
- arr.forEach((searchItem, i) => {
|
|
|
- searchItem.forEach((searchItems) => {
|
|
|
- searchItems.forEach((searchItemss) => {
|
|
|
- if (itemsss.index == searchItemss) {
|
|
|
- itemsss.color = this.currentcolorValue[i];
|
|
|
- }
|
|
|
- });
|
|
|
+ // items.forEach((itemss) => {
|
|
|
+ items.text.forEach((itemsss) => {
|
|
|
+ arr.forEach((searchItem, i) => {
|
|
|
+ searchItem.forEach((searchItems) => {
|
|
|
+ searchItems.forEach((searchItemss) => {
|
|
|
+ if (itemsss.index == searchItemss) {
|
|
|
+ itemsss.color = this.currentcolorValue[i];
|
|
|
+ }
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
+ // });
|
|
|
});
|
|
|
});
|
|
|
},
|