No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    [solved] how to access $ variables from a mutation file?

    Help
    1
    2
    125
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rconstantine last edited by rconstantine

      Hey guys, I have quite a number of items I have added to my boot folder including axios, casl, lodash, vuelidate, and others, which I access via $ in my vue files.

      I think I’m missing something basic, so forgive me. How do I use these items from a mutation.js file, found in my store? In my vue files, I simply do something like:

      this.$axios...
      

      or

      this.$can('view', 'something')
      

      I have tried this._vm.$can(…) but that didn’t work (nor did it throw errors).

      I also didn’t know what to call this, so my search through the forums was unsuccessful. If this has been asked and answered, just let me know the search terms I should have used.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • R
        rconstantine last edited by

        Kept looking and found the answer here: https://forum.quasar-framework.org/topic/7148/unable-to-use-this-axios-in-vuex-ts2339-property-axios-does-not-exist-on-type-store/11

        I needed to a) make a function, and not use fat arrow, and b) use this._vm.$can(‘view’, loopVar)

        1 Reply Last reply Reply Quote 0
        • First post
          Last post