export default {
  inserted (el, binding, vnode) {
    const node = vnode.context.$refs[binding.arg] || vnode.context.$refs[binding.value]
    const contextmenu = Object.prototype.toString.call(node) === '[object Array]' ? node[0] : node
    contextmenu.addRef({ el, vnode })
    contextmenu.$contextMenuId = el.id || contextmenu._uid
  }
}
