Vue.directive(id, definition);Vue.directive(id, update); //when you need only the update function.| Parameter | Details |
|---|---|
id | String - The directive id that will be used without the v- prefix. (Add the v- prefix when using it) |
definition | Object - A definition object can provide several hook functions (all optional): bind, update, and unbind |