From 1a09f7532fb6f65a502cde494eadfac779076b12 Mon Sep 17 00:00:00 2001 From: qiang Date: Thu, 1 Sep 2022 13:13:32 +0800 Subject: [PATCH] =?UTF-8?q?fix(mp-alipay):=20=E4=BF=AE=E5=A4=8D=E6=94=AF?= =?UTF-8?q?=E4=BB=98=E5=AE=9D=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=90=AF=E7=94=A8?= =?UTF-8?q?=E5=9F=BA=E7=A1=80=E5=BA=932.0=E5=90=8E=E8=AE=BF=E9=97=AE=20$sl?= =?UTF-8?q?ots=20=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98=20#3529?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__tests__/compiler-mp-alipay.spec.js | 34 +++--- .../lib/template/generate.js | 101 +++++++++--------- .../mp-alipay/runtime/wrapper/app-parser.js | 17 --- .../runtime/wrapper/component-parser.js | 32 +++++- 4 files changed, 98 insertions(+), 86 deletions(-) diff --git a/packages/uni-template-compiler/__tests__/compiler-mp-alipay.spec.js b/packages/uni-template-compiler/__tests__/compiler-mp-alipay.spec.js index 14c71afe5..8d16912de 100644 --- a/packages/uni-template-compiler/__tests__/compiler-mp-alipay.spec.js +++ b/packages/uni-template-compiler/__tests__/compiler-mp-alipay.spec.js @@ -31,11 +31,11 @@ describe('mp:compiler-mp-alipay', () => { it('generate ref', () => { assertCodegen( 'text', - 'text' + 'text' ) assertCodegen( 'text123213', - 'text123213' + 'text123213' ) assertCodegen( '', @@ -47,7 +47,7 @@ describe('mp:compiler-mp-alipay', () => { ) assertCodegen( 'text', - 'text', + 'text', undefined, undefined, { @@ -56,7 +56,7 @@ describe('mp:compiler-mp-alipay', () => { ) assertCodegen( 'text', - 'text', + 'text', undefined, undefined, { @@ -65,7 +65,7 @@ describe('mp:compiler-mp-alipay', () => { ) assertCodegen( 'text', - 'text', + 'text', undefined, undefined, { @@ -82,33 +82,33 @@ describe('mp:compiler-mp-alipay', () => { it('generate default slot', () => { assertCodegen( 'text', - 'text' + 'text' ) assertCodegen( 'text123213', - 'text123213' + 'text123213' ) assertCodegen( 'text', - 'text' + 'text' ) }) it('generate scoped slot', () => { assertCodegen( '', - '{{props.text}}' + '{{props.text}}' ) assertCodegen( '', - '{{__SCOPED__.text}}' + '{{__SCOPED__.text}}' ) }) it('generate scoped slot with scopedSlotsCompiler: auto', () => { assertCodegen( '