Skip to content

Commit 0e71d2f

Browse files
committed
feat: "no-route-dismiss" for QModal
1 parent 0f8fc06 commit 0e71d2f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/components/layout/QLayoutDrawer.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,7 @@ export default {
117117
this.layout.__animate()
118118
},
119119
$route () {
120-
if (this.mobileOpened) {
121-
this.hide()
122-
return
123-
}
124-
if (this.onScreenOverlay) {
120+
if (this.mobileOpened || this.onScreenOverlay) {
125121
this.hide()
126122
}
127123
}

src/components/modal/QModal.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@ export default {
7373
type: Boolean,
7474
default: false
7575
},
76+
noRouteDismiss: Boolean,
7677
minimized: Boolean,
7778
maximized: Boolean
7879
},
7980
watch: {
8081
$route () {
81-
if (this.value === void 0) {
82+
if (!this.noRouteDismiss) {
8283
this.hide()
8384
}
8485
}

0 commit comments

Comments
 (0)