【发布时间】:2020-11-20 14:33:41
【问题描述】:
我正在尝试从此 JSON 中获取 idTipoExame:
{
"idTipoExame": "11",
"mnemonico": "AUR",
"exame": "ACIDO URICO"
},
{
"idTipoExame": "24",
"mnemonico": "BTF",
"exame": "BILIRRUBINA TOTAL E FRACOES"
},
我尝试使用@change,但我从 target.value 获得了“exame”。 这是我的代码 Html 和我的函数:
Javascript:
ExameEvent(event) {
console.log(event.target.value)
}
HTML:
<select v-model="Exame" @change="ExameEvent($event)>
<option v-for="item in JSON" :key="item.JSON">{{item.exame}}</option>
</select>
【问题讨论】:
-
这能回答你的问题吗? Vue.js get selected option on @change
标签: javascript html json vue.js