|
|
@@ -601,6 +601,7 @@ export function compileScript(
|
|
|
setupBindings,
|
|
|
vueImportAliases,
|
|
|
hoistStatic,
|
|
|
+ !!ctx.propsDestructureDecl,
|
|
|
)
|
|
|
}
|
|
|
|
|
|
@@ -1054,6 +1055,7 @@ function walkDeclaration(
|
|
|
bindings: Record<string, BindingTypes>,
|
|
|
userImportAliases: Record<string, string>,
|
|
|
hoistStatic: boolean,
|
|
|
+ isPropsDestructureEnabled = false,
|
|
|
): boolean {
|
|
|
let isAllLiteral = false
|
|
|
|
|
|
@@ -1122,7 +1124,7 @@ function walkDeclaration(
|
|
|
}
|
|
|
registerBinding(bindings, id, bindingType)
|
|
|
} else {
|
|
|
- if (isCallOf(init, DEFINE_PROPS)) {
|
|
|
+ if (isCallOf(init, DEFINE_PROPS) && isPropsDestructureEnabled) {
|
|
|
continue
|
|
|
}
|
|
|
if (id.type === 'ObjectPattern') {
|