0👍
✅
Please check https://github.com/vuejs/vue/issues/2873 Directive interface change.
Directives no longer have instances – this means there’s no more this inside directive hooks and bind, update and unbind now receives everything as arguments.
The best way to do this in vue 2 is really to make a custom component.
Source:stackexchange.com