mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
383 B
24 lines
383 B
4 years ago
|
<script>
|
||
|
import A from "./A.svelte";
|
||
|
let a, b;
|
||
|
|
||
|
export function getA() {
|
||
|
return a.getData();
|
||
|
}
|
||
|
export function getB() {
|
||
|
return b.getData();
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<A bind:this={a}>
|
||
|
<span slot="a">hello world</span>
|
||
|
<span>bye</span>
|
||
|
<span>world</span>
|
||
|
</A>
|
||
|
|
||
|
<A bind:this={b}>
|
||
|
<span slot="a">hello world</span>
|
||
|
<span slot="b">hello world</span>
|
||
|
<span>bye world</span>
|
||
|
</A>
|