<template>
<view>
<radio-group @change="chan">
<label v-for="item in radioGroup" :key="item">
<radio :value="item" :checked="item==activeRadio" />{{item}}
</label>
</radio-group>
</view>
</template>
<script>
export default{
data(){
return{
activeRadio:'', //存的是选中的value值
radioGroup:['苹果','香蕉','梨','西红柿','西瓜']
}
},
methods:{
chan(e){
this.activeRadio = e.detail.value;
console.log(this.activeRadio);
}
}
}
</script>