Skip to content

Commit

Permalink
ios浏览器排序问题
Browse files Browse the repository at this point in the history
  • Loading branch information
opople committed Jan 24, 2024
1 parent fa9eed8 commit 91ba15d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/views/Works.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const workRoutes = computed(() => {
// 过滤掉隐藏的路由,日期降序,sort降序
return _works
.filter((item) => !item.meta.hidden && item.name.indexOf(searchValue.value) !== -1)
.sort((a, b) => new Date(b.meta.date || null).getTime() - new Date(a.meta.date || null).getTime())
.sort((a, b) => new Date(b.meta.date || 0).getTime() - new Date(a.meta.date || 0).getTime())
.sort((a, b) => (b.meta.sort || 0) - (a.meta.sort || 0))
})
// 通过监听works作品变化,重新执行动画 避免快速搜索时,部分元素未执行动画
Expand Down

0 comments on commit 91ba15d

Please sign in to comment.