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.
svelte/test/runtime/samples/binding-select-in-yield/main.html

23 lines
345 B

<Modal ref:modal>
<span>{letter}</span>
<select bind:value='letter'>
{#each letters as letter}
<option value="{letter}">{letter}</option>
{/each}
</select>
</Modal>
<script>
import Modal from './Modal.html';
export default {
data () {
return {
letters: ['a', 'b', 'c']
};
},
components: {
Modal
}
};
</script>