mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
parent
2e4b65af5a
commit
67d4d60c3a
@ -331,7 +331,7 @@ export default class EachBlock extends Node {
|
||||
${this.block.hasAnimation && `for (let #i = 0; #i < ${blocks}.length; #i += 1) ${blocks}[#i].a();`}
|
||||
`);
|
||||
|
||||
if (this.compiler.options.nestedTransitions) {
|
||||
if (this.block.hasOutros && this.compiler.options.nestedTransitions) {
|
||||
const countdown = block.getUniqueName('countdown');
|
||||
block.builders.outro.addBlock(deindent`
|
||||
const ${countdown} = @callAfter(#outrocallback, ${blocks}.length);
|
||||
|
@ -0,0 +1,3 @@
|
||||
{#each things as thing (thing)}
|
||||
<div></div>
|
||||
{/each}
|
@ -0,0 +1,13 @@
|
||||
export default {
|
||||
nestedTransitions: true,
|
||||
|
||||
data: {
|
||||
x: true,
|
||||
things: ['a', 'b']
|
||||
},
|
||||
|
||||
test(assert, component, target, window, raf) {
|
||||
component.set({ x: false });
|
||||
assert.htmlEqual(target.innerHTML, '');
|
||||
},
|
||||
};
|
@ -0,0 +1,9 @@
|
||||
{#if x}
|
||||
<Widget :things/>
|
||||
{/if}
|
||||
|
||||
<script>
|
||||
export default {
|
||||
components: { Widget: './Widget.html' }
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user