From 2288e72c5f1b6388977e318ea1dab9473df2ac4e Mon Sep 17 00:00:00 2001 From: Allen Date: Mon, 3 Jun 2024 09:19:52 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E7=AB=99=E7=82=B9=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E6=9C=89=E4=BB=A3=E7=90=86=E7=AD=89=E5=9B=BE=E6=A0=87=E6=97=B6?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=E4=BF=9D=E6=8C=81=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/cards/SiteCard.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/cards/SiteCard.vue b/src/components/cards/SiteCard.vue index c02fabf4..d5331459 100644 --- a/src/components/cards/SiteCard.vue +++ b/src/components/cards/SiteCard.vue @@ -194,7 +194,7 @@ onMounted(() => { - + {{ cardProps.site?.name }} @@ -202,7 +202,7 @@ onMounted(() => { {{ cardProps.site?.url }} - + - + From 43f36f556c48289c51db3a8d77ff1d11a2ef0fcf Mon Sep 17 00:00:00 2001 From: Allen Date: Mon, 3 Jun 2024 10:16:01 +0800 Subject: [PATCH 3/3] =?UTF-8?q?kbar=E6=94=AF=E6=8C=81=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/reorganize/TransferHistoryView.vue | 9 ++++++ src/views/system/SearchBarView.vue | 30 ++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/src/views/reorganize/TransferHistoryView.vue b/src/views/reorganize/TransferHistoryView.vue index 12e35e22..232ecc18 100644 --- a/src/views/reorganize/TransferHistoryView.vue +++ b/src/views/reorganize/TransferHistoryView.vue @@ -6,10 +6,15 @@ import api from '@/api' import type { TransferHistory } from '@/api/types' import ReorganizeDialog from '@/components/dialog/ReorganizeDialog.vue' import ProgressDialog from '@/components/dialog/ProgressDialog.vue' +import { useRoute } from 'vue-router' +import router from '@/router' // 提示框 const $toast = useToast() +// 路由 +const route = useRoute() + // 重新整理对话框 const redoDialog = ref(false) @@ -70,6 +75,8 @@ const dataList = ref([]) // 搜索 const search = ref() +// 路由中有搜索参数时放到搜索框中 +if (route.query.search) search.value = route.query.search // 搜索提示词列表 const searchHintList = ref([]) @@ -131,6 +138,8 @@ const totalPage = computed(() => { watch( [() => currentPage.value, () => itemsPerPage.value, () => search.value], debounce(async () => { + // 清除路由参数 + if (route.query.search) router.push("/history") await fetchData() }, 1000), ) diff --git a/src/views/system/SearchBarView.vue b/src/views/system/SearchBarView.vue index 1fe36032..d8dbd666 100644 --- a/src/views/system/SearchBarView.vue +++ b/src/views/system/SearchBarView.vue @@ -166,6 +166,18 @@ function searchTorrent() { emit('close') } +// 跳转到历史记录页面 +function searchHistory() { + if (!searchWord.value) return + router.push({ + path: '/history', + query: { + search: searchWord.value + }, + }) + emit('close') +} + // 跳转插件页面 function showPlugin(pluginId: string) { router.push({ @@ -290,6 +302,24 @@ onMounted(() => { + + + 订阅