feat(calendar-lab): render content only after zoom settle
This commit is contained in:
@@ -3,6 +3,8 @@ defineProps<{
|
||||
isActive: boolean;
|
||||
isLoading: boolean;
|
||||
isLoaded: boolean;
|
||||
showContent: boolean;
|
||||
nextLabel?: string;
|
||||
pulseScale: number;
|
||||
}>();
|
||||
</script>
|
||||
@@ -18,17 +20,22 @@ defineProps<{
|
||||
<p class="calendar-lab-subtitle">Weeks inside one month</p>
|
||||
</header>
|
||||
|
||||
<p v-if="isLoading" class="calendar-lab-loading">Loading GraphQL month payload…</p>
|
||||
<p v-else-if="isLoaded" class="calendar-lab-meta">Data ready</p>
|
||||
<template v-if="showContent">
|
||||
<p v-if="isLoading" class="calendar-lab-loading">Loading GraphQL month payload…</p>
|
||||
<p v-else-if="isLoaded" class="calendar-lab-meta">Data ready</p>
|
||||
|
||||
<div class="calendar-lab-grid-month">
|
||||
<div
|
||||
v-for="week in 4"
|
||||
:key="`lab-month-week-${week}`"
|
||||
class="calendar-lab-row"
|
||||
>
|
||||
Week {{ week }}
|
||||
<div class="calendar-lab-grid-month">
|
||||
<div
|
||||
v-for="week in 4"
|
||||
:key="`lab-month-week-${week}`"
|
||||
class="calendar-lab-row"
|
||||
>
|
||||
Week {{ week }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<p v-else class="calendar-lab-hint">
|
||||
Zoom into {{ nextLabel ?? "Week" }}
|
||||
</p>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user