Logga in

在vue中使用单选radio

Författare:neo yang Tid:2022/02/06 Läsa: 7113
<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.

-->
taggar:


copyright © www.lyustu.com alla rättigheter reserverade.
Tema: TheMoon V3.0 Författare:neo yang