Zaloguj sie

在vue中使用单选radio

Autor:neo-yang Czas:2022/02/06 Czytać: 7089
<label
  v-for="(item, i) in radioGroup.items" :key="i">
<input
  class=""
  type="radio"
  :name="radioGroup.field"
  v-model="radioGroup.value"
  :value="item.key"
  />
  {{ item.name }}
</label>
<!--
radioGroup:the json of the radios.
radioGroup.items:the json of every radio item.
radioGroup.field:the field of the radio used.
radioGroup.value:the value of the radioGroup.
item.key:the key of every radio item.
item.name:the name of every radio item.

-->
tagi:


prawa autorskie © www.lyustu.com wszelkie prawa zastrzeżone.
Temat: TheMoon V3.0 Autor:neo yang