fix 种子剧集过滤

This commit is contained in:
jxxghp
2024-05-27 09:12:46 +08:00
parent f9b22962a4
commit 3c70eac7ca

View File

@@ -71,8 +71,8 @@ function initOptions(data: Context) {
// 对季过滤选项进行排序
const sortSeasonFilterOptions = computed(() => {
return seasonFilterOptions.value.sort((a, b) => {
// 按字符串序排序
return a.localeCompare(b, 'zh-Hans-CN', { sensitivity: 'accent' })
// 按字符串序排序
return b.localeCompare(a)
})
})
@@ -105,9 +105,9 @@ let defer = (_: number) => true
watchEffect(() => {
// 清空列表
dataList.value = []
// 匹配过滤函数
const match = (filter: Array<string>, value: string | undefined) =>
filter.length === 0 || (value && filter.includes(value))
// 匹配过滤函数filter中有任一值包含value则返回true
const match = (filter: Array<string>, value: string | undefined): boolean =>
filter.length === 0 || filter.includes(value ?? '') || filter.some(v => value?.includes(v) ?? false)
groupedDataList.value?.forEach(value => {
if (value.length > 0) {
@@ -231,7 +231,3 @@ watchEffect(() => {
</div>
</div>
</template>
<style lang="scss">
</style>