修复无法连接到串口的bug

master v3.4.2
qubiaobiao 2024-04-16 10:01:04 +08:00
parent d77f99981e
commit 68038f2791
2 changed files with 1 additions and 3 deletions

View File

@ -59,8 +59,6 @@ await SerialPort.list().then((ports, err) => {
// 过滤掉COM1口很多电脑自带COM1接口
ports = ports.filter((port) => port.path != 'COM1')
ports = ports.filter((port) => port.path != 'COM2')
ports = ports.filter((port) => port.path != 'COM6')
if (ports.length == 0) {
console.error('not connect')
comreturn = false

View File

@ -21,7 +21,7 @@
<script setup lang="ts">
import { ref, onMounted, watch } from 'vue'
import { NDescriptions, NDescriptionsItem, NSelect, NButton } from 'naive-ui'
import { NDescriptions, NDescriptionsItem, NSelect } from 'naive-ui'
import { BAUDRATE_OPTIONS, DATA_BITS_OPTIONS, STOPBITS_OPTIONS, PARITY_OPTIONS } from './data'
const PATH_OPTIONS = ref<any[]>([])