From 2a9f8d6a9cd844af7ab5535e04ac227825a70399 Mon Sep 17 00:00:00 2001 From: Mplan Date: Sun, 24 May 2026 17:43:25 +0800 Subject: [PATCH] refactor: extract EncyclopediaProgressCard component and limit map pitch - Create EncyclopediaProgressCard with dynamic progress color, reuse in encyclopedia and profile pages to unify styling - Add skyColor and maxPitch to AMap 3D view to reduce empty tile area when tilting - Extend AMap type declarations for skyColor, maxPitch, getPitch, getRotation --- .../cloud/EncyclopediaProgressCard.vue | 65 +++++++++++++++++++ src/types/amap.d.ts | 4 ++ src/views/encyclopedia/EncyclopediaView.vue | 64 +++--------------- src/views/map/MapView.vue | 2 + src/views/profile/ProfileView.vue | 40 ++++-------- 5 files changed, 93 insertions(+), 82 deletions(-) create mode 100644 src/components/cloud/EncyclopediaProgressCard.vue diff --git a/src/components/cloud/EncyclopediaProgressCard.vue b/src/components/cloud/EncyclopediaProgressCard.vue new file mode 100644 index 0000000..cc4c299 --- /dev/null +++ b/src/components/cloud/EncyclopediaProgressCard.vue @@ -0,0 +1,65 @@ + + + diff --git a/src/types/amap.d.ts b/src/types/amap.d.ts index 6f3031e..6258309 100644 --- a/src/types/amap.d.ts +++ b/src/types/amap.d.ts @@ -8,7 +8,9 @@ declare namespace AMap { setCenter(center: [number, number]): void setZoom(zoom: number): void setPitch(pitch: number): void + getPitch(): number setRotation(rotation: number): void + getRotation(): number on(event: string, callback: (...args: unknown[]) => void): void off(event: string, callback: (...args: unknown[]) => void): void getCenter(): { lng: number; lat: number } @@ -28,6 +30,8 @@ declare namespace AMap { mapStyle?: string features?: string[] layers?: unknown[] + skyColor?: string + maxPitch?: number resizeEnable?: boolean dragEnable?: boolean zoomEnable?: boolean diff --git a/src/views/encyclopedia/EncyclopediaView.vue b/src/views/encyclopedia/EncyclopediaView.vue index 55ed33f..ed44297 100644 --- a/src/views/encyclopedia/EncyclopediaView.vue +++ b/src/views/encyclopedia/EncyclopediaView.vue @@ -1,9 +1,10 @@