From 937d28b944afa376d43da8e31cad1a8e7e176c8f Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 15 Aug 2026 12:42:03 +0800 Subject: [PATCH] =?UTF-8?q?fix(cache):=20=E5=B0=8F=E5=B1=8F=E8=AF=86?= =?UTF-8?q?=E5=88=AB=E7=BC=93=E5=AD=98=E6=94=B9=E4=B8=BA=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=88=87=E6=8D=A2=E9=81=BF=E5=85=8D=E5=BD=B1=E8=A7=86?= =?UTF-8?q?=E9=9F=B3=E4=B9=90=E9=87=8D=E5=8F=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cache/RecognitionCachePanel.vue | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/components/cache/RecognitionCachePanel.vue b/src/components/cache/RecognitionCachePanel.vue index 9456c106..0b94e532 100644 --- a/src/components/cache/RecognitionCachePanel.vue +++ b/src/components/cache/RecognitionCachePanel.vue @@ -65,11 +65,17 @@ const statusOptions = computed(() => [ { title: t('setting.cache.unrecognizedOnly'), value: 'unrecognized' }, ]) -const typeOptions = computed(() => [ - { title: t('setting.cache.recognitionTypeOptions.all'), value: 'all' }, - { title: t('setting.cache.recognitionTypeOptions.media'), value: 'media' }, - { title: t('setting.cache.recognitionTypeOptions.music'), value: 'music' }, -]) +const typeOptions = computed(() => { + const options = [ + { title: t('setting.cache.recognitionTypeOptions.media'), value: 'media' }, + { title: t('setting.cache.recognitionTypeOptions.music'), value: 'music' }, + ] + // 小屏幕下不提供"全部"选项,避免两个列表同时渲染导致重叠 + if (!isMobile.value) { + options.unshift({ title: t('setting.cache.recognitionTypeOptions.all'), value: 'all' }) + } + return options +}) // 影视与音乐缓存统计汇总展示 const totalCount = computed(() => cacheData.value.count + musicCacheData.value.count) @@ -334,6 +340,13 @@ onMounted(() => { void loadCacheData() }) +// 小屏幕下切换到"全部"时回退为影视,避免两个列表同时渲染 +watch(isMobile, mobile => { + if (mobile && typeFilter.value === 'all') { + typeFilter.value = 'media' + } +}, { immediate: true }) + watch([searchFilter, statusFilter, typeFilter], () => { resetMobilePagination() })