Home > Web Front-end > HTML Tutorial > How to configure keyboard events globally in vue

How to configure keyboard events globally in vue

php中世界最好的语言
Release: 2018-02-24 09:33:29
Original
3489 people have browsed it

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')}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template