53 lines
1.1 KiB
Vue
53 lines
1.1 KiB
Vue
<template>
|
|
<view>
|
|
<radio-group @change="radioChange">
|
|
<label class="idcardAdd-aline-write" v-for="(limitItem, limitIndex) in radioList" :key="limitIndex">
|
|
<!-- <radio :value="limitIndex.toString()" :checked="checkboxVlaue.toString() == limitIndex.toString()" color="#4e7bfe" style="transform:scale(.65)"/> -->
|
|
<radio :value="limitIndex.toString()" :checked="radioVlaue == limitIndex.toString()" color="#4e7bfe" style="transform:scale(.65)"/>
|
|
<text>{{limitItem}}</text>
|
|
</label>
|
|
</radio-group>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default{
|
|
name: 'mouldRadio',
|
|
data(){
|
|
return {
|
|
radioVlaue: null // 选中的会员卡ID
|
|
}
|
|
},
|
|
props: {
|
|
radioList: {
|
|
type: Array,
|
|
default: () => {
|
|
return []
|
|
}
|
|
},
|
|
// radioVlaue: {
|
|
// type : String,
|
|
// default : ''
|
|
// },
|
|
},
|
|
watch:{
|
|
radioList(e, old){
|
|
this.radioVlaue = null
|
|
}
|
|
},
|
|
methods: {
|
|
radioChange(e){
|
|
this.radioVlaue = e.detail.value
|
|
this.$emit('onRadio', e.detail.value)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
.idcardAdd-aline-write {
|
|
display: inline-block;
|
|
font-size: $title-size-lg;
|
|
margin-left: 30rpx;
|
|
}
|
|
</style> |