有input组件的时候,如果用户不关闭软键盘,然后导航到别的页(我用的是路由vue-router),软键盘会一直在,不会自动关闭。同样如果用户关闭了软键盘,再次要输入内容时软键盘又不自动弹出。
通过blur方法关闭键盘,下次也同样不能弹出软键盘
学习是最好的投资!
Before routing, you can close the keyboard through the blur method, navigate to another page to automatically pop up, set the input autofocus="true", or pass this.$refs.input.focus()
Before routing, you can close the keyboard through the blur method, navigate to another page to automatically pop up, set the input autofocus="true", or pass this.$refs.input.focus()