Relative Content

Tag Archive for javascriptvue.js

Data Lost Between Routes in Vue.js on Refresh

I’m working on a Vue.js application using Vue Router and Axios to fetch user data. I have two pages: /dashboard and /dashboard/me. The data for the /dashboard page is successfully loaded and displayed, even after refreshing. However, when I navigate to /dashboard/me and refresh the page, I lose the data from Dashboard components (Dashboard is a wrapper for all children routes), and the request results in a 304 Not Modified status code.

Why doesn’t this data live update on change in my vue component? [duplicate]

This question already has answers here: How to access the correct `this` inside a callback (16 answers) Closed 3 months ago. I’m updating a relatively complicated component (because it is used in many places on a website, and the update, although being pretty simple in principle, can’t change the html structure of the component because […]

Why doesn’t this data live update on change in my vue component? [duplicate]

This question already has answers here: How to access the correct `this` inside a callback (16 answers) Closed 3 months ago. I’m updating a relatively complicated component (because it is used in many places on a website, and the update, although being pretty simple in principle, can’t change the html structure of the component because […]

Why doesn’t this data live update on change in my vue component? [duplicate]

This question already has answers here: How to access the correct `this` inside a callback (16 answers) Closed 3 months ago. I’m updating a relatively complicated component (because it is used in many places on a website, and the update, although being pretty simple in principle, can’t change the html structure of the component because […]

How to apply a conditional class in vue composition api if a variable have value

I need to apply a class conditionally for my vue project. I have defined some props that will pass the class to a component conditionally. In this case, I don’t know what’s the best way to proceed. I will need to have a class if a variable has a value. At the moment I have a variable that is always true, so the class will be always be applied.

v-bind equivalent of modelValue

I’ve got a myInput.vue component which accepts a v-model prop and captures the value of v-model as modelValue, like so:

Vue – v-if not updating with onMounted

I’m simply trying to make a div only appear once a variable changes from false to true and I’m telling it to change the value once the component is mounted. However the v-if which is supposed to be looking for that change is not working to create the div.

Vue – v-if not updating with onMounted

I’m simply trying to make a div only appear once a variable changes from false to true and I’m telling it to change the value once the component is mounted. However the v-if which is supposed to be looking for that change is not working to create the div.