Skip to content
Advertisement

Tag: vue.js

Vue Prop undefined in child component

I am trying to pass an array that inside an object from a parent component to a child component but answers is coming up undefined. When checking the prop in the parent component the data is there, but when it gets past to the child it is undefined. edit: Here is where the parent is declared Parent data: Query: Answer

Render custom template into Vue.js render function

Can Vue render function receive part template from outer? If there is a render function like bellow: the custem_form such as like bellow: or whatever the javascript-type that can explain as a form. I want put it as the custom_form, and then render into the div (you see the custom_form_modal). Is there a way to realize this? EDIT-1 I render

Vuejs Es6 class reactivity

i’m trying to have a computed property in vuejs associated to a es6 class. My Vue instance looks like this: My class looks like this If i try to do something like that: but the setter is never called, like the reactivity has been lost and i don’t understand why. I also try: I pass customClass as a prop, but

vue js disable input if value hasn’t changed

I have an input with an initial value: However the disabled binding gives an error: Cannot read property defaultValue of undefined. Best way to do this without spamming vm.data too much? Answer The error: Cannot read property defaultValue of undefined Is because the ref is not available so soon: An important note about the ref registration timing: because the refs

vuex empty state on logout

Quick story of my problem: Absolutely no data is stored in my vuex state when the page loads If the user is logged in(or has info stored in window.localStorage and therefore gets auto logged in) my vuex store retrieves all the info from a socket that requires authentication. Then the user logs out, But my vuex state save still retains

vue js cant understand keep alive

I’m doing tests with this code: https://jsfiddle.net/b2qj69o1/25/ And the js part I did the alert() test to see whether vue will re-render the component. I see that with or without wraping <component> with <keep-alive>, the alert() if called only the first time I enter the Home tab. So I have two questions: 1. What exactly keep-alive does? cause it seems

Advertisement