10.10综合交易所原始源码_移动端
1
admin
2026-02-10 c547081aa61be5c7b6d4c12853c675954c2156eb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<template>
  <div class="checkBox">
    <van-radio-group v-model="radio" @change="onInput">
      <van-radio v-for="(item, index) in list" :key="index" :name="item.type">
        {{ item.name }}
        <template #icon="props">
          <div class="select" :class="props.checked ? 'selected' : ''">
            <div class="checked"></div>
          </div>
        </template>
      </van-radio>
    </van-radio-group>
  </div>
</template>
 
<script setup>
import { RadioGroup, Radio } from 'vant';
import { ref, onMounted } from "vue";
import { useRoute } from "vue-router";
const $emit = defineEmits(['checkedSelect'])
 
const route = useRoute()
 
const radio = ref(0)
 
const props = defineProps({
  list: {
    type: Array,
    default: []
  },
  initRadio: {
    type: Number,
    default: 0
  }
})
 
onMounted(() => {
  let type = route.query.type || props.list[0].type;
  radio.value = Number(type);
})
const onInput = () => {
  $emit('checkedSelect', radio.value)
}
 
</script>
 
<style lang="scss" scoped>
.checkBox {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 13px;
  color: $black;
 
  .select {
    width: 15px;
    height: 15px;
    box-sizing: border-box;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid $text_color1;
    box-sizing: border-box;
    padding: 1px;
 
    .checked {
      width: 100%;
      height: 100%;
      border-radius: 50%;
    }
  }
 
  .selected {
    .checked {
      background: $btn_main;
    }
  }
}
 
:deep(.van-radio__icon) {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto !important;
}
 
.van-radio {
  font-size: 13px !important;
  color: $text_color !important;
  margin-top: 21px;
}
 
:deep(.van-radio__label) {
  font-size: 13px !important;
  color: $text_color;
}
</style>