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.
26 lines
311 B
26 lines
311 B
8 years ago
|
{{#each items as item}}
|
||
|
<Item item={{item}} />
|
||
|
{{/each}}
|
||
|
|
||
|
<script>
|
||
|
import Item from './Item.html';
|
||
|
|
||
|
export default {
|
||
|
data () {
|
||
|
return {
|
||
|
items: [ 3, 2, 1 ]
|
||
|
};
|
||
|
},
|
||
|
methods: {
|
||
|
update () {
|
||
|
this.set({
|
||
|
items: [ 1, 2, 3, 4, 5 ]
|
||
|
});
|
||
|
}
|
||
|
},
|
||
|
components: {
|
||
|
Item
|
||
|
}
|
||
|
};
|
||
|
</script>
|