parent
d77f99981e
commit
68038f2791
|
@ -59,8 +59,6 @@ await SerialPort.list().then((ports, err) => {
|
||||||
|
|
||||||
// 过滤掉COM1口,很多电脑自带COM1接口
|
// 过滤掉COM1口,很多电脑自带COM1接口
|
||||||
ports = ports.filter((port) => port.path != '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) {
|
if (ports.length == 0) {
|
||||||
console.error('not connect')
|
console.error('not connect')
|
||||||
comreturn = false
|
comreturn = false
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, watch } from 'vue'
|
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'
|
import { BAUDRATE_OPTIONS, DATA_BITS_OPTIONS, STOPBITS_OPTIONS, PARITY_OPTIONS } from './data'
|
||||||
|
|
||||||
const PATH_OPTIONS = ref<any[]>([])
|
const PATH_OPTIONS = ref<any[]>([])
|
||||||
|
|
Loading…
Reference in New Issue