|
@@ -1,5 +1,6 @@
|
|
|
import { ShapeFlags, extend } from '@vue/shared'
|
|
import { ShapeFlags, extend } from '@vue/shared'
|
|
|
import type { ComponentInternalInstance, ComponentOptions } from '../component'
|
|
import type { ComponentInternalInstance, ComponentOptions } from '../component'
|
|
|
|
|
+import { createAppContext } from '../apiCreateApp'
|
|
|
import { ErrorCodes, callWithErrorHandling } from '../errorHandling'
|
|
import { ErrorCodes, callWithErrorHandling } from '../errorHandling'
|
|
|
import type { VNode } from '../vnode'
|
|
import type { VNode } from '../vnode'
|
|
|
import { popWarningContext, pushWarningContext } from '../warning'
|
|
import { popWarningContext, pushWarningContext } from '../warning'
|
|
@@ -31,7 +32,14 @@ export function convertLegacyVModelProps(vnode: VNode): void {
|
|
|
|
|
|
|
|
if (__DEV__ && !warnedTypes.has(comp)) {
|
|
if (__DEV__ && !warnedTypes.has(comp)) {
|
|
|
pushWarningContext(vnode)
|
|
pushWarningContext(vnode)
|
|
|
- warnDeprecation(DeprecationTypes.COMPONENT_V_MODEL, { type } as any, comp)
|
|
|
|
|
|
|
+ warnDeprecation(
|
|
|
|
|
+ DeprecationTypes.COMPONENT_V_MODEL,
|
|
|
|
|
+ {
|
|
|
|
|
+ type,
|
|
|
|
|
+ appContext: (vnode.ctx && vnode.ctx.appContext) || createAppContext(),
|
|
|
|
|
+ } as any,
|
|
|
|
|
+ comp,
|
|
|
|
|
+ )
|
|
|
popWarningContext()
|
|
popWarningContext()
|
|
|
warnedTypes.add(comp)
|
|
warnedTypes.add(comp)
|
|
|
}
|
|
}
|