Browse Source

fix: taro的h5环境下shortpassword聚焦事件修复 (#541)

* fix: taro的h5环境下shortpassword聚焦事件修复
Drjingfubo 4 years ago
parent
commit
200bde5c23
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/packages/__VUE/shortpassword/index.taro.vue

+ 4 - 0
src/packages/__VUE/shortpassword/index.taro.vue

@@ -115,7 +115,11 @@ export default create({
     }
     function focus() {
       let a = document.getElementsByClassName('nut-input-real-taro')[0] as any;
+      let h = a.children[0];
       a.focus();
+      if (h) {
+        h.focus();
+      }
     }
     watch(
       () => props.visible,