I’ve tried everything I found on Google, none of they worked for me. Basically, what I’m trying to do is passing an object through a v-for to another component like that: This representante variable is the object i’m passing. It has a imagem property that contains the name of the image I need. IMPORTANT: the images are in the public
Tag: vue.js
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
this.$emit is not a function inside file reader onload
I know about lexical scope that this keyword is pointing to the window and not Vue But how do I make it point to Vue? What I am trying to do is get csv data and parse it, I’m using d3 to parse the data it’s working fine, I am just unable to emit the event with the data because
In Vue2.7, v-slot is not available, how to solve the problem?
When I run the following code, I get the following results (Google Chrome running screenshot). The running result is as follows: enter image description here When I use v-slot, the code is as follows: The running result is as follows: enter image description here So in Vue2.7, v-slot is not available, how to solve the problem? Answer Your syntax is
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 to count the no of occurences of a certain key in an array of object & append the count to each key’s value
How to count the no of occurences of the ‘value’ key in a object inside an array & append the count to each value if any. Here ‘a’ is the source data What i want to achieve is as following Answer
Dynamic Routing for Dynamic Components in Vue3
A dynamic component with Dynamic Routing is needed for me in Vue3. I wanted to render the component which is coming from the params (path named id) from the router.ts As you can see here in router.ts I have a dynamic parameter named as id. I wanted the same component to be rendered with the same name. For example: If
i18n how to use $t in translation file
I’m using vuejs 3, quasar 2 and vue-i18n for my traductions. how can i use $t or $tc in translation file like this ? i have the error “$tc is not defined” Answer You should be able to do this with “Linked Locale Messages” (https://kazupon.github.io/vue-i18n/guide/messages.html#linked-locale-messages) So with a messages file something like this: You would then do <div>{{ $t(‘message.linked’, 10)
How to extract an id from id field in html to send it via axios in Vue?
I’ve no idea how to get the id of element in order to send it. I use Vue 2. ** offers array i get from the API, so it is just an example. I need getting id dynamically in order to send a comment for the exact offer. Maybe it is the wrong way to do it, but it would