Answer the question
In order to leave comments, you need to log in
Using jQuery components in Vue?
Good afternoon.
How to properly use jQuery plugins in Vue components.
Inside the component, I connect the plugin like this:
import $ from 'jquery'
import mask from '../assets/jqplugins/jquery.maskedinput'
mounted() {
$('mask.').mask("99/99/9999");
}
Answer the question
In order to leave comments, you need to log in
Have you considered writing your own directive or component? On vue, there are no problems, or in extreme cases, use a ready-made one for vue. IMHO JQ in vue smacks of perversion, unexpected bugs, etc.
The problem is in the order of adding dependencies.
Look in the assembly how jQ and mask go. I'm sure the mask is connected before.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question