Skip to content

Commit

Permalink
fix: 引用排名排序
Browse files Browse the repository at this point in the history
  • Loading branch information
X3ZvaWQ committed Oct 30, 2023
1 parent 7e87f3e commit 698156c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/database/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,13 @@ export default {
const resource_res = await _getResource(this.client, this.type, { ids }).finally(() => {
this.loading = false;
});
const data = resource_res.data;
const data = resource_res.data
.map((item) => {
const refCount = this.getRefCount(item);
item.__refCount = refCount;
return item;
})
.sort((a, b) => b.__refCount - a.__refCount);
if (append) {
this.data[this.type].push(...data);
Expand Down

0 comments on commit 698156c

Please sign in to comment.