From: Evan You Date: Mon, 26 Apr 2021 21:35:41 +0000 (-0400) Subject: wip: ref v-for compat X-Git-Tag: v3.1.0-beta.1~59^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86703c23a685146ded101b3bc05eee298a60311a;p=thirdparty%2Fvuejs%2Fcore.git wip: ref v-for compat --- diff --git a/packages/compiler-core/src/compat/compatConfig.ts b/packages/compiler-core/src/compat/compatConfig.ts index 717b8dc46a..d43c441d39 100644 --- a/packages/compiler-core/src/compat/compatConfig.ts +++ b/packages/compiler-core/src/compat/compatConfig.ts @@ -20,6 +20,7 @@ export const enum CompilerDeprecationTypes { COMPILER_V_BIND_OBJECT_ORDER = 'COMPILER_V_BIND_OBJECT_ORDER', COMPILER_V_ON_NATIVE = 'COMPILER_V_ON_NATIVE', COMPILER_V_IF_V_FOR_PRECEDENCE = 'COMPILER_V_IF_V_FOR_PRECEDENCE', + COMPILER_V_FOR_REF = 'COMPILER_V_FOR_REF', COMPILER_NATIVE_TEMPLATE = 'COMPILER_NATIVE_TEMPLATE', COMPILER_INLINE_TEMPLATE = 'COMPILER_INLINE_TEMPLATE', COMPILER_FILTERS = 'COMPILER_FILTER' @@ -78,6 +79,13 @@ const deprecationData: Record = { link: `https://v3.vuejs.org/guide/migration/v-if-v-for.html` }, + [CompilerDeprecationTypes.COMPILER_V_FOR_REF]: { + message: + `Ref usage on v-for no longer creates array ref values in Vue 3. ` + + `Consider using function refs or refactor to avoid ref usage altogether.`, + link: `https://v3.vuejs.org/guide/migration/array-refs.html` + }, + [CompilerDeprecationTypes.COMPILER_NATIVE_TEMPLATE]: { message: `