Navigation

    Quasar Framework

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. jacklin10
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 7
    • Best 0
    • Groups 0

    jacklin10

    @jacklin10

    0
    Reputation
    11
    Profile views
    7
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    jacklin10 Follow

    Latest posts made by jacklin10

    • RE: this.$axios in action

      that actually worked my man!

      Node 10.16 and Yarn 1.17.3

      I suppose we can’t be sure if it was the version change, or just the total reset of all the packages, but yeah, this.$axios.get(’…’) can be used from the component now.

      I think to get in the actions I’ll need to pass the vue instance and dig it out of there like you mentioned but progress! Thanks!

      posted in Framework
      J
      jacklin10
    • RE: this.$axios in action

      Also thanks for the tip on passing the vue instance.

      posted in Framework
      J
      jacklin10
    • RE: this.$axios in action

      Here’s quasar info:

      Operating System - Darwin(18.6.0) - darwin/x64
      NodeJs - 11.8.0

      Global packages
      NPM - 6.9.2
      yarn - 1.13.0
      @quasar/cli - 1.0.0
      cordova - 9.0.0 (cordova-lib@9.0.1)

      Important local packages
      quasar - 1.0.5 – Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
      @quasar/app - 1.0.4 – Quasar Framework local CLI
      @quasar/extras - 1.2.0 – Quasar Framework fonts, icons and animations
      vue - 2.6.10 – Reactive, component-oriented view layer for modern web interfaces.
      vue-router - 3.0.7 – Official router for Vue.js 2
      vuex - 3.1.1 – state management for Vue.js
      electron - Not installed
      electron-packager - Not installed
      electron-builder - Not installed
      @babel/core - 7.5.5 – Babel compiler core.
      webpack - 4.35.3 – Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, … and your custom stuff.
      webpack-dev-server - 3.7.2 – Serves a webpack app. Updates the browser on changes.
      workbox-webpack-plugin - 4.3.1 – A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.
      register-service-worker - 1.6.2 – Script for registering service worker, with hooks

      Quasar App Extensions
      @quasar/quasar-app-extension-icon-genie - 1.0.1 – A Quasar CLI Extension for Making All Your Icons
      @quasar/quasar-app-extension-dotenv - 1.0.0-beta.10 – Load .env variables into your quasar project

      Networking
      Host - pacman2.local
      en0 - 192.168.1.210

      posted in Framework
      J
      jacklin10
    • RE: this.$axios in action

      Yeah, I can’t see either 😞 There really isn’t much more in this app, it’s mostly a toy to learn Quasar so just a few pages with some components just to check everything out, nothing crazy.

      Maybe i’ll just create a new project and try it there, just to see what could be different.

      I can get it to work using your second suggestion, Importing an axiosInstance, so thanks for that, and thanks for your fast response in general!

      posted in Framework
      J
      jacklin10
    • this.$axios in action

      I’m using version 1 so I have a the file: boot/axios.js that looks like this:

      import axios from 'axios'
      export default async ({ Vue }) => {
        Vue.prototype.$axios = axios
      }
      

      Everything I’ve read says that this is all you need to be able to access it in a component, or in an actions (without importing), but it just won’t work.

      In a page for Login.vue If I have:

          methods: {
            this.$axios.get('some_url')
         }
      

      I’ll get an error:
      “TypeError: this.$axios is undefined”

      I’m using vuex also, and tried this in my store/auth/actions.js and I can’t get it there either.

      I originally had a class I made that was services/Auth.js
      and I could import axios from ‘axios’ in there and make get/posts, but the problem is that it doesn’t use the global axios that way, so any axios defaults or intercepters I configure on the boot version wouldn’t be seen by that class.

      posted in Framework
      J
      jacklin10
    • RE: [0.15.x] How to change heading font-size?

      Looks like you can do this in /src/css/app.style. I’m using Quasar 1.0.

      h1 { font-size: 3em; }

      posted in Help
      J
      jacklin10
    • RE: Store is no longer accessible in router.

      I couldn’t get this to work by using the getters either.

      // router/index.js
      import store from '../store/auth'
      
        Router.beforeEach((to, from, next) => {
            // works
            console.log('loggedIn: ', store.state.loggedIn)
            // flailing failed attempts while hammering the keyboard and looking to the sky for answers
            console.log('LoggedIn: ', store.getters['auth/loggedIn'])
            console.log('LoggedIn: ', store.getters.loggedIn)
            console.log('LoggedIn: ', store.loggedIn)
        })```
      posted in Framework
      J
      jacklin10