adjustments

pull/2677/head
Conduitry 6 years ago
parent 369b087d09
commit 82c2688d03

@ -188,9 +188,9 @@ If a *key* expression is provided — which must uniquely identify each list ite
--- ---
You can freely use the destructuring pattern in each blocks, the rest syntax being supported. You can freely use destructuring and rest patterns in each blocks.
```sv ```html
{#each items as { id, name, qty }, i (id)} {#each items as { id, name, qty }, i (id)}
<li>{i + 1}: {name} x {qty}</li> <li>{i + 1}: {name} x {qty}</li>
{/each} {/each}
@ -198,6 +198,7 @@ You can freely use the destructuring pattern in each blocks, the rest syntax bei
{#each objects as { id, ...rest }} {#each objects as { id, ...rest }}
<li><span>{id}</span><MyComponent {...rest}/></li> <li><span>{id}</span><MyComponent {...rest}/></li>
{/each} {/each}
{#each items as [id, ...rest]} {#each items as [id, ...rest]}
<li><span>{id}</span><MyComponent values={rest}/></li> <li><span>{id}</span><MyComponent values={rest}/></li>
{/each} {/each}

Loading…
Cancel
Save