Emit and respond to a modalOpen event, which conditionally adds a class to the body

This commit is contained in:
Andrew Croce
2018-09-20 11:44:59 -04:00
parent c1e6bc0f84
commit 27b03eea04
2 changed files with 12 additions and 0 deletions

View File

@@ -2,9 +2,11 @@ export default {
methods: {
closeModal: function(name) {
this.modals[name] = false
this.$emit('modalOpen', false)
},
openModal: function (name) {
this.modals[name] = true
this.$emit('modalOpen', true)
}
},
data: function() {