Dialog stack animations complete

This commit is contained in:
Stefan Zermatten
2019-01-24 14:40:38 +02:00
parent 00e8cbc1c8
commit 2e6ef52594
6 changed files with 113 additions and 63 deletions

View File

@@ -1,20 +1,25 @@
<template>
<v-card>
<v-layout column style="height: 100%;">
<v-toolbar color="primary" dark class="base-dialog-toolbar" :flat="!offsetTop">
<slot name="toolbar"></slot>
</v-toolbar>
<div id="base-dialog-body" v-scroll:#base-dialog-body="onScroll">
<slot></slot>
</div>
<v-card-actions>
<slot name="actions"></slot>
</v-card-actions>
</v-layout>
</v-card>
<v-layout column style="height: 100%;">
<v-toolbar color="primary" dark class="base-dialog-toolbar" :flat="!offsetTop">
<v-btn icon flat @click="close">
<v-icon>
arrow_back
</v-icon>
</v-btn>
<slot name="toolbar"></slot>
</v-toolbar>
<v-card-text id="base-dialog-body" v-scroll:#base-dialog-body="onScroll">
<slot></slot>
</v-card-text>
<v-card-actions>
<slot name="actions"></slot>
</v-card-actions>
</v-layout>
</template>
<script>
import store from "/imports/ui/vuexStore.js";
export default {
data(){ return {
offsetTop: 0,
@@ -23,6 +28,9 @@
onScroll(e){
this.offsetTop = e.target.scrollTop
},
close(){
store.dispatch("popDialogStack");
},
},
}
</script>