chore: Merge branch 'v2-compat'
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import {
|
||||
getCurrentInstance,
|
||||
SetupContext,
|
||||
ComponentInternalInstance
|
||||
ComponentInternalInstance,
|
||||
ComponentOptions
|
||||
} from '../component'
|
||||
import {
|
||||
cloneVNode,
|
||||
@@ -110,7 +111,7 @@ export function useTransitionState(): TransitionState {
|
||||
|
||||
const TransitionHookValidator = [Function, Array]
|
||||
|
||||
const BaseTransitionImpl = {
|
||||
const BaseTransitionImpl: ComponentOptions = {
|
||||
name: `BaseTransition`,
|
||||
|
||||
props: {
|
||||
@@ -250,6 +251,10 @@ const BaseTransitionImpl = {
|
||||
}
|
||||
}
|
||||
|
||||
if (__COMPAT__) {
|
||||
BaseTransitionImpl.__isBuiltIn = true
|
||||
}
|
||||
|
||||
// export the public type for h/tsx inference
|
||||
// also to avoid inline import() in generated d.ts files
|
||||
export const BaseTransition = (BaseTransitionImpl as any) as {
|
||||
|
||||
@@ -5,7 +5,8 @@ import {
|
||||
ComponentInternalInstance,
|
||||
LifecycleHooks,
|
||||
currentInstance,
|
||||
getComponentName
|
||||
getComponentName,
|
||||
ComponentOptions
|
||||
} from '../component'
|
||||
import { VNode, cloneVNode, isVNode, VNodeProps } from '../vnode'
|
||||
import { warn } from '../warning'
|
||||
@@ -63,7 +64,7 @@ export interface KeepAliveContext extends ComponentRenderContext {
|
||||
export const isKeepAlive = (vnode: VNode): boolean =>
|
||||
(vnode.type as any).__isKeepAlive
|
||||
|
||||
const KeepAliveImpl = {
|
||||
const KeepAliveImpl: ComponentOptions = {
|
||||
name: `KeepAlive`,
|
||||
|
||||
// Marker for special handling inside the renderer. We are not using a ===
|
||||
@@ -313,6 +314,10 @@ const KeepAliveImpl = {
|
||||
}
|
||||
}
|
||||
|
||||
if (__COMPAT__) {
|
||||
KeepAliveImpl.__isBuildIn = true
|
||||
}
|
||||
|
||||
// export the public type for h/tsx inference
|
||||
// also to avoid inline import() in generated d.ts files
|
||||
export const KeepAlive = (KeepAliveImpl as any) as {
|
||||
|
||||
Reference in New Issue
Block a user