williamcruzme / vue-gates

🔒 A Vue.js & Nuxt.js plugin that allows you to use roles and permissions in your components or DOM elements, also compatible as middleware and methods.

Home Page:https://williamcruzme.github.io/vue-gates/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vue 3 support?

gaetandezeiraud opened this issue · comments

Currently, I have the following error Uncaught TypeError: Cannot set property '$gates' of undefined.
At :

var index = {
    install: function install(Vue) {
      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var gate = new Gate(options);
      Vue.prototype.$gates = gate; // here
      Vue.gates = gate;
      registerDirectives(Vue);
    }
  };

Excellent 🥇, I'll work on that

I'm having trouble getting the directive name, it turns out that binding.name doesn't exist 😢