[WIP] Фикс адаптива

This commit is contained in:
megavrilinvv
2023-06-06 16:50:51 +03:00
parent 7057f0131f
commit 208c795cbc

View File

@@ -1,5 +1,5 @@
<template lang="pug"> <template lang="pug">
.flex.flex-col.gap-y-1 .sidebar-wrapper.flex.flex-col.gap-y-1
.form.flex.items-center.justify-end.py-4.pr-4.rounded-t .form.flex.items-center.justify-end.py-4.pr-4.rounded-t
q-btn.rotate-180( q-btn.rotate-180(
@click="openSidebar", @click="openSidebar",
@@ -98,13 +98,17 @@ export default {
methods: { methods: {
choiceState() { choiceState() {
let num = 0; let num = 0;
let isPrimary = false;
this.patientList.forEach((e) => { this.patientList.forEach((e) => {
if (e.choice) num += 1; if (e.choice) num += 1;
if (e.choice && e.id === 1) isPrimary = true;
}); });
return { return {
one: num === 1, "primary-form": num === 2 && isPrimary,
two: num === 2, "one-form": num === 1,
three: num === 3, "two-form": num === 2,
"all-form": num === 3,
default: !num,
}; };
}, },
choiceForm(choice, idx) { choiceForm(choice, idx) {
@@ -154,14 +158,8 @@ export default {
</script> </script>
<style lang="sass" scoped> <style lang="sass" scoped>
.one .sidebar-wrapper
max-height: calc(100vh - 394px) width: 232px
.two
max-height: calc(100vh - 498px)
.three
max-height: calc(100vh - 632px)
.form .form
background: var(--default-white) background: var(--default-white)
@@ -236,4 +234,24 @@ export default {
border-bottom: 1px solid var(--bg-light-grey) border-bottom: 1px solid var(--bg-light-grey)
&:first-child &:first-child
border-top: 1px solid var(--bg-light-grey) border-top: 1px solid var(--bg-light-grey)
.one-form
max-height: calc(100vh - 394px)
transition: all 0.2s ease-in
.two-form
max-height: calc(100vh - 528px)
transition: all 0.2s ease-in
.all-form
max-height: calc(100vh - 632px)
transition: all 0.2s ease-in
.primary-form
max-height: calc(100vh - 498px)
transition: all 0.2s ease-in
.default
max-height: 0px
transition: all 0.5s ease-in
</style> </style>