Home > Article > Web Front-end > How to configure keyboard events globally in vue
This time I will show you how vue configures the keyboard globally Events, what are the precautions for vue global configuration keyboard events, the following is a practical case, let's take a look.
Configure in main.js Vue.config.keyCodes.f1 = 112
Then you can @keyup.f12='demo' on the page
demo(){ console.log('demo')}
I believe after reading these You have mastered the case method. For more exciting information, please pay attention to other related articles on the PHP Chinese website!
Related reading:
Two methods to implement waterfall flow layout
About block-level format in CSS
Summary of the box model in HTML
What is the importance of overflow scrolling
What are the functions of html semantics
What are the usage methods of the cssText method of the style object
The above is the detailed content of How to configure keyboard events globally in vue. For more information, please follow other related articles on the PHP Chinese website!