Explorar o código

快捷键支持

luoyifan %!s(int64=3) %!d(string=hai) anos
pai
achega
bf5939f4c3
Modificáronse 1 ficheiros con 14 adicións e 0 borrados
  1. 14 0
      src/lib/lib.ts

+ 14 - 0
src/lib/lib.ts

@@ -25,6 +25,20 @@ export function getRegParamList(methodName: string) {
     return regParamList[methodName]
 }
 
+export function raiseClick(buttonHandle) {
+    if (!buttonHandle) {
+        return false
+    }
+    if (buttonHandle.disabled) {
+        return false
+    }
+    if (buttonHandle.hidden) {
+        return false
+    }
+    buttonHandle.click()
+    return true
+}
+
 /**
  * 标注系统全局函数的参数
  * @param title 函数名称