0π
I am guessing that myDataField is not reactive so the problem is in the parent.
- [Vuejs]-Unable to use collection.set after createUserWithEmailAndPassword
- [Vuejs]-I have some question about Vue component structure
0π
Can you clarify the problem, seems like it is working as it should, ie. the component does not seem to be the problem.
zTemp = Vue.component('ztemp', {
template: '#ztemp',
props: {
value: {
required: true
}
},
watch: {
value(val) {
console.log(val);
}
},
methods: {
onChange() {
this.$emit('input', Math.random());
}
}
});
new Vue({
el: '#app',
components: {
zTemp
},
data: {
myinput: '0.2'
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.4.4/vue.min.js"></script>
<div id="app">
{{myinput}}<br/>
<input v-model="myinput"/><br/>
<ztemp v-model="myinput"/><br/>
</div>
<script type="text/x-template" id="ztemp">
<div>
<p>{{value}}</p>
<button @click="onChange">Change</button>
</div>
</script>
- [Vuejs]-Why I commit to set the state's data to null, the component state do not change util I refresh the page?
- [Vuejs]-Vuejs select option inside blade.php view
0π
thanks for helping, but Iβm using meteor
with vue-meteor
, the problem was related to vue-meteor
.
I changed the project structure to use separated Vue project in a .client
folder and the problem gones. It was not a problema with component, but with vue-meteor package. Anyway, thank you guys.
- [Vuejs]-Upload file SailsJS
- [Vuejs]-How to redirect back after logout, unless page needs authentication?
Source:stackexchange.com