WIP Попытки анимировать формы редактирования
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.section-wrapper.flex.flex-col.h-fit.cursor-pointer(
|
.section-wrapper.flex.flex-col.h-fit.cursor-pointer(
|
||||||
:style="{flexDirection:settings[section].rowFlex && 'row', width: settings[section].width + 'px', height: settings[section].height + 'px', background: changeBackground}"
|
:style="{width: settings[section].width + 'px', 'min-height': settings[section].height + 'px', background: changeBackground}",
|
||||||
|
:class="sectionAnimationClasses",
|
||||||
|
@click="output(section)"
|
||||||
)
|
)
|
||||||
.section-header.flex.items-center.justify-between.pl-4.pr-3(:class="{small:settings[section].rowFlex}")
|
.section-header.flex.items-center.justify-between.pl-4.pr-3(:class="{small:settings[section].rowFlex}")
|
||||||
span.text-sm.font-semibold.whitespace-nowrap {{settings[section].title}}
|
span.text-sm.font-semibold.whitespace-nowrap {{settings[section].title}}
|
||||||
@@ -59,8 +61,8 @@
|
|||||||
:add-new-additional="addDocAdditional",
|
:add-new-additional="addDocAdditional",
|
||||||
:save-additional="saveDocs"
|
:save-additional="saveDocs"
|
||||||
)
|
)
|
||||||
.section-body.w-full.flex.flex-col.px-4.pt-3.pb-4.gap-y-4(
|
.section-body.flex.flex-col.gap-y-4.px-4(
|
||||||
v-if="this.isData || this.isAddress || this.isAttachments"
|
:class="{'pt-3 pb-4': isData || isAddress || isAttachments}",
|
||||||
)
|
)
|
||||||
.flex.flex-col.gap-y-4
|
.flex.flex-col.gap-y-4
|
||||||
.flex.flex-col(v-for="(item, key) in sectionInfo", class="gap-y-1.5")
|
.flex.flex-col(v-for="(item, key) in sectionInfo", class="gap-y-1.5")
|
||||||
@@ -110,7 +112,7 @@
|
|||||||
span.text-sm {{item.title}}
|
span.text-sm {{item.title}}
|
||||||
span.text-sm(v-if="item.document") {{`.${item?.document?.substr(item.document.lastIndexOf(".") + 1)}`}}
|
span.text-sm(v-if="item.document") {{`.${item?.document?.substr(item.document.lastIndexOf(".") + 1)}`}}
|
||||||
.section-add.flex.justify-center.items-center.cursor-pointer(
|
.section-add.flex.justify-center.items-center.cursor-pointer(
|
||||||
v-else,
|
:style="{height: settings[section].voidHeight + 'px'}"
|
||||||
@click="openAddDoc"
|
@click="openAddDoc"
|
||||||
) Добавить данные
|
) Добавить данные
|
||||||
</template>
|
</template>
|
||||||
@@ -199,8 +201,21 @@ export default {
|
|||||||
? this.sectionInfo.issued_by_date.split("-").reverse().join(".")
|
? this.sectionInfo.issued_by_date.split("-").reverse().join(".")
|
||||||
: "";
|
: "";
|
||||||
},
|
},
|
||||||
|
sectionAnimationClasses() {
|
||||||
|
if (this.isData || this.isAddress || this.isAttachments) {
|
||||||
|
return {
|
||||||
|
"closed-add": true,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
"closed-body": true,
|
||||||
|
};
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
output(section) {
|
||||||
|
console.log(section);
|
||||||
|
},
|
||||||
openAddDoc() {
|
openAddDoc() {
|
||||||
this.isChange = true;
|
this.isChange = true;
|
||||||
if (this.section === "pass") {
|
if (this.section === "pass") {
|
||||||
@@ -364,7 +379,9 @@ export default {
|
|||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
|
||||||
.section-body
|
.section-body
|
||||||
overflow-y: auto
|
max-height: 500px
|
||||||
|
transition: 0.3s ease all
|
||||||
|
overflow: hidden
|
||||||
&::-webkit-scrollbar
|
&::-webkit-scrollbar
|
||||||
width: 4px
|
width: 4px
|
||||||
&::-webkit-scrollbar-track
|
&::-webkit-scrollbar-track
|
||||||
@@ -385,10 +402,18 @@ export default {
|
|||||||
opacity: 0.6
|
opacity: 0.6
|
||||||
|
|
||||||
.section-add
|
.section-add
|
||||||
height: 100%
|
height: calc(100% - 44px)
|
||||||
min-height: 64px
|
max-height: 100%
|
||||||
|
overflow: hidden
|
||||||
|
transition: 0.3s ease all
|
||||||
color: var(--btn-blue-color)
|
color: var(--btn-blue-color)
|
||||||
|
|
||||||
|
.closed-add .section-add
|
||||||
|
max-height: 0
|
||||||
|
|
||||||
|
.closed-body .section-body
|
||||||
|
max-height: 0
|
||||||
|
|
||||||
.line
|
.line
|
||||||
width: 100%
|
width: 100%
|
||||||
height: 1px
|
height: 1px
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ export const detail = {
|
|||||||
issued_by_date: "Дата",
|
issued_by_date: "Дата",
|
||||||
},
|
},
|
||||||
width: 280,
|
width: 280,
|
||||||
|
voidHeight: 242,
|
||||||
},
|
},
|
||||||
snils: {
|
snils: {
|
||||||
title: "СНИЛС",
|
title: "СНИЛС",
|
||||||
@@ -162,12 +163,14 @@ export const detail = {
|
|||||||
join_adress: "Введите адрес целиком",
|
join_adress: "Введите адрес целиком",
|
||||||
},
|
},
|
||||||
width: 292,
|
width: 292,
|
||||||
|
voidHeight: 86,
|
||||||
},
|
},
|
||||||
docs: {
|
docs: {
|
||||||
title: "Документы",
|
title: "Документы",
|
||||||
height: 280,
|
height: 280,
|
||||||
width: 360,
|
width: 360,
|
||||||
addFile: true,
|
addFile: true,
|
||||||
|
voidHeight: 236,
|
||||||
},
|
},
|
||||||
additional: {
|
additional: {
|
||||||
title: "Дополнительные данные",
|
title: "Дополнительные данные",
|
||||||
|
|||||||
Reference in New Issue
Block a user