diff --git a/src/store/modules/log.ts b/src/store/modules/log.ts index ea946d3d..f2e222de 100644 --- a/src/store/modules/log.ts +++ b/src/store/modules/log.ts @@ -53,9 +53,6 @@ export const logStore = defineStore({ setLogCondition(data: Recordable) { this.conditions = { ...this.conditions, ...data }; }, - getLogKeywords() { - return this.conditions.keywordsOfContent; - }, resetState() { this.logs = []; this.conditions = { diff --git a/src/views/dashboard/related/log/LogTable/LogService.vue b/src/views/dashboard/related/log/LogTable/LogService.vue index 61e01107..ed87d7cb 100644 --- a/src/views/dashboard/related/log/LogTable/LogService.vue +++ b/src/views/dashboard/related/log/LogTable/LogService.vue @@ -61,7 +61,7 @@ limitations under the License. --> return (props.data.tags.find((d: { key: string; value: string }) => d.key === "level") || {}).value || ""; }); const highlightKeywords = (data: string) => { - const keywords = Object.values(logStore.getLogKeywords()); + const keywords = Object.values(logStore.conditions.keywordsOfContent || {}); const regex = new RegExp(keywords.join("|"), "gi"); return data.replace(regex, (match) => `${match}`); };