This commit is contained in:
@@ -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<TabsItem[]>(() =>
|
||||
[
|
||||
{
|
||||
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)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user