From a0993eaf0f212ecf6539b5cdca2daf7a0611ff5e Mon Sep 17 00:00:00 2001 From: jmal Date: Sun, 27 Apr 2025 17:30:26 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E9=A1=B5=E7=9A=84=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchOption/index.vue | 15 ++++++++++----- src/components/ShowFile/ShowFile.vue | 7 ++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/components/SearchOption/index.vue b/src/components/SearchOption/index.vue index 1d9e7b8..29312cf 100644 --- a/src/components/SearchOption/index.vue +++ b/src/components/SearchOption/index.vue @@ -3,7 +3,7 @@
- 搜索: + 搜索 {{searchScope}}: {{ keyword }}
@@ -122,7 +122,7 @@
-
+
路径: {{ searchPath }} @@ -210,6 +210,14 @@ export default { } }, computed: { + searchScope() { + const queryTagId = this.$route.query.tagId + const path = this.$route.query.path; + if (queryTagId && path === '/') { + return '(当前标签)' + } + return '' + }, hasSearchConditions() { return this.fileType !== 'all' || this.timeRange || this.hasSizeRange || this.searchMount || this.searchOverall }, @@ -255,7 +263,6 @@ export default { }, watch: { filterOption(newValue) { - console.log('filterOption changed', newValue) } }, methods: { @@ -279,7 +286,6 @@ export default { clearFilterOption() { this.filterOption = this.emptyFilterOption - console.log('clearFilterOption') this.setFilterOption(this.filterOption) }, @@ -311,7 +317,6 @@ export default { this.searchOverall = !!filterOption.searchOverall // 更新过滤条件 - console.log('setFilterOption') this.updateFilterOption() }, diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue index ecd540b..68e568b 100644 --- a/src/components/ShowFile/ShowFile.vue +++ b/src/components/ShowFile/ShowFile.vue @@ -90,7 +90,7 @@
{ this.searchHistoryList = res.data || [] - console.log('clearSearchHistory1', this.searchHistoryList) cb(this.searchHistoryList) }).catch(error => { console.error("Error fetching search history:", error)