Мобильная версия
1. Адаптация и разработка мобильного варианта.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="project-select" v-if="store.currentProject" @click.stop>
|
||||
<div class="project-select" :class="{ mobile: isMobile }" v-if="store.currentProject" @click.stop>
|
||||
<button class="project-btn" @click="dropdownOpen = !dropdownOpen">
|
||||
<i data-lucide="folder" class="folder-icon"></i>
|
||||
{{ store.currentProject?.name || 'Выберите проект' }}
|
||||
@@ -22,8 +22,10 @@
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted } from 'vue'
|
||||
import { useProjectsStore } from '../stores/projects'
|
||||
import { useMobile } from '../composables/useMobile'
|
||||
|
||||
const store = useProjectsStore()
|
||||
const { isMobile } = useMobile()
|
||||
const dropdownOpen = ref(false)
|
||||
|
||||
const emit = defineEmits(['change'])
|
||||
@@ -134,4 +136,16 @@ onUnmounted(() => {
|
||||
background: var(--accent-soft);
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
/* ========== MOBILE ========== */
|
||||
.project-select.mobile .project-dropdown {
|
||||
position: fixed;
|
||||
top: auto;
|
||||
left: 16px;
|
||||
right: 16px;
|
||||
bottom: 80px;
|
||||
min-width: auto;
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user