mirror of https://github.com/sveltejs/svelte
parent
5801df8a25
commit
91551b9d43
@ -1,3 +1,27 @@
|
|||||||
{{#each things as thing, index}}
|
{{#each things as thing, index}}
|
||||||
|
|
||||||
<p>{{index}}: {{thing}}</p>
|
<p>{{index}}: {{thing}}</p>
|
||||||
|
|
||||||
|
{{else}}
|
||||||
|
|
||||||
|
{{#each things as thingEachElse, indexEachElse}}
|
||||||
|
<p>{{indexEachElse}}: {{thingEachElse}}</p>
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
|
{{#if foo}}
|
||||||
|
|
||||||
|
{{elseif bar}}
|
||||||
|
|
||||||
|
{{#each things as thingIfElse, indexIfElse}}
|
||||||
|
<p>{{indexIfElse}}: {{thingIfElse}}</p>
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
|
{{else}}
|
||||||
|
|
||||||
|
{{#each things as thingElse, indexElse}}
|
||||||
|
<p>{{indexElse}}: {{thingElse}}</p>
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
|
{{/if}}
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
[
|
[
|
||||||
"thing",
|
"thing",
|
||||||
"index"
|
"index",
|
||||||
|
"thingEachElse",
|
||||||
|
"indexEachElse",
|
||||||
|
"thingIfElse",
|
||||||
|
"indexIfElse",
|
||||||
|
"thingElse",
|
||||||
|
"indexElse"
|
||||||
]
|
]
|
||||||
|
@ -1 +1,29 @@
|
|||||||
<rect x='{{x}}' y='{{y}}' width='{{width}}' height='{{height}}'/>
|
<rect x='{{x}}' y='{{y}}' width='{{width}}' height='{{height}}'/>
|
||||||
|
|
||||||
|
{{#each foo as bar}}
|
||||||
|
|
||||||
|
<rect x='{{x}}' y='{{y}}' width='{{width}}' height='{{height}}'/>
|
||||||
|
|
||||||
|
{{else}}
|
||||||
|
|
||||||
|
{{#each foo as bar}}
|
||||||
|
<rect x='{{x}}' y='{{y}}' width='{{width}}' height='{{height}}'/>
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
|
{{#if foo}}
|
||||||
|
|
||||||
|
{{elseif bar}}
|
||||||
|
|
||||||
|
{{#each foo as bar}}
|
||||||
|
<rect x='{{x}}' y='{{y}}' width='{{width}}' height='{{height}}'/>
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
|
{{else}}
|
||||||
|
|
||||||
|
{{#each foo as bar}}
|
||||||
|
<rect x='{{x}}' y='{{y}}' width='{{width}}' height='{{height}}'/>
|
||||||
|
{{/each}}
|
||||||
|
|
||||||
|
{{/if}}
|
||||||
|
Loading…
Reference in new issue