Skip to content

Instantly share code, notes, and snippets.

@bachhm-dev
Created August 30, 2020 15:51
Show Gist options
  • Save bachhm-dev/1d7ee990b6b9b0e2305e011fee410ee8 to your computer and use it in GitHub Desktop.
Save bachhm-dev/1d7ee990b6b9b0e2305e011fee410ee8 to your computer and use it in GitHub Desktop.
<template>
<div>
<input type="text" v-model="name" />
</div>
</template>
<script>
export default {
data(){
return {
name: null,
}
},
watch: {
name(newVal, oldVal){
console.log(`${newVal} ${oldVal}`);
}
}
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment