瀏覽代碼

feat: 打印时拿到设置的打印机信息,未拿到则提示未设置默认打印机

zhuyong 10 月之前
父節點
當前提交
a654335a9e
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      frontend/src/views/PrintScreen.vue

+ 4 - 1
frontend/src/views/PrintScreen.vue

@@ -70,7 +70,10 @@ onMounted(() => {
 const printList = ref<any>([])
 const loadLocalPrintList = () => {
   ipc.invoke(ipcApiRoute.print.listLocalPrinters).then((res: any) => {
-      nextTick(() => {printList.value = res; loadSetDefaultPrintName()})
+      nextTick(() => {
+        printList.value = res;
+        loadSetDefaultPrintName()
+      })
   }, (e: any) => {
     console.error(e)
   })