mirror of https://github.com/sveltejs/svelte
allow <svelte:self> to be part of a slot (#4532)
parent
91d758e35b
commit
a66437b3c1
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
export let count;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#if count > 0}
|
||||||
|
<slot count={count-1}></slot>
|
||||||
|
{/if}
|
@ -0,0 +1,3 @@
|
|||||||
|
export default {
|
||||||
|
html: '5 4 3 2 1 0',
|
||||||
|
};
|
@ -0,0 +1,10 @@
|
|||||||
|
<script>
|
||||||
|
import Countdown from './Countdown.svelte';
|
||||||
|
export let count = 5;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{count}
|
||||||
|
|
||||||
|
<Countdown {count} let:count={i}>
|
||||||
|
<svelte:self count={i} />
|
||||||
|
</Countdown>
|
Loading…
Reference in new issue