<div id="app">
<input type="text" :value="text" @input="changeInput" />
<div @click="mychange">Button</div>
</div>
new Vue({
el: '#app',
data() {
return {
text: "default"
};
},
methods: {
changeInput: function(event) {
alert('changeInput');
this.text = event.target.value
},
mychange: function() {
alert("mychange");
this.text = "not default";
}
}
})
This Pen doesn't use any external CSS resources.