Browse Source

优化调试页

master
LiLongLong 5 months ago
parent
commit
ce2b92b5ec
  1. 14
      src/views/debug/index.vue

14
src/views/debug/index.vue

@ -45,7 +45,7 @@
电压控制器
</el-col>
<el-col :span="6" class="ml-[20px]">
<input v-model="voltageValue" placeholder='0~5000v' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />
<input v-model="voltageValue" placeholder='0~5000v' type="number" class="border-none outline-none h-[34px] bg-[#E8ECF7] text-primary font-medium rounded-md text-lg text-center w-[100px]" />
</el-col>
<el-col :span="8">
<el-button type="primary" @click="onTurnOnHighVoltage">开启</el-button>
@ -269,7 +269,7 @@
</main>
</template>
<script lang="ts" setup>
import { ref, onMounted, onUnmounted } from 'vue'
import { ref, onMounted, onUnmounted, watch } from 'vue'
import { createWebSocket, sharedWsUrl } from "@/services/socket";
import { ElMessage } from "element-plus";
import type {
@ -311,6 +311,16 @@ import {
index: 0
})
watch(voltageValue,(newVal)=>{
if(newVal > 5000){
voltageValue.value = 5000
}
if(newVal < 0){
voltageValue.value = 0
}
})
const rotateForm = ref<Record<string, string>>({})
let subscription:any
onMounted(()=>{

Loading…
Cancel
Save