Created
August 30, 2020 15:51
-
-
Save bachhm-dev/1d7ee990b6b9b0e2305e011fee410ee8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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