Skip to content

Tag: vue.js

vue v-for with filter gives error

I’m trying to use a local filter with v-for but I’m getting an error Property or method “filterByTitle” is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the p…

HTML offsetLeft delays to change

I have four canvas in my screen, positioned two above and two below. Each one have a button that makes possible to maximize the canvas, hiding the others. This button is positioned above each canvas, with absolute position based on offsetTop and offsetLeft of the canvas. However, when I maximize or minimize a…

Hidden value from Input not working with VUE JS

Hidden value from vue not working. The v-model of the one input its not working. v-model=”newcomment.post_id” value is null. How to fix this? Answer I will assume that you using using vue 2, and that what u asking basically boils down to default value for input. Interpolation inside attributes has…

How to set data into nuxt.js nuxt-link?

I’m trying to pass data into nuxt-link but nuxt-link is just returning a 404 error when I click on the link. It doesn’t seem to be getting and loading the file…. The second 2 links that use :href and hardcoding works Answer Nuxt uses vue-router by reading off the vue-router documentation you…

Vue2: warning: Avoid mutating a prop directly

I’m stuck in the situation where my child component (autocomplete) needs to update a value of its parent (Curve), And the parent needs to update the one of the child (or to completely re-render when a new Curve component is used) In my app the user can select a Curve in a list of Curve components. My pr…

Vue.js: Calling function on change

I’m building a component in Vue.js. I have an input on the page where the user can request a certain credit amount. Currently, I’m trying to make a function that will log the input amount to the console, as I type it in. (Eventually, I’m going to show/hide the requested documents based on th…

Call parent method with component

I have a component and want to add a click listener that runs a method in the parent template in Vue. Is this possible? Answer Directly from the Vue.js documentation: In Vue, the parent-child component relationship can be summarized as props down, events up. The parent passes data down to the child via props,…