过滤掉COM1口

master
叶志超 2022-04-02 17:32:14 +08:00
parent 7a09eb3d0d
commit c2a7c0ada4
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ SerialPort.list().then((ports, err) => {
// console.log(ports, '=====================')
// 过滤掉COM1口很多电脑自带COM1接口
ports.filter((port) => port.path != 'COM1')
ports = ports.filter((port) => port.path != 'COM1')
if (ports.length == 0) {
console.error('设备为连接')
return