Add hasSubNav prop for map positioning (3 vs 2 nav levels)
All checks were successful
Build Docker Image / build (push) Successful in 3m58s
All checks were successful
Build Docker Image / build (push) Successful in 3m58s
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
|
||||
<!-- Right: Map (fixed position) -->
|
||||
<div class="w-3/5 relative">
|
||||
<div class="fixed top-32 right-6 w-[calc(60%-3rem)] h-[calc(100vh-9rem)] rounded-lg overflow-hidden">
|
||||
<div class="fixed right-6 w-[calc(60%-3rem)] rounded-lg overflow-hidden" :class="[mapTopClass, mapHeightClass]">
|
||||
<ClientOnly>
|
||||
<CatalogMap
|
||||
ref="mapRef"
|
||||
@@ -172,13 +172,19 @@ const props = withDefaults(defineProps<{
|
||||
pointColor?: string
|
||||
selectedId?: string
|
||||
hoveredId?: string
|
||||
hasSubNav?: boolean
|
||||
}>(), {
|
||||
loading: false,
|
||||
withMap: true,
|
||||
mapId: 'catalog-map',
|
||||
pointColor: '#3b82f6'
|
||||
pointColor: '#3b82f6',
|
||||
hasSubNav: true
|
||||
})
|
||||
|
||||
// Map positioning based on navigation height
|
||||
const mapTopClass = computed(() => props.hasSubNav ? 'top-40' : 'top-32')
|
||||
const mapHeightClass = computed(() => props.hasSubNav ? 'h-[calc(100vh-11rem)]' : 'h-[calc(100vh-9rem)]')
|
||||
|
||||
const emit = defineEmits<{
|
||||
'select': [item: MapItem]
|
||||
'update:selectedId': [uuid: string]
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
point-color="#10b981"
|
||||
:selected-id="selectedAddressId"
|
||||
v-model:hovered-id="hoveredAddressId"
|
||||
:has-sub-nav="false"
|
||||
@select="onSelectAddress"
|
||||
>
|
||||
<template #header>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
point-color="#6366f1"
|
||||
:selected-id="selectedOrderId"
|
||||
v-model:hovered-id="hoveredOrderId"
|
||||
:has-sub-nav="false"
|
||||
@select="onSelectOrder"
|
||||
>
|
||||
<template #filters>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
point-color="#10b981"
|
||||
:selected-id="selectedHubId"
|
||||
v-model:hovered-id="hoveredHubId"
|
||||
:has-sub-nav="false"
|
||||
@select="selectHub"
|
||||
>
|
||||
<template #header>
|
||||
|
||||
Reference in New Issue
Block a user