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.
46 lines
737 B
46 lines
737 B
<template>
|
|
<view class="radioBox">
|
|
<u-radio-group
|
|
:value="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', 'value'],
|
|
|
|
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>
|