first commit
This commit is contained in:
39
金壶/appV1/components/common/radio-group_.vue
Normal file
39
金壶/appV1/components/common/radio-group_.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<view class="row">
|
||||
<view class="px-2 mb-2" :key="index"
|
||||
v-for="(item,index) in label.list">
|
||||
<view class="ml-2 mt-1 rounded bg-light-secondary font-md text-center border radio_size"
|
||||
:class="label.selected === index ? 'radio-active':'border-light-secondary'"
|
||||
@click="changeRadio(index)">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
label: Object,
|
||||
},
|
||||
methods: {
|
||||
changeRadio(index) {
|
||||
this.$emit('update:selected',index)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.radio-active{
|
||||
background: #FCE0D5!important;
|
||||
color: #EB7320!important;
|
||||
border-color: #EB7320!important;
|
||||
|
||||
}
|
||||
.radio_size{
|
||||
width: 119.7upx;height: 50upx;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user