mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-22 23:31:01 +08:00
Add sort via data (The user CANNOT chose rn.
This commit is contained in:
parent
075e33d2af
commit
b862f4cdb0
@ -81,7 +81,11 @@ const updateContent = async (url: string, tabAction: boolean) => {
|
||||
const req = await fetch(`/api/home/lt?query=${url.trim()}`);
|
||||
const data = await req.json();
|
||||
if (data) {
|
||||
contentArray.value = [...data.uuidData, ...(data.nuuiddata?.items || [])];
|
||||
const coolArray = [...data.uuidData, ...data.nuuiddata?.items];
|
||||
contentArray.value =
|
||||
coolArray.sort(
|
||||
(title1, title2) => title2.publishTimeUnix - title1.publishTimeUnix,
|
||||
) || [];
|
||||
switchTabs.value = false;
|
||||
isDataCached.value = data.cached || false;
|
||||
displayTranslateContent.value = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user