From bd96693e1c9baff762ca823d344605e4163680a3 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Fri, 19 Nov 2021 14:22:19 +0800 Subject: [PATCH] fix(mp): v-if + v-for --- .../uni-mp-compiler/__tests__/vFor.spec.ts | 4 ++-- .../uni-mp-compiler/src/template/codegen.ts | 23 ++++++++++++++++--- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/packages/uni-mp-compiler/__tests__/vFor.spec.ts b/packages/uni-mp-compiler/__tests__/vFor.spec.ts index f71dc2fa6..02fa19437 100644 --- a/packages/uni-mp-compiler/__tests__/vFor.spec.ts +++ b/packages/uni-mp-compiler/__tests__/vFor.spec.ts @@ -204,7 +204,7 @@ describe(`compiler: v-for`, () => { test(`v-if + v-for`, () => { assert( ``, - ``, + ``, `(_ctx, _cache) => { return _e({ a: _ctx.ok }, _ctx.ok ? { b: _f(_ctx.list, (i, k0, i0) => { return {}; }) } : {}) }` @@ -214,7 +214,7 @@ describe(`compiler: v-for`, () => { test(`v-if + v-for on