diff --git a/packages/compiler-core/src/parse.ts b/packages/compiler-core/src/parse.ts index 383c115b..feee2a81 100644 --- a/packages/compiler-core/src/parse.ts +++ b/packages/compiler-core/src/parse.ts @@ -748,20 +748,27 @@ function parseAttribute( const modifiers = match[3] ? match[3].substr(1).split('.') : [] // 2.x compat v-bind:foo.sync -> v-model:foo - if ( - __COMPAT__ && - dirName === 'bind' && - arg && - modifiers.includes('sync') && - checkCompatEnabled( - CompilerDeprecationTypes.COMPILER_V_BIND_SYNC, - context, - loc, - arg.loc.source - ) - ) { - dirName = 'model' - modifiers.splice(modifiers.indexOf('sync'), 1) + if (__COMPAT__ && dirName === 'bind' && arg) { + if ( + modifiers.includes('sync') && + checkCompatEnabled( + CompilerDeprecationTypes.COMPILER_V_BIND_SYNC, + context, + loc, + arg.loc.source + ) + ) { + dirName = 'model' + modifiers.splice(modifiers.indexOf('sync'), 1) + } + + if (__DEV__ && modifiers.includes('prop')) { + checkCompatEnabled( + CompilerDeprecationTypes.COMPILER_V_BIND_PROP, + context, + loc + ) + } } return { diff --git a/packages/compiler-core/src/transforms/transformElement.ts b/packages/compiler-core/src/transforms/transformElement.ts index ce85c958..d0ceaa39 100644 --- a/packages/compiler-core/src/transforms/transformElement.ts +++ b/packages/compiler-core/src/transforms/transformElement.ts @@ -92,6 +92,7 @@ export const transformElement: NodeTransform = (node, context) => { ? resolveComponentType(node as ComponentNode, context) : `"${tag}"` + // 2.x