|
- <template>
- <view class="box">
- <!-- 顾问选择 -->
- <view class="nextcon">
- 最多选择五项
- </view>
- <view class="content">
- <checkbox-group v-model="value" @change="checkboxChange">
- <view v-for="(item,index) in items" :key="index">
- <view class="content-tips">
- <view class="left">
- {{item.name}}
- </view>
- <view class="right">
- <radio :value="item.value" style="transform:scale(0.8)" color="#2671E2" :checked="item.checked" @click="addclick(index)"></radio>
- </view>
- </view>
- </view>
- </checkbox-group>
-
- </view>
- </view>
- </template>
-
- <script>
- export default {
- data(){
- return{
- value:[],
- items:[
- {
- name:'销售一部',
- value:'0',
- checked:false
- },
- {
- name:'销售二部',
- value:'1',
- checked:false
- },
- ]
- }
- },
- methods:{
- checkboxChange (e) {
- console.log(e)
- },
- addclick(index){
-
- this.items[index].checked=!this.items[index].checked
- }
-
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .box{
- background: #F8F8F8;
- width: 100%;
- height: 100%;
- font-size: 30rpx;
- font-weight: 400;
- // line-height: 30px;
- .nextcon{
- height: 78rpx;
- background: #F4F8FD;
- color: #2671E2;
- text-align: center;
- line-height: 78rpx;
- }
- .content-tips{
- display: flex;
- justify-content: space-between;
- background: #fff;
- padding: 0 30rpx;
- height: 92rpx;
- margin-bottom: 20rpx;
- .left{
- display: flex;
- // margin-top: 30rpx;
- font-weight: 500;
- color: #303030;
- line-height: 92rpx;
- font-size: 30rpx;
- }
- .right{
- margin: 24rpx 0;
- }
- }
- }
- </style>
|