Fix map positioning when search bar is present
All checks were successful
Build Docker Image / build (push) Successful in 5m13s
All checks were successful
Build Docker Image / build (push) Successful in 5m13s
Use dynamic mapTopClass/mapHeightClass based on searchBar slot: - With searchBar: top-44 (176px), height calc(100vh-12rem) - Without searchBar: top-32 (128px), height calc(100vh-9rem)
This commit is contained in:
@@ -213,9 +213,11 @@ const props = withDefaults(defineProps<{
|
||||
totalCount: 0
|
||||
})
|
||||
|
||||
// Map positioning - unified height for all pages with map
|
||||
const mapTopClass = 'top-32'
|
||||
const mapHeightClass = 'h-[calc(100vh-9rem)]'
|
||||
// Map positioning - dynamic based on search bar presence
|
||||
const slots = useSlots()
|
||||
const hasSearchBar = computed(() => !!slots.searchBar)
|
||||
const mapTopClass = computed(() => hasSearchBar.value ? 'top-44' : 'top-32')
|
||||
const mapHeightClass = computed(() => hasSearchBar.value ? 'h-[calc(100vh-12rem)]' : 'h-[calc(100vh-9rem)]')
|
||||
|
||||
const emit = defineEmits<{
|
||||
'select': [item: MapItem]
|
||||
|
||||
Reference in New Issue
Block a user