wip: expose getCurrentInstance()
This commit is contained in:
parent
8eb20eede9
commit
9c0f820a8e
@ -218,6 +218,9 @@ export function createComponentInstance(
|
|||||||
|
|
||||||
export let currentInstance: ComponentInstance | null = null
|
export let currentInstance: ComponentInstance | null = null
|
||||||
|
|
||||||
|
export const getCurrentInstance: () => ComponentInstance | null = () =>
|
||||||
|
currentInstance
|
||||||
|
|
||||||
export function setupStatefulComponent(instance: ComponentInstance) {
|
export function setupStatefulComponent(instance: ComponentInstance) {
|
||||||
const Component = instance.type as ComponentOptions
|
const Component = instance.type as ComponentOptions
|
||||||
// 1. create render proxy
|
// 1. create render proxy
|
||||||
|
@ -10,7 +10,11 @@ export {
|
|||||||
} from './vnode'
|
} from './vnode'
|
||||||
|
|
||||||
export { nextTick } from './scheduler'
|
export { nextTick } from './scheduler'
|
||||||
export { createComponent, FunctionalComponent } from './component'
|
export {
|
||||||
|
createComponent,
|
||||||
|
getCurrentInstance,
|
||||||
|
FunctionalComponent
|
||||||
|
} from './component'
|
||||||
export { createRenderer, RendererOptions } from './createRenderer'
|
export { createRenderer, RendererOptions } from './createRenderer'
|
||||||
export { Slot, Slots } from './componentSlots'
|
export { Slot, Slots } from './componentSlots'
|
||||||
export { PropType, ComponentPropsOptions } from './componentProps'
|
export { PropType, ComponentPropsOptions } from './componentProps'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user