feat:增加跳转按钮

This commit is contained in:
jiangrui
2025-03-11 21:57:45 +08:00
parent e6171fb34c
commit dca0f1f0c1
8 changed files with 89 additions and 12 deletions

View File

@@ -128,7 +128,16 @@ export const useResourceStore = defineStore("resource", {
}
let { data = [] } = await resourceApi.search(keyword || "", channelId, lastMessageId);
this.keyword = keyword || "";
data = data.filter((item) => item.list.length > 0);
data = data
.filter((item) => item.list.length > 0)
.map((x) => ({
...x,
list: x.list.map((item) => ({
...item,
isSupportSave: CLOUD_DRIVES.some((drive) => drive.regex.test(item.cloudLinks[0])),
})),
}));
console.log(data);
if (isLoadMore) {
const findedIndex = this.resources.findIndex((item) => item.id === data[0]?.id);
if (findedIndex !== -1) {