[Vuejs]-Mixin with access-functionality in vue

0👍

My recommendation for architecture:
Create files per rights:

  • Admin.js
  • User1.js
  • User2.js
    etc.

Now you can create a function (wherever that takes in the user from your server, and then referes you to the right file. By doing this you can call in . your components: this.$config.get().displaySomething . Where the get() knows which file to go to. Make your config available on bootstrap.
The reason I don’t recommend vuex is since it sounds like your config is static and can just be hard coded into file.

Leave a comment