Forming select in a loop in Vue
Tags option can also be created not manually, but using a loop. See the example:
App.vuedata() {
return {
selected: 'value1',
options: ['value1', 'value2', 'value3'],
}
}App.vue<template>
<select v-model="selected">
<option v-for="option in options">{{ option }}</option>
</select>
<p>{{ selected }}</p>
</template>
Задание 1
Make a select that will allow you to choose the name of the day of the week.
Задание 2
Make three selects with which you can choose the day, month and year.
Задание 3
Modify the previous task so that the current date is selected by default in the selects.