Hide lower modals
This commit is contained in:
parent
2ec2df6efd
commit
98261a864d
|
@ -12,7 +12,7 @@
|
|||
<div class="bd-modals-container">
|
||||
<div v-for="(modal, index) in modals.stack" :key="`bd-modal-${index}`">
|
||||
<div class="bd-backdrop" :class="{'bd-backdrop-out': modal.closing}" :style="{opacity: index === 0 ? undefined : 0}"></div>
|
||||
<div class="bd-modal-wrap" :style="{transform: `scale(${downscale(index + 1)})`, opacity: downscale(index + 1) / 0.5 + 0.5}">
|
||||
<div class="bd-modal-wrap" :style="{transform: `scale(${downscale(index + 1, 0.2)})`, opacity: downscale(index + 1, 1)}">
|
||||
<div class="bd-modal-close-area" @click="closeModal(modal)"></div>
|
||||
<component :is="modal.component" />
|
||||
</div>
|
||||
|
@ -50,8 +50,8 @@
|
|||
closeModal(modal) {
|
||||
modal.close();
|
||||
},
|
||||
downscale(index) {
|
||||
return 1 - ((this.modals.stack.filter(m => !m.closing).length - index) * 0.2);
|
||||
downscale(index, times) {
|
||||
return 1 - ((this.modals.stack.filter(m => !m.closing).length - index) * times);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue