All Questions
143 questions
5
votes
2
answers
27k
views
"TypeError: Cannot read property 'get' of undefined", Axios, Vue.JS
I am getting this strange error from Vue when trying to access get request from api using axios,
I am getting "TypeError: Cannot read property 'get' of undefined"
<template>
<...
0
votes
1
answer
2k
views
Vue - refresh state on clicking back button in the browser
I am developing a login page, which lists different provider options. If you click on a provider, it will redirect to the sign-in page of the respective provider. This login component has a bool ...
-1
votes
1
answer
797
views
Trouble with Pinia mapActions and component visibility of 'getData()' method - why is 'this.getData' working?
i'm using Pinia for storage variables and functions, i define getData() in the store.
getData(){
apiClient.get()
.then(res => {
res.data.forEach(element => this....
3
votes
1
answer
6k
views
How to use Vue js global variables in pinia store?
I have a Vue.js 3 project where I want to use a global axios instance in some .vue components and also in a pinia store.
My main.js file has axios globally configured like this
const axiosInstance = ...
0
votes
1
answer
101
views
Cannot find module './undefined' when updating a template ref in Vue
Objective
Render components based on a dynamically changing reference (ref). User can perform a "search" feature that returns data and updates the reference. The updated reference should ...
10
votes
2
answers
18k
views
How to call a custom global function using composition api | vue3
In main.js, I set axios as a global function.
//main.js
import { createApp } from 'vue';
import App from './App.vue';
import axios from 'axios';
const app = createApp(App);
app.config....
0
votes
1
answer
347
views
How to show array data without loop in vuejs and axios
I am trying to print data without loop in my vuejs 3 app bellow my response and code
In My Axios Api I got reponse:
[{id: 2, name: "sub_title", value: "The Best Developer Team", ...
0
votes
0
answers
2k
views
Vue3 - TypeError: 'set' on proxy: trap returned falsish for property 'basketCount'
I have a problem. I'm using props to update my basketCount but I have a problem:
How can I update my basketCount ? Can you give me some advice please ?
These are my codes:
Home.vue
<template>
...
0
votes
1
answer
135
views
Vue3 - Get input file from other component
I'm working on a complex app so I simplify my question.
I have a input component located in the InputFile.vue and a FormFile.vue. I import the InputFile into the Form and after the user uploads a file ...
0
votes
4
answers
1k
views
How can I pass query parameters optional using axios in vue?
I try like this :
const actions = {
getData ({ commit }, payload) {
const params = {}
if(payload) {
if (payload.dateFrom) { params.date_from = payload.dateFrom }
if (...
0
votes
1
answer
609
views
Vue 3 axios get data not renders in v-for
I'm getting data with axios in my property list page, the data shows in console log but never renders in my table. can anyone help with the problem?
my real sate Table body component is like:
<...
0
votes
1
answer
62
views
v-show does not work as I expected in my code
First I get data set from database using API and add a custom field called "isShare" and add value "false" in the initial state, then I iterate these data using v-for. Then I wanted to change the ...
0
votes
3
answers
91
views
Can't get gata using arrow function in Vue
I am new in Vue, my problem: i can't get data from API to my component.
I have a service class that get's data from my api. Api works fine. So code:
import IReview from "../types/Review"
...
1
vote
2
answers
187
views
VueJS : Adding to existing HTML and handling imports
So I built a Single Page Application in VueJS which works nicely but the SEO sucks as expected, so I decided to make a normal HTML site with some pages having VueJS code (Remote hosting so no node ...
3
votes
1
answer
8k
views
Vue.js - load component from ajax call
I'm trying to render or load components from api data. To explain more, let's say I've test-component, which I inject it directly in my parent component, works. But when I'm trying to save the ...