vue directive use component code example Example: vue directive access this function (el, binding, vnode) { vnode.context // gives you the vm }