Поправил отображение выпадающих элементов

This commit is contained in:
Ilia Miheev
2026-03-21 12:35:59 +03:00
parent 0d85ac597b
commit d9b7eef066
2 changed files with 9 additions and 6 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ const props = defineProps({
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
z-index: 501; z-index: 999;
} }
.modal { .modal {
+8 -5
View File
@@ -36,7 +36,7 @@
<custom-button :to="infoCard.hrefToCourse" title="Посмотреть на Stepik">Курс</custom-button> <custom-button :to="infoCard.hrefToCourse" title="Посмотреть на Stepik">Курс</custom-button>
<custom-button :to="infoCard.hrefToDoc" <custom-button :to="infoCard.hrefToDoc"
title="Посмотреть в официальной документации">Документация</custom-button> title="Посмотреть в официальной документации">Документация</custom-button>
<custom-button @click="isModalVisible = false">ОК</custom-button> <custom-button @click="handleOkBtn">ОК</custom-button>
</div> </div>
</template> </template>
</MyDialog> </MyDialog>
@@ -52,6 +52,10 @@ const isOpen = ref(false);
const isModalVisible = ref(false); const isModalVisible = ref(false);
const infoCard = ref({}) const infoCard = ref({})
function handleOkBtn() {
isModalVisible.value = false
isOpen.value = true
}
const toggleMenu = () => { const toggleMenu = () => {
isOpen.value = !isOpen.value; isOpen.value = !isOpen.value;
}; };
@@ -62,6 +66,7 @@ const closeMenu = () => {
function openInfoCard(obj) { function openInfoCard(obj) {
isModalVisible.value = true isModalVisible.value = true
isOpen.value = false
infoCard.value = obj infoCard.value = obj
} }
@@ -129,11 +134,9 @@ defineExpose({ open: () => (isOpen.value = true), close: closeMenu });
<style scoped> <style scoped>
.burger-btn { .burger-btn {
position: fixed; position: fixed;
/* Она всегда на одном месте при скролле */
top: 20px; top: 20px;
left: 20px; left: 20px;
z-index: 9999; z-index: 3;
/* Максимальный приоритет, чтобы быть ПОВЕРХ всего */
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
@@ -185,7 +188,7 @@ h1 {
height: 100%; height: 100%;
background-image: radial-gradient(#23aae3e2, #222222); background-image: radial-gradient(#23aae3e2, #222222);
color: white; color: white;
z-index: 1000; z-index: 2;
padding: 0 20px 20px; padding: 0 20px 20px;
overflow-y: scroll; overflow-y: scroll;
overflow: auto; overflow: auto;