@@ -29,14 +29,6 @@ export default {
29
29
} )
30
30
31
31
Vue . prototype . $showModal = function ( component , options ) {
32
- const defaultOptions = {
33
- fullscreen : false ,
34
- animated : true ,
35
- stretched : false
36
- }
37
- // build options object with defaults
38
- options = Object . assign ( { } , defaultOptions , options )
39
-
40
32
return new Promise ( resolve => {
41
33
let resolved = false
42
34
const closeCb = data => {
@@ -52,6 +44,12 @@ export default {
52
44
navEntryInstance . $destroy ( )
53
45
}
54
46
47
+ // build options object with defaults
48
+ options = Object . assign ( { } , options , {
49
+ context : null ,
50
+ closeCallback : closeCb
51
+ } )
52
+
55
53
const navEntryInstance = new Vue ( {
56
54
name : 'ModalEntry' ,
57
55
parent : this . $root ,
@@ -65,13 +63,7 @@ export default {
65
63
} )
66
64
const modalPage = navEntryInstance . $mount ( ) . $el . nativeView
67
65
68
- this . $el . nativeView . showModal ( modalPage , {
69
- context : null ,
70
- closeCallback : closeCb ,
71
- fullscreen : options . fullscreen ,
72
- animated : options . animated ,
73
- stretched : options . stretched
74
- } )
66
+ this . $el . nativeView . showModal ( modalPage , options )
75
67
} )
76
68
}
77
69
}
0 commit comments