37 lines
886 B
Vue
37 lines
886 B
Vue
<template>
|
|
<UTabs v-model="activeTab" :content="false" :items="tabs">
|
|
<template #map>
|
|
{{ activeTab === '0' ? 'Карта' : activeTab === '1' ? 'Список' : 'Другое' }}
|
|
</template>
|
|
</UTabs>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type { TabsItem } from '@nuxt/ui'
|
|
import { IPvzMapTabs } from '#shared/types'
|
|
import { computed } from 'vue'
|
|
|
|
const activeTab = defineModel('activeTab', { type: String, default: IPvzMapTabs.MAP })
|
|
|
|
const tabs = computed<TabsItem[]>(() =>
|
|
[
|
|
{
|
|
value: IPvzMapTabs.MAP,
|
|
label: activeTab.value === 'map' ? 'Карта' : '',
|
|
icon: 'lucide:map-pin',
|
|
slot: 'map' as const,
|
|
},
|
|
{
|
|
value: IPvzMapTabs.LIST,
|
|
label: activeTab.value === 'list' ? 'Список' : '',
|
|
icon: 'i-lucide-list',
|
|
slot: 'list' as const,
|
|
},
|
|
],
|
|
)
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
</style>
|