Improved dialog stack handling of scrolling while the stack is open

This commit is contained in:
Stefan Zermatten
2019-02-18 13:41:36 +02:00
parent d30ee06e33
commit c5899e0816
3 changed files with 67 additions and 9 deletions

View File

@@ -7,9 +7,24 @@
</v-icon>
</v-btn>
<slot name="toolbar"></slot>
<template v-if="$slots.edit">
<v-spacer/>
<v-btn icon flat @click="isEditing = !isEditing">
<v-icon>
{{isEditing ? 'check' : 'create'}}
</v-icon>
</v-btn>
</template>
</v-toolbar>
<v-card-text id="base-dialog-body" v-scroll:#base-dialog-body="onScroll">
<slot></slot>
<v-tabs-items :value="isEditing ? 1 : 0">
<v-tab-item>
<slot/>
</v-tab-item>
<v-tab-item lazy>
<slot name="edit"/>
</v-tab-item>
</v-tabs-items>
</v-card-text>
<v-card-actions>
<slot name="actions"></slot>
@@ -26,6 +41,7 @@
},
data(){ return {
offsetTop: 0,
isEditing: false,
}},
methods: {
onScroll(e){