• +91 9723535972
  • info@interviewmaterial.com

Vue JS Interview Questions and Answers

Question - Give an example to demonstrate how do you define custom key modifier aliases in Vue.js?

Answer -

We can define custom key modifier aliases via the global config.keyCodes. Following are some guidelines for the properties:

We can't use camelCase. Instead, we should use a kebab-case with double quotation marks.
We can define multiple values in an array format.
See the example:

Vue.config.keyCodes = {  
  f1: 112,  
  "media-play-pause": 179,  
  down: [40, 87]  
}  

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners