Add basic open articles for future feat. & ran prettier & now fetches data from the cloud aka line today.

This commit is contained in:
yuanhau 2025-05-26 10:17:12 +08:00
parent 96a7a3372c
commit 0c6f0cbcd8
11 changed files with 98 additions and 224 deletions

View file

@ -78,6 +78,8 @@ const openingAppViaAnApp = ref(false);
const passedValues = ref();
const globalWindowVal = ref(new Map());
const changeLangAnimation = ref(false);
const openArticlesArray = ref<any[]>([]);
const openArticlesId = ref(0);
// Key Data
const menuItems = [
@ -383,6 +385,14 @@ watchEffect((cleanupFn) => {
cleanupFn(() => clearTimeout(timmer));
cleanupFn(() => clearTimeout(timmmer));
});
const openArticles = async (slug: string) => {
openArticlesArray.value.push({
id: openArticlesId.value,
slug: slug,
});
openArticlesId.value += 1;
};
</script>
<template>
<div v-if="changeLangAnimation">
@ -503,6 +513,7 @@ watchEffect((cleanupFn) => {
@error="console.error('Error:', $event)"
@windowopener="openNewWindowViaApp($event)"
@loadValue=""
@openArticles="openArticles"
:values="passedValues"
/>
</Suspense>