25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

93 satır
1.6 KiB

  1. <template>
  2. <view class="box">
  3. <!-- 顾问选择 -->
  4. <view class="nextcon">
  5. 最多选择五项
  6. </view>
  7. <view class="content">
  8. <checkbox-group v-model="value" @change="checkboxChange">
  9. <view v-for="(item,index) in items" :key="index">
  10. <view class="content-tips">
  11. <view class="left">
  12. {{item.name}}
  13. </view>
  14. <view class="right">
  15. <radio :value="item.value" style="transform:scale(0.8)" color="#2671E2" :checked="item.checked" @click="addclick(index)"></radio>
  16. </view>
  17. </view>
  18. </view>
  19. </checkbox-group>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data(){
  26. return{
  27. value:[],
  28. items:[
  29. {
  30. name:'销售一部',
  31. value:'0',
  32. checked:false
  33. },
  34. {
  35. name:'销售二部',
  36. value:'1',
  37. checked:false
  38. },
  39. ]
  40. }
  41. },
  42. methods:{
  43. checkboxChange (e) {
  44. console.log(e)
  45. },
  46. addclick(index){
  47. this.items[index].checked=!this.items[index].checked
  48. }
  49. }
  50. }
  51. </script>
  52. <style lang="scss" scoped>
  53. .box{
  54. background: #F8F8F8;
  55. width: 100%;
  56. height: 100%;
  57. font-size: 30rpx;
  58. font-weight: 400;
  59. // line-height: 30px;
  60. .nextcon{
  61. height: 78rpx;
  62. background: #F4F8FD;
  63. color: #2671E2;
  64. text-align: center;
  65. line-height: 78rpx;
  66. }
  67. .content-tips{
  68. display: flex;
  69. justify-content: space-between;
  70. background: #fff;
  71. padding: 0 30rpx;
  72. height: 92rpx;
  73. margin-bottom: 20rpx;
  74. .left{
  75. display: flex;
  76. // margin-top: 30rpx;
  77. font-weight: 500;
  78. color: #303030;
  79. line-height: 92rpx;
  80. font-size: 30rpx;
  81. }
  82. .right{
  83. margin: 24rpx 0;
  84. }
  85. }
  86. }
  87. </style>