From d343d6d54d54ac813e2b82becab61e9bc2f546ef Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 9 Feb 2025 22:00:38 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E4=BC=98=E5=8C=96TheMovieDbView?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E7=9A=84watch=E9=80=BB=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E5=88=86=E7=A6=BB=E7=B1=BB=E5=9E=8B=E5=92=8C=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E7=9A=84=E7=9B=91=E5=90=AC=EF=BC=8C=E7=A1=AE?= =?UTF-8?q?=E4=BF=9D=E5=88=97=E8=A1=A8=E5=88=B7=E6=96=B0=E6=9B=B4=E9=AB=98?= =?UTF-8?q?=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/discover/TheMovieDbView.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/views/discover/TheMovieDbView.vue b/src/views/discover/TheMovieDbView.vue index cd8929d6..ed674c68 100644 --- a/src/views/discover/TheMovieDbView.vue +++ b/src/views/discover/TheMovieDbView.vue @@ -99,11 +99,18 @@ const tmdbLanguageDict = { // 当前Key const currentKey = ref(0) -// 类型和过滤参数变化后重新刷新列表 -watch([type, filterParams], () => { +// 类型变化 +watch(type, () => { if (!type.value) { type.value = 'movies' } + filterParams.with_genres = '' + filterParams.sort_by = 'popularity.desc' + currentKey.value++ +}) + +// 过滤参数变化 +watch(filterParams, () => { if (!filterParams.sort_by) { filterParams.sort_by = 'popularity.desc' }