江西小程序管理端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

50 lines
769 B

<template>
<view class="radioBox">
<u-radio-group
v-model="value"
placement="row"
size="14"
>
<u-radio
:customStyle="{marginLeft: '8px'}"
v-for="(item, index) in radioData"
:key="index"
:label="item.name"
:name="item.id"
labelSize="14"
@change="changeRadio"
>
</u-radio>
</u-radio-group>
</view>
</template>
<script>
export default {
props: {
radioData: {
type: Array,
default: []
}
},
data() {
return {
value: ''
}
},
mounted() {
this.$on('upDateRadio',(val)=>{
this.value = val
})
},
methods: {
changeRadio(val) {
// console.log(this.value)
this.$emit('changeRadio', val)
}
}
}
</script>
<style>
</style>