mirror of https://github.com/sveltejs/svelte
22 lines
332 B
22 lines
332 B
{{#each fields as field}}
|
|
<Nested :field bind:value='values[field]'/>
|
|
{{/each}}
|
|
|
|
<script>
|
|
import Nested from './Nested.html';
|
|
|
|
export default {
|
|
data: function () {
|
|
return {
|
|
fields: ['firstname', 'lastname'],
|
|
values: {
|
|
firstname: '',
|
|
lastname: ''
|
|
}
|
|
};
|
|
},
|
|
components: {
|
|
Nested
|
|
}
|
|
};
|
|
</script> |