Vue.js method to hide the soft keyboard: 1. Click the keyboard start button to hide the soft keyboard. The code is [this.$refs.inputText.blur();]; 2. Click the input input box and the soft keyboard will be hidden. The keyboard is displayed, the code is [this.$refs.inputText.focus()].
The operating environment of this tutorial: Windows 7 system, Vue version 2.9.6, Dell G3 computer. This method is suitable for all brands of computers.
【Recommended related articles: vue.js】
vue.js method to hide the soft keyboard:
Soft Keyboard, the so-called soft keyboard is not on the keyboard, but on the "screen". The soft keyboard uses software to simulate the keyboard and input characters by clicking the mouse to prevent Trojans from recording keyboard input. Passwords are generally easy to see on some banks' websites where they require you to enter your account number and password.
Soft Keyboard can be divided into the following three types:
software virtual keyboard,
comes with the system Keyboard,
new silicone keyboard.
<input type="text" ref="inputText" autofocus="autofocus" @keyup.enter="clickInput">
Click the input box, the soft keyboard is displayed:
this.$refs.inputText.focus();
Click the keyboard start key, the soft keyboard is hidden:
this.$refs.inputText.blur();
Related free Learning recommendation: javascript(video)
The above is the detailed content of How to hide the soft keyboard in vue.js. For more information, please follow other related articles on the PHP Chinese website!