I have a e-editor component which helds the real editor, then I load the e-editor component in a different component.
My question now is: How can I access the v-model=“content” of the component from the view component, and can I pass data from the view component to the model ?
Thanks for your help
Related
by using vue-property-decorator and vuex-module-decorators, I am not able to access state inside grandchild component.
here is explanation:
I have a root component inside that I have a direct child component, In this child component which is grandchild of the root component, I am accessing one of the state's properties this state's property is being consoled as "undefined", why so?
root coponent: TodoApp
direct child : TodoInput
grandchild : TodoSummary
on TodoSummary's rendering state properties are consoled as undefined why so?
i'm using vue.js and vuetify.
elements made by parent element exist in my code.
i want to change parent element's class dynamically depending on it's child class, like jQuery has() method.
is vue.js has any way to do this?
jQuery has()
You can access a state if a child property of a child on different ways. (I assume the child class is set based on a certain state).
You could use vuex that keep a state over several components. You could emit a state back to you parent component. Or you could use the ref to access the child components properties.
<component ref="childcomponent"></markdown>
process: function(){
// items is defined object inside data() of the child component
var hasClass= this.$refs.childcomponent.item
}
I am currently working on a project that has a component structure like follows
Parent component that contains items
This component has a v-for over this.items.
That v-for has a
ChildComponent contains a form that modifies properties of this.item via v-model for each property.
I was expecting, since VueJS does not support 2 way databinding by default, that ParentComponent would not be aware about changes that I make in ChildComponent.
However, since my ChildComponent is a modal dialog, I can see the changes that I make in ChildComponent are reflected in ParentComponent.
As much as I like what I see, I don't understand it...
Could someone shed a light on this for me?
I have make my own vuetable-2 component and calling this component every time in component where i want to show list.
I want to reload my vuetable-2 component when ever i perform any action on my parent component.
You can use refresh() for vuetable . So there is many way to trigger that from parent . You can call directly that method by setting ref or use watch in component .
I have a form built with Vue with a hierarchy of components using v-model to bind the data to the model.
Now I want to fill the form programmatically. If I just update the model (data) of the top component, it has no effect on the child components since this only changes their props.
Here's an example:
https://jsfiddle.net/eywraw8t/411545/
When you click the 'Set to 2018-Oct' button, the model on the myApp is updated, but not the model of the <mydate> component.
Is there a way to achieve filling the form without adding watchers to value props (which the official guide doesn't suggest) on all components in the hierarchy?