Skip to content

Commit 2329757

Browse files
committed
custom transition object support added
1 parent 56c4e7f commit 2329757

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

dist/VueFinalModal.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.esm.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/VueFinalModal.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/VueFinalModal.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
></div>
2323
</transition>
2424
<transition
25-
:name="transition"
25+
v-bind="computedTransition"
2626
@before-enter="beforeModalEnter"
2727
@after-enter="afterModalEnter"
2828
@before-leave="beforeModalLeave"
@@ -89,7 +89,7 @@ export default {
8989
escToClose: { type: Boolean, default: false },
9090
preventClick: { type: Boolean, default: false },
9191
attach: { type: null, default: false, validator: validateAttachTarget },
92-
transition: { type: String, default: 'vfm' },
92+
transition: { type: [String, Object], default: 'vfm' },
9393
overlayTransition: { type: String, default: 'vfm' },
9494
zIndexAuto: { type: Boolean, default: true },
9595
zIndexBase: { type: [String, Number], default: 1000 },
@@ -134,6 +134,10 @@ export default {
134134
return {
135135
...(this.calculateZIndex !== false && { zIndex: this.calculateZIndex })
136136
}
137+
},
138+
computedTransition() {
139+
if (typeof this.transition === 'string') return { name: this.transition }
140+
return { ...this.transition }
137141
}
138142
},
139143
watch: {

0 commit comments

Comments
 (0)