File tree 1 file changed +6
-1
lines changed
packages/runtime-core/src
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2
2
ConcreteComponent ,
3
3
Data ,
4
4
validateComponentName ,
5
- Component
5
+ Component ,
6
+ ComponentInternalInstance
6
7
} from './component'
7
8
import {
8
9
ComponentOptions ,
@@ -46,6 +47,7 @@ export interface App<HostElement = any> {
46
47
_props : Data | null
47
48
_container : HostElement | null
48
49
_context : AppContext
50
+ _instance : ComponentInternalInstance | null
49
51
50
52
/**
51
53
* v2 compat only
@@ -186,6 +188,7 @@ export function createAppAPI<HostElement>(
186
188
_props : rootProps ,
187
189
_container : null ,
188
190
_context : context ,
191
+ _instance : null ,
189
192
190
193
version,
191
194
@@ -296,6 +299,7 @@ export function createAppAPI<HostElement>(
296
299
; ( rootContainer as any ) . __vue_app__ = app
297
300
298
301
if ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) {
302
+ app . _instance = vnode . component
299
303
devtoolsInitApp ( app , version )
300
304
}
301
305
@@ -314,6 +318,7 @@ export function createAppAPI<HostElement>(
314
318
if ( isMounted ) {
315
319
render ( null , app . _container )
316
320
if ( __DEV__ || __FEATURE_PROD_DEVTOOLS__ ) {
321
+ app . _instance = null
317
322
devtoolsUnmountApp ( app )
318
323
}
319
324
delete app . _container . __vue_app__
You can’t perform that action at this time.
0 commit comments