Skip to content

Commit 8a00c03

Browse files
committed
added transition object support to overlay transition
1 parent 670151d commit 8a00c03

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/VueFinalModal.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
@keydown="onEsc"
99
>
1010
<transition
11-
:name="overlayTransition"
11+
v-bind="computedOverlayTransition"
1212
@before-enter="beforeOverlayEnter"
1313
@after-enter="afterOverlayEnter"
1414
@before-leave="beforeOverlayLeave"
@@ -90,7 +90,7 @@ export default {
9090
preventClick: { type: Boolean, default: false },
9191
attach: { type: null, default: false, validator: validateAttachTarget },
9292
transition: { type: [String, Object], default: 'vfm' },
93-
overlayTransition: { type: String, default: 'vfm' },
93+
overlayTransition: { type: [String, Object], default: 'vfm' },
9494
zIndexAuto: { type: Boolean, default: true },
9595
zIndexBase: { type: [String, Number], default: 1000 },
9696
zIndex: { type: [Boolean, String, Number], default: false },
@@ -138,6 +138,10 @@ export default {
138138
computedTransition() {
139139
if (typeof this.transition === 'string') return { name: this.transition }
140140
return { ...this.transition }
141+
},
142+
computedOverlayTransition() {
143+
if (typeof this.overlayTransition === 'string') return { name: this.overlayTransition }
144+
return { ...this.overlayTransition }
141145
}
142146
},
143147
watch: {

0 commit comments

Comments
 (0)