perf: optimize dashboard components and lazy loading

Enhances dashboard performance through strategic component optimizations:

- Removes redundant v-if condition from chart component
- Implements lazy loading for the resource-intensive globe component
- Bumps package version to 0.1.12

These changes improve initial load time and runtime performance while maintaining functionality.
This commit is contained in:
ccbikai 2025-05-20 21:46:49 +08:00
parent 1d28494d6b
commit 2bbb905ac8
3 changed files with 2 additions and 3 deletions

View file

@ -77,7 +77,6 @@ function formatTime(tick) {
</CardTitle>
<component
:is="chart"
v-if="views.length"
class="w-full h-full"
index="time"
:data="views"

View file

@ -63,7 +63,7 @@ onBeforeMount(() => {
</div>
<div class="relative space-y-4">
<DashboardRealtimeChart class="md:absolute top-0 left-0 z-10" />
<DashboardRealtimeGlobe />
<LazyDashboardRealtimeGlobe />
<DashboardRealtimeLogs class="md:absolute top-0 right-0 h-full z-10" />
</div>
</main>

View file

@ -1,7 +1,7 @@
{
"name": "sink",
"type": "module",
"version": "0.1.11",
"version": "0.1.12",
"private": true,
"packageManager": "pnpm@9.15.1",
"engines": {