Commit 6a49528e by zeven

修复无打印机模块报错问题

parent c8da3eb8
...@@ -133,8 +133,10 @@ const CounterMixins = ComposeComponent => { ...@@ -133,8 +133,10 @@ const CounterMixins = ComposeComponent => {
}; };
printerConnect = async () => { printerConnect = async () => {
const isConnected = await Printer.isConnected(); if (Printer) {
if (!isConnected) await Printer.usbConnect(); // 尝试连接打印机模块 const isConnected = await Printer.isConnected();
if (!isConnected) await Printer.usbConnect(); // 尝试连接打印机模块
}
}; };
setDelay = debounce(delay, true, () => { setDelay = debounce(delay, true, () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment