Skip to content
Advertisement

Tag: vuejs2

Vue JS 2 data manipulation

I have an instance of mounted in Vue, where I’m trying to set a date picker having the starting date depends on a data fed by an ajax response. Let’s say this data property is named start_date. I run my ajax request via the created instance in Vue. It’s a little weird when I tried to console log vm.myObject, it

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 previous code worked

Check if props in vue.js component template exists

After tried many variations, I don’t know how to properly style a component’s slot or partial code within <template></template> section. Is there a way to check if props <counter :recent=”true”></counter> from parent level exists, so in a Counter.vue in section <template></template> i would show a special html markup for it ? === UPDATED === Answer Here the default value for

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 the user input. I don’t want them

Vuejs transition on table rows

I’m trying to have a transition (animation) on html table row (vue.js) with no success. Here’s the full example I am expecting that the hidden table row should appear with transition/animation on opacity property when it appears, but nothing is happening, how am I supposed to do so? This is perfectly working on another element like span or other. Answer

Watching parent with prop doesn’t update during for loop

I have 2 components – <my-component> and <grand-child-comp>. In my root there is a multidimensional object and my component watches it with prop. In Vue debugger, I can see that my-component is getting and watching accountTypes object successfully. However, when trying to use it in my-component’s template, it doesn’t work. Lastly, accountTypes object looks like: Answer The problem is you’re

Advertisement