zhuguifei
2025-06-17 c1cc49dd93d38f51790558541d6835d1598ecccf
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<script setup lang="ts">
import { reactive, ref } from "vue";
import { useRouter } from "vue-router";
 
const router = useRouter();
 
const goBack = () => {
  router.back(); // 或者使用 router.go(-1);
};
 
const checked = ref("1");
const menuList = reactive([
  {
    name: "体积设置",
    value: 0.52,
    unit: "L"
  },
  {
    name: "起始频率",
    value: 10500,
    unit: "MHz"
  },
  {
    name: "皮重",
    value: 1028,
    unit: "g"
  },
  {
    name: "终止频率",
    value: 12000,
    unit: "MHz"
  },
  {
    name: "频率码",
    value: 0,
    unit: ""
  },
  {
    name: "步长",
    value: 12000,
    unit: "MHz"
  },
  {
    name: "衰减码",
    value: 0,
    unit: "1"
  }
]);
</script>
 
<template>
  <div class="app">
    <div class="title-box">
      <van-nav-bar
        title="参数配置"
        left-text="返回"
        left-arrow
        @click-left="goBack"
      />
    </div>
    <div class="w-full flex justify-center">
      <div class="content-box">
        <div v-for="(item, index) in menuList" :key="index" class="item">
          <span class="w-[90px]">{{ item.name }}</span>
          <span class="ml-1">
            <van-stepper
              :min="0"
              :v-model="item.value"
              step="0.2"
              :decimal-length="2"
              input-width="40px"
              button-size="32px"
            />
          </span>
          <span class="ml-1 font-thin text-sm">{{ item.unit }}</span>
        </div>
        <div class="item">
          <span class="w-[90px]">ASK选择</span>
          <van-radio-group v-model="checked" direction="horizontal">
            <van-radio name="1">外部</van-radio>
            <van-radio name="2">内部</van-radio>
          </van-radio-group>
        </div>
      </div>
    </div>
 
    <div class="w-full flex justify-center pt-12">
      <van-button icon="bar-chart-o" type="primary" class="w-[140px]" color="var(--base-green)"
        >参数生效</van-button
      >
    </div>
  </div>
</template>
 
<style scoped lang="less">
.app {
  width: 100vw;
  display: flex;
  justify-content: center;
  flex-direction: column;
 
  .title-box {
    height: 60px;
    align-items: center;
    background: white;
    margin: 10px 10px 0 10px;
    border-radius: 10px;
    overflow: hidden;
  }
 
  .content-box {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 10px;
    padding: 10px;
    box-sizing: border-box;
    .item {
      width: calc(50% - 5px);
      height: 60px;
      display: flex;
      align-items: center;
      font-size: 20px;
      background: white;
      border-radius: 10px;
      padding-left: 10px;
    }
  }
}
 
.bg-green {
  background: var(--base-green);
}
 
:deep(.van-stepper__minus) {
  background: var(--base-green);
  color: white;
}
:deep(.van-stepper__input) {
  background:var(--base-green);
  color: white;
  width: 60px !important;
  font-size: 18px;
}
:deep(.van-stepper__plus) {
  background:var(--base-green);
  color: white;
}
 
:deep(.van-nav-bar__text) {
  font-size: 20px;
}
 
</style>