Sfoglia il codice sorgente

fix(compiler-sfc): transform destructured props when reactivity transform option is enabled (#8252)

fixup https://github.com/vuejs/core/commit/862edfd91a2c2f6b75f943cb1a9682c4be5d7fa8
Haoqun Jiang 3 anni fa
parent
commit
287bd99994

+ 1 - 1
packages/compiler-sfc/src/script/definePropsDestructure.ts

@@ -103,7 +103,7 @@ export function transformDestructuredProps(
   ctx: ScriptCompileContext,
   vueImportAliases: Record<string, string>
 ) {
-  if (!ctx.options.propsDestructure) {
+  if (!ctx.options.propsDestructure && !ctx.options.reactivityTransform) {
     return
   }