add PromotionModal.vue
All checks were successful
Deploy / build (push) Successful in 1m2s

This commit is contained in:
alsaze
2025-12-16 13:56:22 +03:00
parent 62a319ca47
commit 2b276c0c16
6 changed files with 166 additions and 5 deletions

View File

@@ -40,6 +40,8 @@
</UMain>
<BaseFooter />
<PromotionModal v-model="open" />
</div>
</template>
@@ -47,12 +49,16 @@
import type { TabsItem } from '@nuxt/ui'
import { useMediaQuery } from '@vueuse/core'
import BaseFooter from '~/components/BaseFooter.vue'
import PromotionModal from '~/components/PromotionModal.vue'
const isMobile = useMediaQuery('(max-width: 1280px)')
const router = useRouter()
const route = useRoute()
const open = ref(false)
const toast = useToast()
const tabs = computed<TabsItem[]>(() => [
{
label: isMobile.value ? '' : 'Главная',
@@ -74,6 +80,27 @@ const tabs = computed<TabsItem[]>(() => [
},
])
function showToast() {
toast.add({
title: 'Уникальное предложение !',
description: 'покупка машины под ключ Киргизстан',
duration: 30000,
actions: [{
icon: 'i-lucide-car',
label: 'Подробнее',
color: 'neutral',
variant: 'outline',
onClick: () => {
open.value = true
},
}],
})
}
onMounted(() => {
showToast()
})
const activeTab = ref(route?.path.split('/')[1] || '/')
watch(() => activeTab.value, () => {