File tree 4 files changed +33
-8
lines changed
4 files changed +33
-8
lines changed Original file line number Diff line number Diff line change 69
69
"rollup-plugin-resolve-aliases" : " ^0.2.0" ,
70
70
"rollup-watch" : " ^3.2.2" ,
71
71
"semver" : " ^5.4.1" ,
72
- "tns-core-modules" : " ^3.3 .0" ,
72
+ "tns-core-modules" : " ^3.4 .0" ,
73
73
"util-inspect" : " ^0.1.8" ,
74
74
"vue" : " ^2.5.13"
75
75
},
83
83
" !**/node_modules/**"
84
84
],
85
85
"moduleDirectories" : [
86
- " node_modules" ,
87
- " <rootDir>/node_modules/tns-core-modules"
86
+ " node_modules"
88
87
],
89
88
"modulePathIgnorePatterns" : [
90
89
" <rootDir>/samples"
Original file line number Diff line number Diff line change 3
3
global . process = global . process || { }
4
4
global . process . env = global . process . env || { }
5
5
6
+ import { VUE_VM_REF } from './runtime'
6
7
import inspect from 'util-inspect'
8
+ import { topmost } from 'ui/frame'
9
+ import application from 'application'
7
10
import Vue from './runtime/index'
8
11
import ModalPlugin from './plugins/modal-plugin'
9
12
import NavigatorPlugin from './plugins/navigator-plugin'
@@ -30,4 +33,23 @@ console.keys = function(object) {
30
33
console . log ( Object . keys ( object ) )
31
34
}
32
35
36
+ // this fixes the issue of resuming the application
37
+ // however this might not be the desired functionality
38
+ // Todo: figure out if there is a better way to fix application resume.
39
+ application . on ( application . exitEvent , ( ) => {
40
+ const frame = topmost ( )
41
+ if ( frame ) {
42
+ console . log ( frame )
43
+ frame . eachChildView ( child => {
44
+ console . log ( 'found child' )
45
+ const vm = child [ VUE_VM_REF ]
46
+
47
+ if ( vm ) {
48
+ vm . $destroy ( )
49
+ }
50
+ frame . _removeView ( child )
51
+ } )
52
+ }
53
+ } )
54
+
33
55
export default Vue
Original file line number Diff line number Diff line change @@ -21,11 +21,13 @@ export default {
21
21
const navigate = frame ? frame . navigate : start
22
22
23
23
if ( isPage ( component ) ) {
24
- return navigate ( {
25
- create ( ) {
26
- return component
27
- }
28
- } )
24
+ return navigate (
25
+ Object . assign ( options , {
26
+ create ( ) {
27
+ return component
28
+ }
29
+ } )
30
+ )
29
31
}
30
32
31
33
const placeholder = Vue . $document . createComment ( 'placeholder' )
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ const mount = function(el, hydrating) {
53
53
page . content = self . $el . nativeView
54
54
}
55
55
56
+ page [ VUE_VM_REF ] = self
57
+
56
58
return page
57
59
}
58
60
} )
You can’t perform that action at this time.
0 commit comments