瀏覽代碼

:iphone: status

Vanessa 1 年之前
父節點
當前提交
45d1dc10e8
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/src/dialog/processSystem.ts

+ 3 - 1
app/src/dialog/processSystem.ts

@@ -278,6 +278,7 @@ export const transactionError = () => {
     });
     });
 };
 };
 
 
+let statusMobileTimeout:number;
 export const progressStatus = (data: IWebSocketData) => {
 export const progressStatus = (data: IWebSocketData) => {
     const statusElement = document.querySelector("#status") as HTMLElement;
     const statusElement = document.querySelector("#status") as HTMLElement;
     if (!statusElement) {
     if (!statusElement) {
@@ -287,9 +288,10 @@ export const progressStatus = (data: IWebSocketData) => {
         if (!document.querySelector("#keyboardToolbar").classList.contains("fn__none")) {
         if (!document.querySelector("#keyboardToolbar").classList.contains("fn__none")) {
             return;
             return;
         }
         }
+        clearTimeout(statusMobileTimeout);
         statusElement.innerHTML = data.msg;
         statusElement.innerHTML = data.msg;
         statusElement.style.bottom = "0";
         statusElement.style.bottom = "0";
-        setTimeout(() => {
+        statusMobileTimeout = window.setTimeout(() => {
             statusElement.style.bottom = "";
             statusElement.style.bottom = "";
         }, 5000);
         }, 5000);
         return;
         return;