Код: Выделить всё
Select Option
< /code>
// form data that is set on page load from the DB in another spot in the code
const formData = ref({
arrayChoice: '',
etc
})
< /code>
const optionsArray = computed(() => {
return options.map((op) => ({
value: op.value,
label: op.label
})
)
})
< /code>
This properly displays the options when I click the dropdown and it correctly sets the value when the associated label is chosen, however the previously set option isn't displayed when the form first loads.
formData.arrayChoiceПодробнее здесь: https://stackoverflow.com/questions/797 ... ue-on-load
Мобильная версия