使用v-for循环访问并获取选项。尝试将我的数据绑定到drinkName变量
<ion-select v-model='drinkName' placeholder="Drink Name">
<ion-select-option
v-for='drink, index in drinks'
:key='index'
:value="drink.name"
>{{ drink.name }}
</ion-select-option>
</ion-select>
1条答案
按热度按时间eulz3vhy1#
can you link your data drinkName pls ? And if you create a function in mounted If
drinkName
inconsole.log()
is anObserver or object
you need tostringify
this. Exemple:JSON.parse(JSON.stringify(drinkName))