Skip to content

Commit e90e8b4

Browse files
committed
Update: hide individual modal when hide all call
1 parent b12981e commit e90e8b4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/Modal.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,7 @@ export default {
234234
*/
235235
beforeMount() {
236236
this.$modal.subscription.$on('toggle', this.onToggle)
237+
this.$modal.subscription.$on('hide-all', this.onHideAll)
237238
238239
window.addEventListener('resize', this.onWindowResize)
239240
window.addEventListener('orientationchange', this.onWindowResize)
@@ -849,6 +850,12 @@ export default {
849850
850851
this.shiftLeft -= left - inRange(0, maxLeft, left)
851852
this.shiftTop -= top - inRange(0, maxTop, top)
853+
},
854+
855+
onHideAll() {
856+
if (this.visible) {
857+
this.$modal.hide(this.name)
858+
}
852859
}
853860
}
854861
}

0 commit comments

Comments
 (0)