Skip to content
Advertisement

Tag: vuejs2

Vue v-for and variable logic unclear

trying to code a chatPage from a tutorial, the tutorial was releases in vue 2.0 and now i wanna use the new vue 3.0 version. I have a messageContainer which will display the chatMessages. it has the messages as an array and it should loop over them and display each one as a messageItem. Yet, the syntax with the v-for

How to merge a object to a array object in vuejs

I have a api response.data And my component .vue I want merge placeholder object to result after api response Answer Result is actually a list. You can use the destructuring assignment to prepend the placeholder. To use concat you must wrap the placeholder in a list. to achieve the same result in a “more conservative way”. Or you can use

Mounting a Components Library in Vue 3

I am new to Vue.js and trying to migrate a Vue.js 2 migration to Vue.js 3. I have read the Vue.js instructions on how to that carefully; however, the application that I need to migrate contains a Component Library out of Vue.js 2 components that I need to mount in the migrated app aswell. This is the Vue.js 2 main.js

Calling method in my store returns empty observer object

I am new with Vue. I have a Vue component like below. The return value of my function getBuildingsByOwnerRequest is unexpected: It returns an empty observer object. Only if I run getBuildingsByOwnerRequest again I receive the expected output from my store action. Could this be a reactivity problem? buildings.js (store): Answer The object is empty at the time it’s logged.

How can I use leaflet-polylinedecorator with a vue app

I have a Vue 2 sample project at https://github.com/ericg-vue-questions/leaflet-test This is a simple import issue for my code that I am not sure how to handle. A couple of things I have tried are to modify the code to do: but this results in a build error: To the index.html, I also tried adding: but that results in the runtime

How to benchmark a function in VueJs Store?

I have the following script in my VueJs2 Store Config, and I suspect that the if statement below is causing extra load, even if not triggered, but I’m unsure: Being new to testing in JS in general, I would like to hear suggestions as to the best methods of benchmarking and debugging this further, any tips appreciated. Full function: Answer

Vue-Router URL from external source always redirects to “/”

I am running Vue 2 directly off the Vue dev server. I am trying to enter a vue route (vue-router) from an external url. For some reason I don’t know, vue-router always redirects my request and handles it as if it comes from “/”, which automatically redirects to “/login” I found a similiar questions here (https://forum.vuejs.org/t/access-to-a-vue-route-from-external-link/107250) but there is no

Advertisement