selector - add default value

This commit is contained in:
isUnknown 2024-09-10 16:34:02 +02:00
parent 9d89d624f1
commit 591625e15a

View file

@ -8,17 +8,24 @@
"
>
<label for="inspirations">Choisir une inspiration</label>
<Select id="inspirations" v-model="selectedInspiration" :options="inspirations" optionLabel="name" optionValue="value" class="" />
</div>
<Select
id="inspirations"
v-model="selectedInspiration"
:options="inspirations"
optionLabel="name"
optionValue="value"
class=""
/>
</div>
</template>
<script setup>
import { ref } from "vue";
const selectedInspiration = ref();
const selectedInspiration = ref("shape-of-nature");
const inspirations = ref([
{ name: 'Shape of Nature', value: 'shape-of-nature', selected: true },
{ name: 'Inspiration Title', value: 'inspiration-title' }
{ name: "Shape of Nature", value: "shape-of-nature" },
{ name: "Inspiration Title", value: "inspiration-title" },
]);
</script>