From 93e6e5c8a8a372a83a1c1985bed8146480319c1d Mon Sep 17 00:00:00 2001 From: marvzhang Date: Tue, 11 Feb 2020 15:51:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/setting/Setting.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/setting/Setting.vue b/frontend/src/views/setting/Setting.vue index 3832388d..c341ccb7 100644 --- a/frontend/src/views/setting/Setting.vue +++ b/frontend/src/views/setting/Setting.vue @@ -31,7 +31,7 @@ - + From f3b8bcc51050429d004d266a0aec5fb4004bc020 Mon Sep 17 00:00:00 2001 From: marvzhang Date: Tue, 11 Feb 2020 17:47:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/ScrollView/LogItem.vue | 15 +++++- .../src/components/ScrollView/LogView.vue | 53 ++++++++++++++----- frontend/src/i18n/zh.js | 1 + 3 files changed, 54 insertions(+), 15 deletions(-) diff --git a/frontend/src/components/ScrollView/LogItem.vue b/frontend/src/components/ScrollView/LogItem.vue index 19e3e082..4e679eef 100644 --- a/frontend/src/components/ScrollView/LogItem.vue +++ b/frontend/src/components/ScrollView/LogItem.vue @@ -1,7 +1,10 @@ @@ -20,6 +23,16 @@ export default { isAnsi: { type: Boolean, default: false + }, + searchString: { + type: String, + default: '' + } + }, + computed: { + dataHtml () { + if (!this.searchString) return this.data + return this.data.replace(new RegExp(`(${this.searchString})`, 'gi'), '$1') } } } diff --git a/frontend/src/components/ScrollView/LogView.vue b/frontend/src/components/ScrollView/LogView.vue index c4c20228..4998917d 100644 --- a/frontend/src/components/ScrollView/LogView.vue +++ b/frontend/src/components/ScrollView/LogView.vue @@ -1,13 +1,22 @@