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) -->
|
<!-- Right: Map (fixed position) -->
|
||||||
<div class="w-3/5 relative">
|
<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>
|
<ClientOnly>
|
||||||
<CatalogMap
|
<CatalogMap
|
||||||
ref="mapRef"
|
ref="mapRef"
|
||||||
@@ -172,13 +172,19 @@ const props = withDefaults(defineProps<{
|
|||||||
pointColor?: string
|
pointColor?: string
|
||||||
selectedId?: string
|
selectedId?: string
|
||||||
hoveredId?: string
|
hoveredId?: string
|
||||||
|
hasSubNav?: boolean
|
||||||
}>(), {
|
}>(), {
|
||||||
loading: false,
|
loading: false,
|
||||||
withMap: true,
|
withMap: true,
|
||||||
mapId: 'catalog-map',
|
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<{
|
const emit = defineEmits<{
|
||||||
'select': [item: MapItem]
|
'select': [item: MapItem]
|
||||||
'update:selectedId': [uuid: string]
|
'update:selectedId': [uuid: string]
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
point-color="#10b981"
|
point-color="#10b981"
|
||||||
:selected-id="selectedAddressId"
|
:selected-id="selectedAddressId"
|
||||||
v-model:hovered-id="hoveredAddressId"
|
v-model:hovered-id="hoveredAddressId"
|
||||||
|
:has-sub-nav="false"
|
||||||
@select="onSelectAddress"
|
@select="onSelectAddress"
|
||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
point-color="#6366f1"
|
point-color="#6366f1"
|
||||||
:selected-id="selectedOrderId"
|
:selected-id="selectedOrderId"
|
||||||
v-model:hovered-id="hoveredOrderId"
|
v-model:hovered-id="hoveredOrderId"
|
||||||
|
:has-sub-nav="false"
|
||||||
@select="onSelectOrder"
|
@select="onSelectOrder"
|
||||||
>
|
>
|
||||||
<template #filters>
|
<template #filters>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
point-color="#10b981"
|
point-color="#10b981"
|
||||||
:selected-id="selectedHubId"
|
:selected-id="selectedHubId"
|
||||||
v-model:hovered-id="hoveredHubId"
|
v-model:hovered-id="hoveredHubId"
|
||||||
|
:has-sub-nav="false"
|
||||||
@select="selectHub"
|
@select="selectHub"
|
||||||
>
|
>
|
||||||
<template #header>
|
<template #header>
|
||||||
|
|||||||
Reference in New Issue
Block a user