mirror of
https://github.com/ialley-workshop-open/uni-halo.git
synced 2026-07-26 12:00:46 +08:00
fix: 修复分类统计显示undefined问题 #42
This commit is contained in:
@@ -275,7 +275,10 @@
|
||||
fieldSelector: ['spec.hideFromList=false']
|
||||
})
|
||||
.then(res => {
|
||||
this.categoryList = res.items.sort((a, b) => {
|
||||
this.categoryList = res.items.map(item=>{
|
||||
item.postCount = item.postCount ?? 0
|
||||
return item;
|
||||
}).sort((a, b) => {
|
||||
return b.postCount - a.postCount;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user