1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<template>
<v-dialog v-model="dialog" transition="dialog-bottom-transition" width="40%">
<slot></slot>
</v-dialog>
</template>
<script>
export default {
data () {
return {
show: true
}
},
computed: {
dialog: {
get () {
return this.$store.getters.getDialog
},
set (value) {
this.$store.commit('setDialog', value)
}
}
},
updated () {
if (this.dialog && this.show) {
this.show = false
if (this.$parent.$refs.login) {
this.$parent.$refs.login.resetValidation()
} else {
this.$parent.$refs.register.resetValidation()
}
} else if (!this.dialog) {
this.show = true
}
}
}
</script>