mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-06-08 09:09:57 +08:00
feat 搜索框记忆
This commit is contained in:
@@ -35,11 +35,10 @@ const tabs = [
|
||||
]
|
||||
|
||||
// 当前排序字段
|
||||
const activeSort = ref('')
|
||||
const activeSort = ref(null)
|
||||
|
||||
// 排序选项
|
||||
const sortOptions = [
|
||||
{ title: '默认', value: '' },
|
||||
{ title: '热门', value: 'count' },
|
||||
{ title: '插件名称', value: 'plugin_name' },
|
||||
{ title: '作者', value: 'plugin_author' },
|
||||
@@ -299,7 +298,7 @@ const sortedUninstalledList = computed(() => {
|
||||
})
|
||||
} else if (activeSort.value) {
|
||||
return ret_list.sort((a: any, b: any) => {
|
||||
return a[activeSort.value] > b[activeSort.value] ? 1 : -1
|
||||
return a[activeSort.value ?? ''] > b[activeSort.value ?? ''] ? 1 : -1
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user