File tree Expand file tree Collapse file tree 4 files changed +33
-8
lines changed Expand file tree Collapse file tree 4 files changed +33
-8
lines changed Original file line number Diff line number Diff line change 6969 "rollup-plugin-resolve-aliases" : " ^0.2.0" ,
7070 "rollup-watch" : " ^3.2.2" ,
7171 "semver" : " ^5.4.1" ,
72- "tns-core-modules" : " ^3.3 .0" ,
72+ "tns-core-modules" : " ^3.4 .0" ,
7373 "util-inspect" : " ^0.1.8" ,
7474 "vue" : " ^2.5.13"
7575 },
8383 " !**/node_modules/**"
8484 ],
8585 "moduleDirectories" : [
86- " node_modules" ,
87- " <rootDir>/node_modules/tns-core-modules"
86+ " node_modules"
8887 ],
8988 "modulePathIgnorePatterns" : [
9089 " <rootDir>/samples"
Original file line number Diff line number Diff line change 33global . process = global . process || { }
44global . process . env = global . process . env || { }
55
6+ import { VUE_VM_REF } from './runtime'
67import inspect from 'util-inspect'
8+ import { topmost } from 'ui/frame'
9+ import application from 'application'
710import Vue from './runtime/index'
811import ModalPlugin from './plugins/modal-plugin'
912import NavigatorPlugin from './plugins/navigator-plugin'
@@ -30,4 +33,23 @@ console.keys = function(object) {
3033 console . log ( Object . keys ( object ) )
3134}
3235
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+
3355export default Vue
Original file line number Diff line number Diff line change @@ -21,11 +21,13 @@ export default {
2121 const navigate = frame ? frame . navigate : start
2222
2323 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+ )
2931 }
3032
3133 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) {
5353 page . content = self . $el . nativeView
5454 }
5555
56+ page [ VUE_VM_REF ] = self
57+
5658 return page
5759 }
5860 } )
You can’t perform that action at this time.
0 commit comments