Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

128
Views
Vue component pb with functions from vuex file

When i use one of my functions situated in vuex js file, this error appear in the console.

https://i.stack.imgur.com/G4xY0.png

Here's the code of the function in the vuex js file :

mutations: {
    getPdfByReportId(reportId)
    {
        axios(
        {
            url:"http://localhost:9080/api/pdf/"+reportId,
            method:"GET", 
            responseType:'blob'
        }).then(response => 
        {
            //Download the pdf
            const blob = new Blob([response.data], { type: 'application/pdf' })
            const link = document.createElement('a')
            link.href = URL.createObjectURL(blob)
            link.download = "report.pdf"
            link.click()
            URL.revokeObjectURL(link.href)
        });
    },

and here's where i use it :

<v-icon style="cursor:pointer;" class="rounded-circle" @click="this.$store.commit('getPdfByReportId', item.reportId)" v-bind="props">mdi-download</v-icon>```
  
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!