mirror of https://github.com/sveltejs/svelte
commit
5d6333aa8f
@ -0,0 +1,4 @@
|
||||
<div>
|
||||
<slot name="a"></slot>
|
||||
<slot name="b"></slot>
|
||||
</div>
|
@ -0,0 +1,19 @@
|
||||
export default {
|
||||
html: `
|
||||
<div>
|
||||
<span slot="a">static</span>
|
||||
<span slot="b">0</span>
|
||||
</div>
|
||||
`,
|
||||
|
||||
test({ assert, component, target }) {
|
||||
component.dynamic += 1;
|
||||
|
||||
assert.htmlEqual(target.innerHTML, `
|
||||
<div>
|
||||
<span slot="a">static</span>
|
||||
<span slot="b">1</span>
|
||||
</div>
|
||||
`);
|
||||
}
|
||||
};
|
@ -0,0 +1,11 @@
|
||||
<script>
|
||||
import Nested from "./Nested.svelte";
|
||||
|
||||
export let dynamic = 0;
|
||||
</script>
|
||||
|
||||
|
||||
<Nested>
|
||||
<span slot="a">static</span>
|
||||
<span slot="b">{dynamic}</span>
|
||||
</Nested>
|
Loading…
Reference in new issue