From dd37fe6891a6876fce4c0b949ee44dea4f424827 Mon Sep 17 00:00:00 2001 From: meixg Date: Tue, 14 Sep 2021 16:04:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=89=8B=E5=8A=A8=E4=BC=A0=E5=85=A5=20c?= =?UTF-8?q?lass=20=E6=97=B6=EF=BC=8C=E4=BD=BF=E7=94=A8=20Object.create=20?= =?UTF-8?q?=E5=88=9B=E5=BB=BA=20instance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compilers/renderer-compiler.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compilers/renderer-compiler.ts b/src/compilers/renderer-compiler.ts index 5057f07b..8c1eb738 100644 --- a/src/compilers/renderer-compiler.ts +++ b/src/compilers/renderer-compiler.ts @@ -98,7 +98,10 @@ export class RendererCompiler { private compileGenInstance (info: ComponentInfo) { if (this.options.useProvidedComponentClass) { - return DEF('instance', new BinaryExpression(I('ComponentClass'), '.', I('prototype'))) + return DEF('instance', new FunctionCall( + BINARY(I('Object'), '.', I('create')), + [BINARY(I('ComponentClass'), '.', I('prototype'))] + )) } return DEF('instance', new CreateComponentInstance(info))