mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 07:28:37 +08:00
feat:优化TheMovieDbView组件的watch逻辑
This commit is contained in:
@@ -104,30 +104,23 @@ watch(type, () => {
|
|||||||
if (!type.value) {
|
if (!type.value) {
|
||||||
type.value = 'movies'
|
type.value = 'movies'
|
||||||
}
|
}
|
||||||
let refresh = true
|
|
||||||
if (type.value === 'movies') {
|
if (type.value === 'movies') {
|
||||||
if (!tmdbSortDict[filterParams.sort_by]) {
|
if (!tmdbSortDict[filterParams.sort_by]) {
|
||||||
filterParams.sort_by = 'popularity.desc'
|
filterParams.sort_by = 'popularity.desc'
|
||||||
refresh = false
|
|
||||||
}
|
}
|
||||||
if (!tmdbMovieGenreDict[filterParams.with_genres]) {
|
if (!tmdbMovieGenreDict[filterParams.with_genres]) {
|
||||||
filterParams.with_genres = ''
|
filterParams.with_genres = ''
|
||||||
refresh = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (type.value === 'tvs') {
|
if (type.value === 'tvs') {
|
||||||
if (!tmdbTvSortDict[filterParams.sort_by]) {
|
if (!tmdbTvSortDict[filterParams.sort_by]) {
|
||||||
filterParams.sort_by = 'popularity.desc'
|
filterParams.sort_by = 'popularity.desc'
|
||||||
refresh = false
|
|
||||||
}
|
}
|
||||||
if (!tmdbTvGenreDict[filterParams.with_genres]) {
|
if (!tmdbTvGenreDict[filterParams.with_genres]) {
|
||||||
filterParams.with_genres = ''
|
filterParams.with_genres = ''
|
||||||
refresh = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (refresh) {
|
currentKey.value++
|
||||||
currentKey.value++
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 过滤参数变化
|
// 过滤参数变化
|
||||||
|
|||||||
Reference in New Issue
Block a user