Ver código fonte

设置焦点优化

ZaiZai 2 anos atrás
pai
commit
1ab0d25b66
1 arquivos alterados com 4 adições e 1 exclusões
  1. 4 1
      src/plugins/HTableForm.js

+ 4 - 1
src/plugins/HTableForm.js

@@ -246,7 +246,10 @@ export default class HTableForm {
     //设置元素焦点
     static setElementFocus(keyId) {
         if (keyId) {
-            document.getElementById(keyId).focus();
+            try {
+                document.getElementById(keyId).focus();
+            } catch {
+            }
         }
     }
 }