From 55103d3778666e4234d23a98efb21058c4b1d1a3 Mon Sep 17 00:00:00 2001 From: alsaze Date: Tue, 11 Nov 2025 18:21:20 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BA=D0=B0=D1=80=D1=82=D1=8B=20=D0=BF=D0=B2?= =?UTF-8?q?=D0=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/PvzMap.vue | 9 +++++++-- pages/checkout/delivery.vue | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/components/PvzMap.vue b/components/PvzMap.vue index 123fbe4..2724c8c 100644 --- a/components/PvzMap.vue +++ b/components/PvzMap.vue @@ -84,8 +84,9 @@ import { const props = defineProps<{ modelValue: PickupPoint, pickupPoints: PickupPoint[] }>() -defineEmits<{ +const emit = defineEmits<{ (e: 'update:modelValue', value: PickupPoint | undefined): void + (e: 'activeTab', value: string): void }>() const { coords } = useGeolocation() @@ -99,7 +100,7 @@ const tabs = computed(() => [ { value: 'map', - label: activeTab.value === 'map' || activeTab.value === undefined ? 'Карта' : '', + label: activeTab.value === 'map' ? 'Карта' : '', icon: 'lucide:map-pin', slot: 'map' as const, }, @@ -135,6 +136,10 @@ watch(() => props.modelValue, (newPickupPoint) => { duration: 500, } }) + +watch(() => activeTab.value, (newActiveTab) => { + emit('activeTab', newActiveTab) +})