mirror of https://github.com/sveltejs/svelte
Merge 8348132c9c into cd8d40af1a
commit
55416db469
@ -0,0 +1,12 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: `
|
||||
<p>0</p>
|
||||
<p>1</p>
|
||||
<p>2</p>
|
||||
<p>3</p>
|
||||
<p>4</p>
|
||||
`
|
||||
});
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
<svelte:options runes />
|
||||
|
||||
<script>
|
||||
function* gen() {
|
||||
const arr = [0];
|
||||
|
||||
for (let i = 0; i < 5; i += 1) {
|
||||
arr[0] = i;
|
||||
yield arr;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
{#each gen() as [item]}
|
||||
<p>{item}</p>
|
||||
{/each}
|
||||
|
||||
Loading…
Reference in new issue