mirror of https://github.com/sveltejs/svelte
parent
c4261abfde
commit
55b678a77b
@ -0,0 +1,3 @@
|
||||
<slot />
|
||||
<slot name="third">First slot's default text</slot>
|
||||
<slot name="fourth">Second slot's default text</slot>
|
||||
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
import Child from './Child.svelte';
|
||||
</script>
|
||||
|
||||
<Child>
|
||||
<slot>Default here is applied</slot>
|
||||
<slot name="first" slot="third" />
|
||||
<slot name="second" slot="fourth"/>
|
||||
</Child>
|
||||
@ -0,0 +1,16 @@
|
||||
export default {
|
||||
compileOptions: {
|
||||
dev: true
|
||||
},
|
||||
html: `
|
||||
Default here is applied
|
||||
<h3 slot="first">First slot</h3>
|
||||
Second slot's default text
|
||||
Default here is applied
|
||||
First slot's default text
|
||||
<h4 slot="second">Second slot</h3>
|
||||
<h3>Default slot</h3>
|
||||
First slot's default text
|
||||
Second slot's default text
|
||||
`
|
||||
};
|
||||
@ -0,0 +1,13 @@
|
||||
<script>
|
||||
import Parent from './Parent.svelte';
|
||||
</script>
|
||||
|
||||
<Parent>
|
||||
<h3 slot="first">First slot</h3>
|
||||
</Parent>
|
||||
<Parent>
|
||||
<h4 slot="second">Second slot</h4>
|
||||
</Parent>
|
||||
<Parent>
|
||||
<h3>Default slot</h3>
|
||||
</Parent>
|
||||
@ -0,0 +1,3 @@
|
||||
<slot />
|
||||
<slot name="third">First slot's default text</slot>
|
||||
<slot name="fourth">Second slot's default text</slot>
|
||||
@ -0,0 +1,9 @@
|
||||
<script>
|
||||
import Child from './Child.svelte';
|
||||
</script>
|
||||
|
||||
<Child>
|
||||
<slot>Default here is applied</slot>
|
||||
<slot name="first" slot="third" />
|
||||
<slot name="second" slot="fourth"/>
|
||||
</Child>
|
||||
@ -0,0 +1,16 @@
|
||||
export default {
|
||||
compileOptions: {
|
||||
dev: false
|
||||
},
|
||||
html: `
|
||||
Default here is applied
|
||||
<h3 slot="first">First slot</h3>
|
||||
Second slot's default text
|
||||
Default here is applied
|
||||
First slot's default text
|
||||
<h4 slot="second">Second slot</h3>
|
||||
<h3>Default slot</h3>
|
||||
First slot's default text
|
||||
Second slot's default text
|
||||
`
|
||||
};
|
||||
@ -0,0 +1,13 @@
|
||||
<script>
|
||||
import Parent from './Parent.svelte';
|
||||
</script>
|
||||
|
||||
<Parent>
|
||||
<h3 slot="first">First slot</h3>
|
||||
</Parent>
|
||||
<Parent>
|
||||
<h4 slot="second">Second slot</h4>
|
||||
</Parent>
|
||||
<Parent>
|
||||
<h3>Default slot</h3>
|
||||
</Parent>
|
||||
Loading…
Reference in new issue